Stud welding ferrule and apparatus
A system for automatically identifying one or more welding site locations on a surface of a target metal marked with a plurality of welding site candidates, includes an imager configured to acquire an image of the surface of the target metal, wherein the acquired image includes a plurality of pixels each having a corresponding intensity value; and a processing circuit configured to: compare each intensity value to an intensity threshold, identify a plurality of pixel clusters, wherein each pixel cluster is made up of contiguous pixels that have intensity values that are equal to or greater than the intensity threshold, for each pixel cluster, determine whether a total pixel area of the pixel cluster is less than a threshold pixel area, and remove any pixel cluster from consideration as a welding site location if the total pixel area of the pixel cluster is less than the threshold pixel area.
1 . A system for automatically identifying one or more welding site locations on a surface of a target metal marked with a plurality of welding site candidates, the system comprising:
an imager configured to acquire an image of the surface of the target metal including the plurality of welding site candidates, wherein the acquired image comprises a plurality of pixels with each pixel having a corresponding intensity value; and
a processing circuit configured to:
receive the acquired image,
compare each intensity value to an intensity threshold for pixel clustering,
identify a plurality of pixel clusters, each pixel cluster corresponding to a different one of the plurality of welding site candidates, wherein each pixel cluster is a cluster of contiguous pixels that have intensity values that are equal to or greater than the intensity threshold,
for each pixel cluster, determine whether a total pixel area making up the pixel cluster is less than a threshold pixel area,
remove any pixel cluster from consideration as a welding site location if the total pixel area of the pixel cluster is less than the threshold pixel area,
identify first remaining pixel clusters comprising at least one pixel cluster whose total pixel area is equal to or greater than the threshold pixel area,
for each pixel cluster of the first remaining pixel clusters, determine a largest inscribed circle that is enclosed within the pixel cluster, compare a diameter of the largest inscribed circle with a threshold diameter corresponding to a dimension of a metal stud, and remove the pixel cluster from consideration as a welding site location if the diameter of the largest inscribed circle is less than the threshold diameter,
identify second remaining pixel clusters comprising at least one pixel cluster whose diameter of the largest inscribed circle is equal to or greater than the threshold diameter,
for each pixel cluster of the second remaining pixel clusters, determine a center of the largest inscribed circle that is enclosed within the pixel cluster as a center of the pixel cluster having an image-space coordinate, and convert the image-space coordinate to an object-space coordinate of a welding site location for a corresponding metal stud, and
a controller configured to, for each pixel cluster of the second remaining pixel clusters, align a center of the corresponding metal stud with the object-space coordinate of the welding site location.
2 . The system of claim 1 , wherein the processing circuit is further configured to:
for each pixel cluster of the second remaining pixel clusters, determine a center of the pixel cluster,
compare center-to-center distances between pixel clusters of the second remaining pixel clusters to a distance threshold, and
remove at least one of the pixel clusters of the second remaining pixel clusters from consideration as a welding site location if the center-to-center distance to another pixel cluster is less than the distance threshold.
3 . The system of claim 2 , wherein the processing circuit is further configured to:
identify third remaining pixel clusters comprising at least one pixel cluster whose center-to-center distance is not less than the distance threshold with respect to any pixel cluster of the third remaining pixel clusters.
4 . The system of claim 3 , wherein the processing circuit is further configured to, for each pixel cluster of the third remaining pixel clusters:
determine a center of the largest inscribed circle that is enclosed within the pixel cluster as a center of the pixel cluster having an image-space coordinate, and convert the image-space coordinate to an object-space coordinate of a welding site location for a corresponding metal stud.
5 . The system of claim 4 , further comprising:
a controller configured to, for each pixel cluster of the third remaining pixel clusters, align a center of the corresponding metal stud with the object-space coordinate of the welding site location.
6 . The system of claim 3 , wherein the processing circuit is further configured to, for each pixel cluster of the third remaining pixel clusters:
determine whether a corresponding welding site location is within a minimum distance from any edge of the target metal, and remove the pixel cluster from consideration as a welding site location if the corresponding welding site location is within the minimum distance.
7 . The system of claim 6 , wherein the processing circuit is further configured to:
identify fourth remaining pixel clusters comprising at least one pixel cluster whose corresponding welding site location is not within the minimum distance from any edge of the target metal.
8 . The system of claim 7 , wherein the processing circuit is further configured to, for each pixel cluster of the fourth remaining pixel clusters:
determine a center of the largest inscribed circle that is enclosed within the pixel cluster as a center of the pixel cluster having an image-space coordinate, and convert the image-space coordinate to an object-space coordinate of a welding site location for a corresponding metal stud.
9 . The system of claim 8 , further comprising:
a controller configured to, for each pixel cluster of the fourth remaining pixel clusters, align a center of the corresponding metal stud with the object-space coordinate of the welding site location.