A visual inspection system and method for locating welds on injection molded parts
By using high-resolution imaging and image processing technology, combined with dynamic coordinate adjustment and pattern matching, high-precision weld point positioning under complex working conditions is achieved, solving the problems of misjudgment and missed detection in traditional detection methods, and improving welding quality and efficiency.
Patent Information
- Application Number
- CN202511028224.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-07-25
AI Technical Summary
Traditional weld point detection methods struggle to achieve high-precision and high-reliability weld point coordinate positioning under complex working conditions. They are also susceptible to misjudgments and missed detections due to the complex surface texture of the workpiece, minute deformations, slag, and spatter.
High-resolution imaging equipment is used to acquire the surface texture details of the workpiece. Image processing technology is used to extract edge contours and geometric shape matching, coordinate reference is dynamically adjusted, and multi-level precise positioning and correction are performed by combining pattern matching and feature filtering to determine the location of the weld point.
It improves the accuracy and reliability of weld point detection, provides precise coordinate data support, and enhances the quality and production efficiency of automated welding.
Smart Images

Figure CN120852390B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology, and in particular to a visual inspection method and system for locating weld points on injection molded parts. Background Technology
[0002] Accurate weld point location detection is a crucial step in automated welding processes, but traditional detection methods face a series of challenges. First, the complex and varied surface texture of workpieces can easily interfere with weld point identification, leading to misjudgments and missed detections. Second, minor deformations or displacements of the workpiece during production can cause deviations between the actual weld point location and the preset coordinates. Third, impurities such as slag and spatter generated during welding can affect image quality, increasing the difficulty of detection. Furthermore, different types of weld points have varying morphological characteristics, making identification using a unified standard difficult. These factors combined make accurate weld point location a challenging problem. How to accurately capture weld point features under complex working conditions, eliminate the influence of various interference factors, and achieve high-precision, high-reliability weld point coordinate positioning is a pressing technical challenge. This not only relates to ensuring welding quality but also directly affects subsequent process optimization and production efficiency improvement. Therefore, developing a weld point detection method that can adapt to changing environments, has strong anti-interference capabilities, and high positioning accuracy is of great significance for improving the level of automated welding. Summary of the Invention
[0003] In a first aspect, the present invention provides a visual inspection system for locating weld points on injection molded parts, the system comprising:
[0004] The system comprises the following modules: a preliminary position acquisition module, which acquires raw image data of the workpiece on the inspection platform, extracts surface texture details using a high-resolution imaging device, and obtains initial position distribution data; a position deviation acquisition module, which, based on the initial position distribution data, uses image processing technology to extract edge contours from the raw image data to determine the actual position of the workpiece, and generates position deviation data based on the actual position of the workpiece and preset reference coordinates; an adjustment module, which calculates the workpiece position deviation based on the position deviation data and determines whether it exceeds a preset threshold range. If it does, the preset reference coordinates are dynamically adjusted to obtain corrected coordinate reference information; a weld point candidate region determination module, which divides the raw image data into regions based on the corrected coordinate reference information, and locks the target region where the weld point exists based on the deviation-affected region range as a weld point candidate region; a preliminary identification module, which uses a preset pattern matching template library to perform feature comparison on the image grayscale distribution values within the weld point candidate region, and extracts the weld point feature pixel set based on weld point shape constraints and screening rules to obtain the preliminary identification result of the weld point; and a confirmation module, which, based on the preliminary identification result, combines the corrected coordinate reference information and feature point matching accuracy, performs secondary filtering on the weld point feature pixel set to determine the final weld point position coordinate data.
[0005] Preferably, the position deviation acquisition module includes:
[0006] Based on the initial position distribution record, for the original image data, a first image data is generated through noise reduction and contrast enhancement operations; based on the first image data, an edge detection tool is used to extract the contour of the image to generate a second image data containing edge contours; for the second image data, a geometric shape matching method is used to determine the key points of the workpiece boundary, obtain boundary feature description data, and calculate the actual position coordinates based on the boundary feature description data; the actual position of the workpiece is compared with the preset reference coordinates to generate position deviation data.
[0007] Preferably, the adjustment module includes:
[0008] The position deviation data is converted into deviation value and direction information by using a preset offset calculation method; it is determined whether the deviation value exceeds a preset threshold range. If it exceeds the range, the direction information of the deviation data is obtained, and the offset angle and offset amount are calculated based on the direction information and the deviation value to generate corresponding coordinate correction parameters and form corrected coordinate reference information.
[0009] Preferably, the solder joint candidate region determination module includes:
[0010] Based on the corrected coordinate reference information, the original workpiece image is divided into multiple regional units to obtain an initial region set. For the initial region set, the boundary feature data of each regional unit is extracted and compared with a preset deviation influence range parameter. If the boundary feature of a certain regional unit meets the constraint of the deviation influence range, it is marked as a preliminary potential region, generating a preliminary potential region set. For the preliminary potential region set, the geometric shape data of each region is obtained. By comparing the geometric shape data with a preset weld point feature template, regions that meet the conditions are selected to form a filtered potential region list. From the filtered potential region list, the boundary line information of each region is extracted, and the boundary lines are calibrated in conjunction with the corrected coordinate reference information to obtain a calibrated boundary line set. Based on the calibrated boundary line set, the range of the filtered potential region list is adjusted to generate optimized region distribution data. Based on the optimized region distribution data, the final weld point candidate region distribution data is obtained.
[0011] Preferably, the preliminary identification module includes:
[0012] For the candidate solder joint region distribution data, feature templates matching the grayscale distribution values within the target region boundary are obtained from a preset pattern matching template library. The grayscale distribution values are compared pixel-by-pixel to extract a preliminary grayscale feature set. For this preliminary grayscale feature set, the region is divided within the target region boundary. Based on the solder joint shape constraints, the divided regions are judged. If the boundary features of a region meet preset shape requirements, the grayscale feature data of that region is retained, forming a preliminary boundary feature subset. For this preliminary boundary feature subset, the retained grayscale feature data is further filtered using screening rules to obtain a selected set of feature pixel regions. For the selected set of feature pixel regions, feature pixel distribution verification is performed to determine pixel regions consistent with the solder joint shape constraints, resulting in a preliminary solder joint identification result.
[0013] Preferably, the confirmation module includes:
[0014] Initial feature pixel set data is obtained from the preliminary solder joint identification results. Pixels are classified using a preset threshold, and a preliminary pixel set that meets the criteria is selected. For the preliminary pixel set, the position deviation of each pixel is adjusted and calculated based on the corrected coordinate reference information to generate a corrected pixel position set. For the corrected pixel position set, the feature point matching accuracy data is used for detection. If the matching accuracy is lower than the preset threshold, the corresponding pixel is removed, forming a refined pixel set. For the refined pixel set, pixels affected by noise are identified, removed, and verified through detection methods to determine the final solder joint position coordinate data.
[0015] Secondly, a visual inspection method for locating weld points on injection-molded parts is provided. The method includes: acquiring original image data of the workpiece on an inspection platform; extracting surface texture details of the workpiece using a high-resolution imaging device to obtain initial position distribution data of the workpiece; based on the initial position distribution data, using image processing technology to extract edge contours from the original image data to determine the actual position of the workpiece; generating position deviation data based on the actual position of the workpiece and preset reference coordinates; calculating the workpiece position deviation according to the position deviation data and determining whether it exceeds a preset threshold range; if it exceeds the threshold, dynamically adjusting the preset reference coordinates to obtain corrected coordinate reference information; dividing the original image data into regions according to the corrected coordinate reference information, and locking the target region where the weld point exists based on the deviation-affected region range as a candidate region for the weld point; using a preset pattern matching template library to perform feature comparison on the image grayscale distribution values within the candidate region for the weld point, and extracting the feature pixel set of the weld point according to the weld point shape constraints and screening rules to obtain a preliminary identification result of the weld point; and determining the final weld point position coordinate data based on the preliminary identification result, combined with the corrected coordinate reference information and feature point matching accuracy.
[0016] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0017] This invention discloses a precise weld point location detection system. It acquires detailed surface texture of the workpiece through high-resolution imaging, generating a preliminary location distribution record. Image processing techniques are used to extract edge contours, analyze workpiece boundary features, determine actual location coordinates, and generate location deviation analysis data. Based on the deviation vector distribution information, the coordinate reference is dynamically adjusted to divide the weld point candidate region. Pattern matching and feature filtering are used to extract the weld point feature pixel set, followed by secondary filtering and noise reduction. The denoised pixel set is combined with the weld point location model to determine the final weld point coordinates. This invention, through multi-level precise positioning and correction, effectively improves the accuracy and reliability of weld point detection, providing accurate coordinate data support for subsequent process optimization, and has significant practical value. Attached Figure Description
[0018] Figure 1 This is a framework diagram of a visual inspection system for locating weld points on injection molded parts according to the present invention;
[0019] Figure 2 This is a detailed framework diagram of the solder joint candidate region determination module of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] like Figure 1 This embodiment of a visual inspection system for locating weld points on injection molded parts specifically includes:
[0022] The initial position acquisition module acquires the original image data of the workpiece on the inspection platform, uses a high-resolution imaging device to extract the surface texture details of the workpiece, and obtains the initial position distribution data of the workpiece.
[0023] In this embodiment, initial image data of the workpiece on the inspection platform is acquired. A high-resolution imaging device is used to capture the surface texture details of the workpiece, recording the placement and distribution of the workpiece on the platform to form an initial distribution record. For this initial distribution record, image processing tools are used to perform boundary recognition on the initial image data, extracting workpiece contour feature information and generating distribution description data containing contour features. The workpiece center point coordinates are extracted from the distribution description data and combined with the contour feature information to construct a position distribution feature record of the workpiece on the inspection platform. For this position distribution feature record, the workpiece center point coordinates and contour feature information are calibrated to ensure that the generated preliminary position distribution record accurately reflects the actual state of the workpiece on the inspection platform.
[0024] For example, during the acquisition of initial image data of the workpiece, a high-resolution imaging device can be used to perform a comprehensive scan of the workpiece on the inspection platform, capturing its surface texture details. This method ensures that the image data includes subtle features of the workpiece surface, such as tiny scratches or irregular patterns, thus providing reliable basic data for subsequent processing. This approach helps to more accurately identify the workpiece's placement status in subsequent steps, forming an initial distribution record to lay the foundation for boundary recognition and position calibration.
[0025] Specifically, when performing boundary identification on the initial distribution record, image processing tools can be used to perform edge detection on the image data and extract the contour feature information of the workpiece. For example, for a metal workpiece, the tool will identify the continuous lines of its outer edge and convert these lines into distribution description data containing contour features. The advantage of this processing is that it can clearly distinguish the boundary between the workpiece and the background, providing accurate reference data for subsequent extraction of center point coordinates, thereby ensuring the accuracy of the positional distribution features.
[0026] In one embodiment, when extracting the workpiece center point coordinates from the distribution description data, the specific location can be determined by calculating the geometric center within the contour features. Assuming the workpiece is a circular part, the tool calculates the center position based on the contour features and combines this with the contour feature information to construct a record of the workpiece's position distribution features on the inspection platform. This provides a reference point for subsequent calibration, ensuring the integrity and consistency of the position information. Then, during the calibration process of the position distribution feature record, the contour feature information can be fine-tuned by comparing the initial image data with the extracted center point coordinates.
[0027] For example, for a workpiece whose contour may be slightly deviated due to light interference, a calibration tool can be used to correct the contour lines, ensuring that the generated preliminary position distribution record accurately reflects the actual state of the workpiece on the inspection platform. The benefit of this calibration is that it improves the reliability of the position data, providing a more accurate basis for subsequent inspection or processing. Through the close connection of these steps, each step provides the necessary data support for the next, ultimately ensuring the accuracy of the workpiece position distribution record.
[0028] The position deviation acquisition module extracts the edge contours of the original image data based on the initial position distribution data and uses image processing technology to determine the actual position of the workpiece. Based on the actual position of the workpiece and the preset reference coordinates, it generates position deviation data.
[0029] In this embodiment, the original image data is preprocessed using image processing methods. Denoising and contrast enhancement operations generate processed first image data for subsequent boundary feature extraction. Based on the first image data, an edge detection tool is used to extract the contours of the image, generating second image data containing edge contours, providing a basis for determining key points of the workpiece boundary. For the second image data, the workpiece boundary features are analyzed, and a geometric shape matching method is used to determine the key points of the workpiece boundary, obtaining boundary feature description data to calculate the actual position coordinates. If the calculated coordinate values deviate from the preset reference coordinates, the offset is recorded, generating initial position deviation analysis data reflecting the difference between the actual position and the standard position of the workpiece. For example, preprocessing the original image data is particularly crucial when processing workpiece image data. Original images are often affected by light, shadows, or equipment noise, resulting in blurred image details. Denoising operations can effectively reduce noise interference in the image; for example, in workpiece images captured by industrial cameras, removing noise caused by uneven ambient light makes the image clearer. Contrast enhancement, on the other hand, highlights the difference in brightness between the workpiece and the background. For example, in an image with low grayscale, it enhances the brightness contrast of the workpiece edges, thus laying the foundation for subsequent boundary feature extraction. The benefit of this is improved image quality, ensuring that subsequent processing is based on more accurate data.
[0030] When extracting edge contours based on preprocessed image data, the application of edge detection tools is crucial. The core of edge detection lies in identifying regions in the image where brightness changes significantly; these regions typically correspond to the boundaries of a workpiece. For example, when detecting the side contour of a metal workpiece, the edge detection tool scans the locations of abrupt changes in grayscale values in the image, marking these locations as contour lines and generating image data containing edge information. The advantage of this approach is that it can accurately locate the shape features of the workpiece, providing a reliable basis for subsequent determination of key points and reducing the possibility of misjudgment.
[0031] When analyzing workpiece boundary features, geometric shape matching methods can help identify key points on the workpiece. Assuming the workpiece is a rectangular part, by matching predefined rectangular geometric features, the system can find the corresponding positions of the four corners of the workpiece and record the coordinate information of these key points. The advantage of this method is that it can not only identify regular shapes but also adapt to a certain degree of deformation, ensuring accurate extraction of boundary feature description data even with slight workpiece deformation, thus supporting subsequent coordinate calculations.
[0032] Furthermore, when calculating the actual position coordinates of a workpiece, based on boundary feature description data, the coordinates of key points can be compared with preset reference coordinates to determine if any offset exists. For example, when inspecting automotive parts, if the calculated center point coordinates deviate from the preset reference coordinates, the specific offset is recorded, forming position deviation data. The benefit of this approach is that it intuitively reflects the difference between the actual position of the workpiece and the preset reference coordinates, providing an important reference for subsequent correction or adjustment, thus improving inspection accuracy and production efficiency.
[0033] The adjustment module calculates the workpiece position deviation based on the position deviation data and determines whether it exceeds the preset threshold range. If it does, it dynamically adjusts the preset reference coordinates to obtain the corrected coordinate reference information.
[0034] In this implementation, the position deviation data is converted into deviation value and direction information through a preset offset calculation method; it is determined whether the deviation value exceeds a preset threshold range. If it exceeds the range, the direction information of the deviation data is obtained, and the offset angle and offset amount are calculated based on the direction information and the deviation value to generate corresponding coordinate correction parameters and form corrected coordinate reference information.
[0035] Specifically, the difference between the actual coordinates of a workpiece and a standard reference point is quantified. This can be achieved by acquiring the workpiece's actual position data at multiple key points using measuring equipment. For example, when inspecting a metal part on a production line, its designed position might be at a fixed point, but the actual position could deviate due to processing or installation errors. Optical scanning equipment captures the coordinate data of the actual position, compares it with preset standard position data, and calculates the offset distance and direction of each key point, forming preliminary deviation information. The significance of this process lies in concretizing abstract errors into actionable data, laying the foundation for subsequent processing.
[0036] ,
[0037] D represents the deviation value, that is, the magnitude of the positional deviation. Indicates the horizontal positional deviation. This represents the vertical positional deviation, and the total deviation value is calculated using the Euclidean distance formula and compared with a preset threshold.
[0038] ,
[0039] Indicates the offset angle. This represents the horizontal deviation component. The vertical deviation component is represented by the arctangent function, which is used to calculate the direction angle of the deviation and determine the directional information of the position deviation.
[0040] , ,
[0041] and These represent the coordinate correction parameters in the horizontal and vertical directions, respectively. K represents the preset correction coefficient, M represents the measured offset magnitude, and represents the correction direction angle. The offset is decomposed into correction parameters on each coordinate axis using trigonometric functions.
[0042] In one embodiment, when further integrating the preliminary deviation information into complete deviation vector distribution information, deviation data from multiple key points can be summarized and processed. For example, multiple mounting holes of an automotive component can be inspected, and the deviation value and direction of each hole can be calculated separately. These data can then be integrated into an overall deviation distribution map. This distribution map can visually reflect the overall offset trend of the part, such as whether it tilts in a certain direction or whether the deviation is more significant in certain areas. The advantage of this approach is that it allows for a comprehensive understanding of the regularity of the deviations, providing a more accurate basis for subsequent corrections.
[0043] It should be noted that when determining whether a deviation exceeds a preset threshold range, different tolerance standards can be set based on the specific application scenario. For example, in the manufacture of precision instruments, the deviation tolerance may be very small, while in ordinary mechanical parts, the tolerance may be relatively loose.
[0044] In practical applications, the extraction and processing of deviation vector distribution information is particularly crucial. Imagine an image detection scenario where the image captured by a camera might shift due to device shake or environmental interference. In this case, it's necessary to extract the deviation value from the image. Suppose the position of a key point in the image has shifted compared to its standard position; this shift can be represented by a vector. By comparing it with a preset allowable range, if the shift exceeds the expected range, the specific magnitude and distribution characteristics of the shift need to be recorded, such as whether the shift is to the left or right, and the magnitude of the shift. This information provides the basis for subsequent adjustments, enabling timely problem detection and laying the data foundation for accurate correction. For example, after obtaining preliminary deviation assessment data, the next step is to focus on the directional characteristics of the deviation vector. Continuing with the image detection scenario above, assuming the key point's shift direction is downward to the left, analyzing this directional characteristic allows us to calculate the angle and shift that the coordinate system needs to be adjusted. Extracting the directional characteristic helps determine the direction of correction, such as whether it's a clockwise or counterclockwise rotation, and the specific distance of translation required. After generating the corresponding correction parameters, these parameters will be saved as a set for subsequent coordinate adjustments. The advantage of this approach is that it allows for customized corrections based on specific deviation directions, thereby improving the accuracy of the adjustments.
[0045] When applying the set of correction parameters to the coordinate reference, in practice, it can be understood as repositioning the reference point of the image detection device. Taking the above scenario as an example, if the original reference point cannot be accurately aligned with the target area due to offset, then by adjusting the correction parameters, the reference point can be repositioned to a position that better meets the actual needs. This process ensures that subsequent detection work is based on an accurate foundation, thereby improving the overall reliability of the detection. The benefits of such adjustments are obvious; they reduce misjudgments caused by coordinate deviations.
[0046] The solder joint candidate region determination module divides the original image data into regions based on the corrected coordinate reference information, and locks the target region where the solder joint exists by combining the deviation influence region range, as the solder joint candidate region;
[0047] In this embodiment, please refer to the appendix for details. Figure 2The weld point candidate region determination module includes: an initial region set generation module, a preliminary potential region combination generation module, a filtering module, a calibration module, and a determination module. Specifically, the initial region set generation module performs preliminary division of the original workpiece image into multiple region units based on the corrected coordinate reference information, obtaining an initial region set. The preliminary potential region combination generation module extracts the boundary feature data of each region unit from the initial region set and compares it with a preset deviation influence range parameter. If the boundary feature of a certain region unit meets the constraint of the deviation influence range, it is marked as a preliminary potential region, generating a preliminary potential region set. The filtering module obtains the geometric shape data of each region from the preliminary potential region set, and determines which regions are more consistent with the characteristics of possible weld points by comparing the geometric shape data with a preset weld point feature template, filtering out the regions that meet the conditions to form a filtered potential region list. The calibration module extracts the boundary line information of each region from the filtered potential region list, and performs position calibration on the boundary lines based on the corrected coordinate reference information, obtaining a calibrated boundary line set. The determination module adjusts the range of the filtered potential region list based on the calibrated boundary line set. If the boundary line of a certain region overlaps with the boundary line of an adjacent region, the boundary range of that region is optimized and adjusted to generate optimized region distribution data. Using the optimized region distribution data, the spatial relationship between each region is analyzed. If the spatial relationship between a certain region and other regions does not conform to the preset distribution constraints, it is eliminated, resulting in the final solder joint candidate region distribution data. This data contains boundary information for multiple potential solder joint regions.
[0048] Specifically, the initial segmentation process for the original workpiece image can be understood as cutting the entire image into multiple small regional units according to a certain grid or feature distribution. The purpose of this segmentation is to decompose the complex image into more easily processed local units for subsequent analysis. For example, when processing an image of weld points on a metal plate, the image can be divided into multiple small square regions, each serving as an independent analysis object. Such segmentation helps focus on local features, avoids interference from the complexity of the global image, and allows for more precise location of areas where weld points may exist.
[0049] In one embodiment, the process of extracting boundary feature data of region units and comparing it with the deviation influence range parameter can be viewed as a detailed examination of the edge characteristics of each small region. Boundary feature data may include information such as edge continuity and curvature changes, while the deviation influence range parameter is a predefined range of possible boundary shapes for solder joints. For example, in a metal plate image, solder joints typically exhibit circular or near-circular boundary features. If the boundary of a small region exhibits a similar circular outline and meets preset range constraints, it will be marked as a preliminary potential region. The advantage of this approach is that it allows for rapid filtering of regions that meet the criteria, reducing the computational load of subsequent processing and improving efficiency.
[0050] Furthermore, the step of acquiring geometric shape data for the initial potential region set can be further confirmed by analyzing the shape characteristics of each region to determine whether it approximates the typical shape of a solder joint. For example, in metal plate images, the geometry of a solder joint is usually close to a circle or ellipse. Therefore, the shape parameters of the region, such as aspect ratio or area distribution, can be calculated and compared with a preset solder joint feature template. After filtering out the regions that meet the criteria, a list of potential regions is formed, and then the boundary lines are calibrated. This calibration incorporates coordinate reference information to ensure more accurate positioning of the boundary lines, laying the foundation for subsequent range adjustments. This processing method can effectively improve the accuracy of region division.
[0051] Furthermore, adjusting the range of overlapping boundary lines and analyzing their spatial relationships can be seen as a further optimization of the candidate regions. For example, in a metal plate image, if the boundary lines of two candidate regions overlap, it may be due to image noise or segmentation errors. In this case, the boundary range needs to be adjusted to avoid repeatedly identifying the same solder joint. Simultaneously, by examining the spatial relationships between regions—for example, solder joints are usually not densely distributed—if the distance between a region and other regions does not meet preset constraints, it will be eliminated. The purpose of this optimization is to ensure that the final distribution data of the solder joint candidate regions better conforms to the actual distribution patterns, reducing the possibility of misjudgment.
[0052] It's important to note that the processes described above are closely interconnected. From initial segmentation to boundary feature comparison, and then to geometric shape selection and range optimization, each step provides a more accurate data foundation for the next. For example, the initially segmented regional units directly affect the accuracy of boundary feature extraction, while boundary feature selection provides reliable candidate objects for subsequent geometric shape comparison. Finally, through range adjustment and spatial relationship analysis, distribution data containing boundary information of multiple potential solder joint regions is obtained. This progressive approach not only improves the accuracy of localization but also provides a reliable basis for subsequent solder joint identification.
[0053] The preliminary identification module uses a preset pattern matching template library to perform feature comparison on the image grayscale distribution values in the candidate area of the solder joint, and extracts the feature pixel set of the solder joint according to the shape constraints and screening rules of the solder joint to obtain the preliminary identification result of the solder joint.
[0054] In this embodiment, for the candidate solder joint region distribution data, feature templates matching the grayscale distribution values of the image within the boundary line of the target region are obtained from a preset pattern matching template library. The grayscale distribution values are compared pixel-by-pixel to extract a preliminary grayscale feature set. Based on the preliminary grayscale feature set, the region is divided within the boundary line of the target region. The divided regions are judged according to the solder joint shape constraints. If the boundary features of a region meet the preset shape requirements, the grayscale feature data of that region is retained, forming a preliminary boundary feature subset. Specifically, the following formula can be used to determine whether the region boundary meets the solder joint shape constraints:
[0055] ,
[0056] This represents the boundary shape conformity evaluation index, where P represents the perimeter of the region boundary, A represents the area of the region, and M represents the number of shape feature parameters. This represents the k-th actual shape feature value. This represents the preset reference shape feature value. Represents the maximum permissible deviation of shape features, based on the boundary shape conformity evaluation index. If the area is smaller than the preset shape requirement threshold, the region is retained and forms a preliminary subset of boundary features. For this preliminary subset, a selection rule is used to further filter the retained grayscale feature data, removing regions that do not meet the requirements, thus obtaining a selected set of feature pixel regions. For this selected set of feature pixel regions, feature pixel distribution verification is performed to determine pixel regions consistent with the solder joint shape constraints, resulting in a preliminary solder joint identification result. This preliminary identification result includes the initially determined solder joint regions.
[0057] Specifically, the processing of candidate weld point region distribution data first requires obtaining feature templates from a pre-defined pattern matching template library that match the grayscale distribution values within the target region's boundary. This process can be understood as comparing the grayscale values in the image with the standard grayscale distribution in the template pixel by pixel.
[0058] In one possible implementation, assume that the image grayscale values of a candidate solder joint region exhibit a distribution characteristic of being bright in the center and dark at the edges. A template library stores various standard patterns of solder joint grayscale distributions. By comparison, a set of grayscale features similar to the templates can be extracted. This step serves to initially filter out regions that may match the solder joint characteristics, laying the foundation for subsequent processing. Next, based on the extracted preliminary grayscale feature set, the target region needs to be divided within its boundary lines, and a judgment is made based on the shape constraints of the solder joint. For example, the shape of a solder joint is usually close to a circle or ellipse. If the boundary features of a certain region exhibit a relatively regular curve, the grayscale feature data of that region can be retained, forming a preliminary subset of boundary features. The significance of this process is to reduce the possibility of misjudgment through shape constraints, ensuring that the retained regions are closer to the characteristics of the actual solder joint.
[0059] Furthermore, for the initial subset of boundary features, a selection rule is used to filter the retained grayscale feature data. For example, in one embodiment, if the grayscale value distribution of a certain region is uneven or the boundary features are incomplete, it is discarded, ultimately obtaining a selected set of feature pixel regions. This step can further improve the accuracy of the feature data and avoid noise interference in subsequent recognition.
[0060] Finally, for the selected set of feature pixel regions, feature pixel distribution verification is performed to determine pixel regions consistent with the solder joint shape constraints. For example, by checking whether the distribution of pixel regions conforms to a preset shape ratio, it can be confirmed whether it is a solder joint region, ultimately obtaining a recognition result containing the preliminarily identified solder joint regions. This step ensures the reliability of the recognition result and provides a reliable basis for subsequent more refined processing. Through the above progressive processing method, the accuracy of solder joint recognition can be effectively improved, and the possibility of misjudgment can be reduced.
[0061] The confirmation module, based on the preliminary identification results and combined with the corrected coordinate reference information and feature point matching accuracy, performs secondary filtering and further verification on the solder joint feature pixel set to determine the final solder joint position coordinate data.
[0062] In this embodiment, initial feature pixel set data is obtained from the preliminary solder joint identification results. For this feature pixel set data, pixels are classified using a preset threshold, and a preliminary pixel set meeting the criteria is selected, while pixels that clearly do not meet the feature requirements are excluded, providing basic data for subsequent correction. For the preliminary pixel set, the positional deviation of each pixel is adjusted and calculated based on the corrected coordinate reference information, generating a corrected pixel position set to ensure that the pixel position data is consistent with the reference information, laying the foundation for further refinement. For the corrected pixel position set, feature point matching accuracy data is used for detection. If the matching accuracy is lower than a preset threshold, the corresponding pixel is removed, forming a refined pixel set to reduce the impact of matching errors on subsequent processing. For the refined pixel set, a secondary filtering process is implemented, identifying and removing pixels affected by noise through detection methods, determining the denoised pixel set, which is used for the final calculation of solder joint position coordinates, ensuring that the data accuracy meets business requirements.
[0063] Specifically, the process of obtaining the initial feature pixel set data from the preliminary solder joint identification results can be understood as the initial extraction process of solder joint regions in image processing. For example, in one possible implementation, assuming the circuit board image captured by the camera contains multiple solder joint regions, the image is first processed into grayscale, and the brightness values of the pixels are compared with a preset threshold. Pixels whose brightness values match the solder joint features are selected to form a preliminary pixel set. The purpose of this is to quickly eliminate interfering pixels in the background or non-solder joint areas, providing a clear data foundation for subsequent more accurate processing and effectively improving recognition efficiency. Next, the process of adjusting the position deviation of the preliminary pixel set in conjunction with the corrected coordinate reference information can be regarded as a fine-tuning correction of the pixel positions. For example, in real-world scenarios, the camera may cause a certain degree of image distortion due to angle or distance. In this case, the position of each pixel in the preliminary pixel set is mapped and corrected using pre-calibrated coordinate reference information to generate a corrected pixel position set. The purpose of this process is to ensure that the position data of the pixel points are consistent with the actual position of the solder joints on the circuit board, thereby laying an accurate coordinate foundation for subsequent refining processes and avoiding recognition errors caused by positional deviations.
[0064] Furthermore, the process of detecting the corrected pixel location set in conjunction with the feature point matching accuracy can be understood as a re-verification of pixel reliability. For example, on a production line, some pixels may have low feature matching accuracy due to light reflection or surface contamination. In this case, a preset matching accuracy threshold is used to filter out pixels with substandard matching accuracy, forming a refined pixel set. The advantage of this is that it reduces misjudgments caused by matching errors, ensuring that the pixel data processed subsequently is more reliable.
[0065] Furthermore, the process of performing secondary filtering on the refined pixel set to remove noise interference can be seen as the final guarantee of data purity. For example, in complex environments, circuit board images may contain noisy pixels caused by dust or debris. Specialized detection methods are used to identify and remove these interfering pixels, ultimately determining the denoised pixel set. The significance of this step is to ensure that the data used for the final solder joint position coordinate calculation is as clean as possible, thereby improving the accuracy and stability of solder joint positioning and providing reliable support for subsequent soldering or inspection processes.
[0066] Furthermore, the positional deviation of each coordinate point is further verified, and its matching degree with typical solder joint features in the model is calculated. If the matching degree is lower than a preset threshold, it is removed, resulting in a refined set of coordinate points. The spatial distribution information of each coordinate point is obtained from the refined set. Consistency checks are performed on the distance and direction features between adjacent coordinate points. If a coordinate point is found to deviate from the distribution pattern of other points, it is marked as a noise point and removed, forming the final selected set of coordinate points. For the final selected set of coordinate points, the final position data of each coordinate point is determined and output as the solder joint position coordinate data. This ensures that the output data conforms to the distribution pattern of solder joint features, achieving accurate solder joint location.
[0067] In one embodiment, verifying the positional deviation of initially screened coordinate points using a pre-established weld point location model can be viewed as a feature matching process. Weld point location models are typically built based on extensive historical data, encompassing features such as the shape, size, and positional relationships of typical weld points. If, in an automated welding inspection device, the position of a coordinate point deviates significantly from the characteristics of typical weld points in the model—for example, if its position deviates from the central region of a conventional weld point—this point may be considered invalid data and discarded. This approach further improves data accuracy, ensuring that subsequently processed coordinate points are closer to actual weld points. For instance, when performing spatial distribution consistency checks on a refined set of coordinate points, the rationality can be determined by analyzing the distance and directional characteristics between adjacent coordinate points. In a specific welding inspection scenario, if a coordinate point's distance from other adjacent points is significantly larger, or its direction is inconsistent with the overall distribution trend—for example, other points are linearly arranged while this point deviates from a straight trajectory—this point may be marked as noise and discarded. This detection method effectively filters out abnormal points introduced by environmental interference or data acquisition errors, improving the reliability of the final result.
[0068] Finally, determining the final set of selected coordinate points and outputting the weld point location coordinate data can be seen as integrating and confirming all processing results. Assuming that in a high-precision welding inspection task, the set of coordinate points after multiple rounds of selection is very close to the actual weld point distribution, using these coordinate points as the final data output ensures that the inspection results conform to the characteristic distribution patterns of weld points. This step-by-step refinement method not only improves the accuracy of positioning but also provides a reliable basis for subsequent welding quality assessment. Through this processing flow, each step is closely linked, working together to achieve the goal of accurate weld point location.
[0069] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A visual inspection system for locating weld points on injection molded parts, characterized in that, The system includes: The initial position acquisition module acquires the original image data of the workpiece on the inspection platform, uses a high-resolution imaging device to extract the surface texture details of the workpiece, and obtains the initial position distribution data of the workpiece. The position deviation acquisition module extracts the edge contour of the original image data based on the initial position distribution data and uses image processing technology to determine the actual position of the workpiece. Based on the actual position of the workpiece and the preset reference coordinates, it generates position deviation data. The adjustment module calculates the workpiece position deviation based on the position deviation data and determines whether it exceeds the preset threshold range. If it does, it dynamically adjusts the preset reference coordinates to obtain the corrected coordinate reference information. The solder joint candidate region determination module divides the original image data into regions based on the corrected coordinate reference information, and locks the target region where the solder joint exists by combining the deviation influence region range, as the solder joint candidate region; The preliminary identification module uses a preset pattern matching template library to perform feature comparison on the image grayscale distribution values within the candidate solder joint area, and extracts the feature pixel set of the solder joint based on the solder joint shape constraints and screening rules to obtain the preliminary identification result of the solder joint. Specifically, it includes: for the distribution data of the candidate solder joint area, obtaining feature templates that match the image grayscale distribution values within the target area boundary line from the preset pattern matching template library, performing pixel-by-pixel comparison on the image grayscale distribution values, and extracting a preliminary grayscale feature set; For the initial grayscale feature set, the target area is divided into regions within the boundary line. Based on the solder joint shape constraints, the divided regions are judged. If the boundary features of a region meet the preset shape requirements, the grayscale feature data of that region is retained, forming an initial boundary feature subset. For this initial boundary feature subset, a selection rule is used to further filter the retained grayscale feature data, obtaining a refined set of feature pixel regions. For the refined set of feature pixel regions, feature pixel distribution verification is performed to determine pixel regions consistent with the solder joint shape constraints, thus obtaining the initial solder joint recognition result. The confirmation module, based on the preliminary identification results and combined with the corrected coordinate reference information and feature point matching accuracy, performs secondary filtering on the solder joint feature pixel set, determines whether the filtered coordinate points conform to the solder joint feature distribution pattern, and determines the final solder joint position coordinate data.
2. The system as described in claim 1, characterized in that, The position deviation acquisition module includes: Based on the initial location distribution record, the first image data is generated by denoising and contrast enhancement operations on the original image data; Based on the first image data, an edge detection tool is used to extract the contours of the image, generating second image data containing edge contours; For the second image data, a geometric shape matching method is used to obtain boundary feature description data, and the actual position coordinates are calculated based on the boundary feature description data; The actual position of the workpiece is compared with the preset reference coordinates to generate position deviation data.
3. The system as described in claim 1, characterized in that, The adjustment module includes: The position deviation data is converted into deviation value and directional information using a preset offset calculation method. Determine whether the deviation value exceeds the preset threshold range. If it does, obtain the directional information of the deviation data, calculate the offset angle and offset amount based on the directional information and the deviation value, generate the corresponding coordinate correction parameters, and form the corrected coordinate reference information.
4. The system as described in claim 1, characterized in that, The solder joint candidate region determination module includes: Based on the corrected coordinate reference information, the original workpiece image is divided into multiple region units to obtain an initial region set. For the initial set of regions, the boundary feature data of each region unit is extracted and compared with the preset deviation influence range parameter. If the boundary features of a certain region unit meet the constraint of the deviation influence range, it is marked as a preliminary potential region and a preliminary potential region set is generated. For the initial set of potential regions, the geometric shape data of each region is obtained. By comparing the geometric shape data with the preset weld point feature template, regions that meet the conditions are filtered out to form a list of potential regions after filtering. From the filtered list of potential regions, the boundary line information of each region is extracted, and the boundary lines are calibrated in conjunction with the corrected coordinate reference information to obtain a set of calibrated boundary lines. Based on the calibrated set of boundary lines, the range of the filtered potential region list is adjusted to generate optimized region distribution data. Based on the optimized region distribution data, the final solder joint candidate region distribution data is determined.
5. The system as described in claim 1, characterized in that, The confirmation module includes: Initial feature pixel set data is obtained from the preliminary identification results of solder joints. The pixels are classified using a preset threshold, and a preliminary pixel set that meets the conditions is selected. For the initial pixel set, the positional deviation of each pixel is adjusted and calculated based on the corrected coordinate reference information to generate the corrected pixel position set; For the corrected set of pixel positions, detection is performed by combining feature point matching accuracy data. If the matching accuracy is lower than a preset threshold, the corresponding pixel is removed to form a refined set of pixel points. For the refined pixel set, the pixels affected by noise are identified and removed through detection methods, and the final solder joint position coordinate data are determined.
6. A visual inspection method for locating weld points on injection molded parts, characterized in that, The visual inspection method, applied to the visual inspection system as described in any one of claims 1-5, comprises: The original image data of the workpiece on the inspection platform is acquired, and the surface texture details of the workpiece are extracted using a high-resolution imaging device to obtain the initial position distribution data of the workpiece. Based on the initial position distribution data, image processing technology is used to extract the edge contours of the original image data to determine the actual position of the workpiece, and position deviation data is generated based on the actual position of the workpiece and the preset reference coordinates. Based on the position deviation data, calculate the workpiece position deviation and determine whether it exceeds the preset threshold range. If it does, dynamically adjust the preset reference coordinates to obtain the corrected coordinate reference information. Based on the corrected coordinate reference information, the original image data is divided into regions, and the target region where the solder joint exists is locked by combining the range of the deviation-affected region, which is used as the candidate region for the solder joint. The grayscale distribution values of the image within the candidate area of the solder joint are compared using a preset pattern matching template library. Based on the shape constraints and screening rules of the solder joint, the feature pixel set of the solder joint is extracted to obtain the preliminary identification result of the solder joint. Based on the preliminary identification results, combined with the corrected coordinate reference information and feature point matching accuracy, the final weld point position coordinate data are determined.
7. The method as described in claim 6, characterized in that, The obtained corrected coordinate reference information includes: The position deviation data is converted into deviation value and directional information using a preset offset calculation method. Determine whether the deviation value exceeds the preset threshold range. If it does, obtain the directional information of the deviation data, calculate the offset angle and offset amount based on the directional information and the deviation value, generate the corresponding coordinate correction parameters, and form the corrected coordinate reference information.
Citation Information
Patent Citations
Electric welding spot binocular vision positioning method and device based on shape descriptor
CN111862193A
Workpiece position correction method and device
CN112722765A