Research Article

Image Processing and Feature Extraction for Hull Structure GMAW Based on Weld Pool Visual Sensing

Algorithm 1

Code idea based on the FCM-Sobel algorithm.
Function FCM-Sobel ()
Input: , , ,
Output: a membership matrix , image edge
Step 1: given a set of points , and set iteration count ;
   Randomly initialize cluster centers , .
Step 2: apply Equation (9) to calculate FCM objective function .
Step 3: according to , use Equation (14) to calculate membership matrix .
Step 4: fix .
   Utilize Equation (18) to revise cluster center .
Step 5: amend
   Use Equation (20) to revise membership function .
Step 6: compare and .
   if , then
    Obtained and , iteration over;
    Continue to step 7;
   else do
      , return to step 3.
   end.
Step 7: according to the principle of maximum membership.
   Pixel is classified into the class that satisfies the conditions of ,
   .
Step 8: image segmentation is over.
   After division class, respectively label the grayscale of the same and different pixels to form an image segmentation, .
Step 9: according to , use Equation (5) to smoothen the image.
Step 10: apply Equations (1), (2), and (3) to calculate the value.
Step 11: judging image edge.
   If or or is met, then
     is the edge point.
   else do
    Repeat step 10.
   end.