Part size online detection method and system based on linear array camera

Through the online detection method of part size based on line array cameras, combined with feature analysis, dual clamping data acquisition and adaptive edge monitoring technology, the problems of low accuracy and poor efficiency of part size detection in the existing technology are solved, and efficient and accurate part size detection is achieved.

CN119006419BActive Publication Date: 2025-04-29JIAXING YUNCUT SUPPLY CHAIN MANAGEMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411103469.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2025-04-29
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

The prior art has problems of low accuracy and poor efficiency in part size detection, especially when detecting high-speed moving parts, it is difficult to capture clear images, which affects the detection accuracy.

Method used

The online detection method of part size based on line array camera is adopted, and the linear array camera is configured through feature analysis, and the dual-clip data acquisition and positioning recognition technology is used to perform adaptive edge monitoring of images and dynamic contrast enhancement to achieve part feature matching and relative size recognition.

Benefits of technology

It improves the efficiency and accuracy of part size detection, can accurately capture part characteristics under high-speed motion conditions, and enhances real-time and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006419B_ABST
    Figure CN119006419B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for online detection of part dimensions based on a linear array camera, and relates to the technical field of part dimension detection, including: performing feature analysis of parts, configuring linear array cameras based on feature analysis results; when parts pass through corresponding areas through a clamping scheme, performing data acquisition through corresponding linear array cameras, and establishing a first image set and a second image set; setting a positioning recognition zero point based on the clamping scheme, mapping the positioning recognition zero point between the first image set and the second image set, performing image adaptive edge monitoring, and establishing a fuzzy image edge; performing dynamic contrast enhancement of the fuzzy image edge, and establishing an enhanced edge; performing part feature matching through the enhanced edge, and performing relative size recognition output according to the feature matching results and the positioning recognition zero point. The present invention solves the technical problems of low precision and poor efficiency in part dimension detection in the prior art, and achieves the technical effect of improving part dimension detection efficiency and detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of part size detection, and in particular to a method and system for online detection of part size based on a linear array camera. Background Art

[0002] With the continuous development of modern manufacturing, accurate detection of part dimensions is particularly important in product quality control. Traditional part dimension detection methods usually rely on manual measurement or offline detection equipment. Although these methods can meet production needs to a certain extent, they are inadequate in large-scale, high-speed production line environments. Manual measurement is not only inefficient, but also easily affected by human factors, making it difficult to ensure the accuracy and consistency of the measurement results. Offline detection equipment cannot meet the real-time requirements of the production line, which can easily cause production bottlenecks.

[0003] Online inspection technology is the key to solving the above problems because it can detect the dimensions of parts in real time during the production process. However, most online inspection systems on the market currently use dot array cameras or area array cameras. Although these technologies have improved the inspection efficiency to a certain extent, it is still difficult to capture clear images when facing high-speed moving parts, which in turn affects the inspection accuracy. Summary of the invention

[0004] The present application provides a method and system for online detection of part dimensions based on a linear array camera, which is used to solve the technical problems of low accuracy and poor efficiency in the prior art for detecting part dimensions.

[0005] In view of the above problems, the present application provides a method and system for online detection of part dimensions based on a linear array camera.

[0006] In a first aspect of the present application, a method for online detection of part dimensions based on a linear array camera is provided, the method comprising:

[0007] Perform feature analysis of the part, configure a line array camera based on the feature analysis result, wherein the line array camera includes a first line array camera and a second line array camera, the first line array camera corresponds to a first clamping scheme, and the second line array camera corresponds to a second clamping scheme, and the feature analysis is an analysis based on the part information after the part information is collected; when the part passes through a first area through the first clamping scheme, data collection is performed by the first line array camera set in the first area to establish a first image set; when the part passes through a second area through the second clamping scheme, data collection is performed by the second line array camera set in the second area to establish a second image set; a positioning recognition zero point is set based on the first clamping scheme and the second clamping scheme, and after the positioning recognition zero point is mapped between the first image set and the second image set, adaptive edge monitoring of the image is performed to establish a blurred image edge; dynamic contrast enhancement of the blurred image edge is performed to establish an enhanced edge, and the specific enhancement is as follows: I g (x,y)=I(x,y)+α·tanh(β·(I(x,y)-T(x,y))); wherein I(x,y) is the original image, T(x,y) is the edge of the blurred image, α is a parameter for controlling the enhancement intensity, and β is a parameter for controlling the enhancement contrast; part feature matching is performed through the enhanced edge, and relative size recognition output is performed based on the feature matching result and the positioning recognition zero point.

[0008] A second aspect of the present application provides an online detection system for part dimensions based on a linear array camera, the system comprising:

[0009] A linear array camera configuration module, wherein the linear array camera configuration module performs feature analysis of the part and configures the linear array camera based on the feature analysis result, wherein the linear array camera includes a first linear array camera and a second linear array camera, wherein the first linear array camera corresponds to a first clamping scheme, and the second linear array camera corresponds to a second clamping scheme, and the feature analysis is an analysis based on the part information after the part information is collected; a first image set establishment module, wherein when the part passes through the first area through the first clamping scheme, the first image set establishment module performs data acquisition through the first linear array camera set in the first area to establish a first image set; a second image set establishment module, wherein when the part passes through the second area through the second clamping scheme, the second image set establishment module performs data acquisition through the second linear array camera set in the second area to establish a second image set; a fuzzy image edge establishment module, wherein the fuzzy image edge establishment module sets a positioning recognition zero point based on the first clamping scheme and the second clamping scheme, and after mapping the positioning recognition zero point between the first image set and the second image set, performs adaptive edge monitoring of the image to establish a fuzzy image edge; an edge enhancement module, wherein the edge enhancement module performs dynamic contrast enhancement of the fuzzy image edge to establish an enhanced edge, and the specific enhancement is as follows: Ig (x,y)=I(x,y)+α·tanh(β·(I(x,y)-T(x,y))); wherein, I(x,y) is the original image, T(x,y) is the blurred image edge, α is a parameter for controlling the enhancement intensity, and β is a parameter for controlling the enhancement contrast; a relative size recognition output module, wherein the relative size recognition output module performs part feature matching through the enhanced edge, and performs relative size recognition output according to the feature matching result and the positioning recognition zero point.

[0010] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0011] The present application performs feature analysis of parts, configures a line array camera based on the feature analysis result, wherein the line array camera includes a first line array camera and a second line array camera, the first line array camera corresponds to a first clamping scheme, and the second line array camera corresponds to a second clamping scheme, and the feature analysis is an analysis based on the part information after the part information is collected; when the part passes through a first area through the first clamping scheme, data collection is performed by the first line array camera set in the first area to establish a first image set; when the part passes through a second area through the second clamping scheme, data collection is performed by the second line array camera set in the second area to establish a second image set; a positioning recognition zero point is set based on the first clamping scheme and the second clamping scheme, and after the positioning recognition zero point is mapped between the first image set and the second image set, adaptive edge monitoring of the image is performed to establish a blurred image edge; dynamic contrast enhancement of the blurred image edge is performed to establish an enhanced edge, and the specific enhancement is as follows: I g (x,y)=I(x,y)+α·tanh(β·(I(x,y)-T(x,y))); wherein I(x,y) is the original image, T(x,y) is the edge of the blurred image, α is a parameter for controlling the enhancement strength, and β is a parameter for controlling the enhancement contrast; part feature matching is performed through the enhanced edge, and relative size recognition output is performed based on the feature matching result and the positioning recognition zero point. The present invention solves the technical problems of low precision and poor efficiency in part size detection in the prior art, and achieves the technical effect of improving the efficiency and accuracy of part size detection by using technologies such as feature analysis, precise configuration of linear array cameras, dual-clamping data acquisition, positioning recognition, and edge monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0013] Figure 1 A schematic diagram of the process flow of an online detection method for part size based on a linear array camera provided in an embodiment of the present application;

[0014] Figure 2 A schematic diagram of the structure of an online part size detection system based on a linear array camera provided in an embodiment of the present application.

[0015] Explanation of the reference numerals: linear array camera configuration module 11 , first image set establishment module 12 , second image set establishment module 13 , blurred image edge establishment module 14 , edge enhancement module 15 , relative size recognition output module 16 . DETAILED DESCRIPTION

[0016] The present application provides a method and system for online detection of part dimensions based on a linear array camera, aiming to solve the technical problems of low precision and poor efficiency in the prior art for part dimension detection. By using feature analysis, precise configuration of linear array cameras, double-clamping data acquisition, positioning recognition, edge monitoring and other technologies, the technical effect of improving the efficiency and accuracy of part dimension detection is achieved.

[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0018] It should be noted that the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or modules that are not explicitly listed or inherent to these processes, methods, products or devices.

[0019] Embodiment 1

[0020] like Figure 1 As shown, the present application provides a method for online detection of part dimensions based on a linear array camera, the method comprising:

[0021] Step S100: perform feature analysis of the part, and configure a line array camera based on the feature analysis result, wherein the line array camera includes a first line array camera and a second line array camera, the first line array camera corresponds to a first clamping scheme, and the second line array camera corresponds to a second clamping scheme, and the feature analysis is an analysis completed based on the part information after the part information of the part is collected.

[0022] In an embodiment of the present application, a 3D scanner or high-precision measuring equipment is used to comprehensively scan the parts to obtain information about the parts, such as shape, size, material properties, surface texture, etc.

[0023] Computer vision and image processing techniques, such as edge detection and corner detection algorithms, are used to extract key features from the part information set. Key features include part outlines, hole locations, protrusions and grooves, etc. Next, feature analysis is performed to identify and analyze the overall structure of the part, local details, and possible obstructions or difficult-to-observe areas. At the same time, blind areas that may exist in the first clamping solution are identified, that is, areas that are difficult for the camera to capture in the first clamping position.

[0024] Based on the feature analysis results of the part, select a line scan camera with high resolution and high sensitivity to ensure that the subtle features of the part can be captured. Corresponding to the first clamping scheme, set the first line scan camera in the first clamping area of ​​the part. Adjust the position and shooting angle of the camera to maximize the shooting range and reduce blind spots while ensuring that key features are clearly visible. According to the size and shape of the part, accurately adjust the camera's focal length, field of view, and resolution settings to obtain high-quality image data.

[0025] Corresponding to the second clamping scheme, a second line scan camera is set in the second clamping area of ​​the part. The main task of this camera is to capture the blind area that cannot be observed in the first clamping scheme. By precisely adjusting the position and angle of the camera, as well as optimizing the focal length and exposure settings, ensure that the features in the blind area can be clearly and accurately photographed. Use a precise synchronous trigger mechanism to ensure that the two line scan cameras can accurately shoot when the part moves to the corresponding clamping position. Through the above process, the configuration of the line scan camera is completed.

[0026] Step S200: When a part passes through a first area through a first clamping solution, data is collected by a first line array camera arranged in the first area to create a first image set.

[0027] In the embodiment of the present application, the existing mechanical clamping technology is used to ensure that the part is stably fixed in the first clamping solution. The part is accurately and smoothly moved to the shooting area of ​​the first linear array camera through an electric slide rail or a precision mechanical arm.

[0028] Data of the part is collected by a first line array camera disposed in the first area to obtain a first image set.

[0029] Step S300: When the part passes through the second area through the second clamping solution, data acquisition is performed by a second line array camera arranged in the second area to establish a second image set.

[0030] In the embodiment of the present application, the second clamping solution is used to ensure that the part is stably and accurately fixed in the second area. The part is smoothly transported to the shooting range of the second linear array camera by an electric slide rail or a precision mechanical arm.

[0031] In the second area, a second line array camera is installed to continuously shoot the parts using high-speed image acquisition technology to ensure that every detail and dynamic change of the parts in the second area can be captured.

[0032] The captured images are sorted and classified, and organized according to the shooting sequence or feature type to form a second image set.

[0033] Step S400: setting a positioning identification zero point based on the first clamping scheme and the second clamping scheme, mapping the positioning identification zero point between the first image set and the second image set, performing adaptive edge monitoring of the image, and establishing a fuzzy image edge.

[0034] In the embodiment of the present application, according to the specific design of the first clamping scheme and the second clamping scheme, a fixed and easily identifiable position is selected as the positioning identification zero point. This position is a specific point, line or mark on the part, which can be reliably identified and located under both clamping schemes. Before actual operation, the positioning identification zero point is calibrated, which is achieved by physical marking or feature point selection in image processing software.

[0035] Then, image processing algorithms, such as template matching and feature detection algorithms, are used to find the position corresponding to the calibration zero point in the first image set and the second image set. Since the spatial position and posture of the parts vary due to different clamping schemes, the coordinates of the zero point position found are transformed to ensure that the coordinate system in different image sets remains consistent.

[0036] According to the specific characteristics of the image, an adaptive edge detection algorithm that can automatically adjust parameters according to the local characteristics of the image is selected to improve the accuracy and robustness of the detection. The selected adaptive edge detection algorithm is applied to the first image set and the second image set to detect the edge information of the part.

[0037] In order to deal with the noise and unclear areas in the image, the detected edges are blurred by using blur filters or morphological operations. After blurring, the original clear edges are transformed into blurred image edges.

[0038] Step S500: Dynamically enhance the contrast of the blurred image edge to establish an enhanced edge. The specific enhancement is as follows:

[0039] I g(x,y)=I(x,y)+α·tanh(β·(I(x,y)-T(x,y)));

[0040] Among them, I(x, y) is the original image, T(x, y) is the blurred image edge, α is the parameter controlling the enhancement strength, and β is the parameter controlling the enhancement contrast.

[0041] In the embodiment of the present application, α is a parameter for controlling the enhancement strength. This parameter controls the enhancement strength. A positive value will increase the contrast, making the edge more obvious; a negative value will reduce the contrast, making the image smoother. β is a parameter for controlling the enhancement contrast. A larger β value will cause the edge contrast to change more sharply, thereby highlighting the edge features.

[0042] For each pixel (x, y) in the image, the enhanced pixel intensity is calculated according to the above formula, which achieves dynamic enhancement of contrast by calculating the difference between the original image and the blurred image edge and applying the hyperbolic tangent function to nonlinearly enhance this difference.

[0043] Step S600: performing part feature matching through the enhanced edge, and performing relative size recognition output according to the feature matching result and the positioning recognition zero point.

[0044] In the embodiment of the present application, the image after dynamic contrast enhancement is processed, and an edge detection algorithm such as Canny edge detection is applied to identify and extract the enhanced edge features. Features meaningful for subsequent matching, such as obvious corner points, straight lines or curve segments, are screened out from the detected edges.

[0045] Next, feature matching algorithms such as SIFT, SURF, and ORB are used to compare the extracted edge features with the features in the feature database. The feature database includes typical feature images or templates of various parts. The best matching feature pair is found by calculating the similarity between features, such as Euclidean distance and Hamming distance.

[0046] Then, the zero point is used as a reference to perform spatial transformations on the matched features, such as rotation and scaling, to achieve alignment. According to the positional relationship between the aligned features and the zero point, the relative position and size of each feature on the part are calculated through geometric transformation and coordinate system conversion. Based on the aligned features and the zero point position, the key dimensions of the part, such as length and angle, are calculated through geometric measurement algorithms. Finally, the calculated relative size data is displayed in text, charts or other visual forms to complete the relative size recognition output.

[0047] Furthermore, step S500 in the method provided in the application embodiment also includes:

[0048] The pixel gradient amplitude is calculated for the edge of the blurred image, and the first constraint data is generated according to the pixel gradient amplitude value, which is calculated as follows:

[0049] Among them, G is the pixel gradient amplitude value, which represents the speed of pixel intensity change. x Characterizes the gradient of the image in the x direction, G y The gradient of the image in the y direction is characterized; the local contrast of the pixels at the edge of the blurred image is calculated, and the second constraint data is generated according to the local contrast calculation result; the local brightness of the blurred image edge is identified, the local average brightness is established, and the third constraint data is generated with the local average brightness; the first constraint data, the second constraint data, and the third constraint data are input into the parameter adaptive update model for controlling the enhancement intensity, and the adaptive control enhancement intensity parameter is output; the contrast of the blurred image edge is dynamically enhanced according to the adaptive control enhancement intensity parameter.

[0050] In the embodiment of the present application, a gradient operator such as a Sobel operator, a Prewitt operator or a Laplacian operator is used to perform a convolution operation on the edge of the blurred image to obtain the gradient value G of each pixel in the x direction and the y direction. x and G y .

[0051] Using the formula Calculate the gradient amplitude value G of each pixel point. The gradient amplitude value represents the speed of pixel intensity change, that is, the edge intensity of the image. The calculated gradient amplitude value is used as the first constraint data.

[0052] When calculating the local contrast of pixels on the edge of a blurred image, use the sliding window technique to determine the local area of ​​each pixel. The size of the sliding window is adjusted according to specific needs, for example, the window size is set to 3x3, 5x5, etc. With the help of image processing libraries such as OpenCV and PIL, the pixel intensity values ​​in each local area are extracted. The maximum and minimum values ​​of the pixel intensity in the local area are calculated using the built-in functions of the image processing library. The local contrast value is obtained by the difference between the maximum and minimum values. The calculated local contrast value is used as the second constraint data for each pixel.

[0053] When performing local brightness recognition, similar to local contrast calculation, first determine the local area of ​​each pixel through a sliding window. The size of the window is adjusted according to the specific situation of the image and the processing requirements. For each local area, extract the brightness values ​​of all pixels therein. In a color image, the brightness value is obtained by converting the RGB value to a grayscale value. Average the brightness values ​​of the pixels in each local area to obtain the local average brightness of the area. The average brightness value of each local area is used as the third constraint data of the area.

[0054] Next, the first constraint data, the second constraint data, and the third constraint data are input into a parameter adaptive updating model of control enhancement strength to obtain adaptive control enhancement strength parameters.

[0055] The parameter adaptive update model that controls the enhancement intensity can dynamically calculate the enhancement intensity parameters according to the input constraint data. When constructing the parameter adaptive update model, image data with different edge characteristics, local contrast and brightness conditions are first collected. Features related to edge gradient, local contrast and average brightness are extracted from the collected image data. The image data is annotated to indicate which areas need to be enhanced and the intensity of the enhancement, etc. Then a suitable machine learning model is selected. In this application, a convolutional neural network model is selected. The model is trained using the collected image data, and the parameter adaptive update model is obtained through training.

[0056] The contrast of blurred image edges is enhanced by using adaptive control of enhancement intensity parameters combined with contrast dynamic enhancement algorithm. The algorithm dynamically adjusts the enhancement intensity according to the specific situation of each pixel. For example, the contrast of the image is enhanced by using histogram equalization, contrast-limited adaptive histogram equalization and other technologies.

[0057] For each pixel in the image, the contrast intensity that needs to be enhanced is calculated based on its gradient amplitude, local contrast, local brightness and other information, as well as the adaptive control enhancement intensity parameter. Then, the contrast dynamic enhancement algorithm is applied to enhance the contrast of the pixel according to the calculated enhancement intensity. This process will traverse each pixel in the image, thereby achieving dynamic contrast enhancement of the entire image. The above process completes the dynamic contrast enhancement.

[0058] Furthermore, the method of dynamically enhancing the contrast of the blurred image edge and establishing the enhanced edge may further include:

[0059] Extract local texture information of the edge of the blurred image, calculate texture richness and complexity of the local texture information, generate texture calculation results, and use them as fourth constraint data; perform consistency evaluation of edge direction on the blurred image edge, and generate fifth constraint data according to the consistency evaluation result; perform color saturation recognition on the blurred image edge, and generate sixth constraint data according to the color saturation evaluation result; input the fourth constraint data, the fifth constraint data and the sixth constraint data into a parameter adaptive update model for controlling enhanced contrast, and output adaptive control enhanced contrast parameters; perform dynamic contrast enhancement of the blurred image edge according to the adaptive control enhanced intensity parameters and the adaptive control enhanced contrast parameters.

[0060] In the embodiment of the present application, image processing technology, such as a filter or a gray level co-occurrence matrix, is used to extract local texture information from the edge area of ​​the blurred image. Based on the extracted texture information, the richness and complexity of the texture are further calculated. By statistical methods, such as calculating entropy, energy, etc., the texture calculation result is obtained and used as the fourth constraint data.

[0061] Edge detection algorithms such as Sobel and Canny are used to identify image edges and analyze the directionality of edges. The direction consistency of edges is evaluated by statistically analyzing the distribution of edge directions, such as through direction histograms, to generate the fifth constraint data.

[0062] When performing color saturation recognition on the edge of a blurred image, the image is converted from the RGB color space to the HSV color space. In the HSV color space, the saturation component of each pixel is extracted. The saturation component is represented by S in the HSV space, and its value range is from 0 to 1 or 0% to 100%, indicating the depth or purity of the color. For the edge area of ​​the blurred image, the edge position is first determined by the edge detection algorithm, and then the saturation information of these positions is extracted. The saturation values ​​of the edge area are statistically analyzed, such as calculating the mean, median, standard deviation, etc., to evaluate the overall saturation level of the edge area. Based on the results of the saturation evaluation, a saturation score or weight is assigned to each edge pixel or edge area. This score or weight reflects the color vividness of the position and serves as the sixth constraint data.

[0063] The fourth constraint data, the fifth constraint data and the sixth constraint data are input into a parameter adaptive updating model for controlling the contrast enhancement to obtain adaptive control contrast enhancement parameters.

[0064] The construction process of the parameter adaptive update model for controlling the enhanced contrast is the same as the parameter adaptive update model for controlling the enhanced strength described above. The model can accept multiple input features, namely the fourth, fifth and sixth constraint data, and can output the parameters for controlling the enhanced contrast.

[0065] When performing dynamic contrast enhancement of blurred image edges according to the adaptive control enhancement strength parameter and the adaptive control enhancement contrast parameter, the contrast of the image is adjusted by combining the adaptive control enhancement contrast parameter with the histogram equalization and contrast stretching. For edge areas, the contrast of these areas is dynamically adjusted using the adaptive control enhancement strength parameter and the adaptive control enhancement contrast parameter. Dynamic contrast enhancement is achieved by changing pixel values, brightness distribution or applying local enhancement technology. After contrast enhancement, necessary post-processing, such as sharpening and color correction, is performed to improve the overall image quality. Dynamic contrast enhancement is completed through the above process.

[0066] Furthermore, step S600 in the method provided in the application embodiment also includes:

[0067] Establish edge features and edge position features of the part; perform fuzzy matching of enhanced edges through the edge position features, and call edge features in the fuzzy matching area to perform similarity matching of enhanced edges, wherein similarity matching includes similarity matching of features and similarity matching of positions; perform feature identification according to the similarity matching results, use the feature identification results as feature matching results, and perform relative size recognition output according to the feature matching results and the positioning recognition zero point.

[0068] In the embodiment of the present application, the part image is first preprocessed, such as denoising, contrast enhancement, etc. Then, edge detection algorithms such as Canny and Sobel are applied to extract the edge contour of the part and obtain the edge features of the part. At the same time, the coordinates of the edge pixels are recorded to form edge position features.

[0069] Use fuzzy matching algorithms, such as fuzzy logic-based matching, fuzzy C-means clustering, etc. to group and match edge position features to find areas close to the target edge position. Before fuzzy matching, use image processing techniques such as histogram equalization and contrast enhancement to enhance the visibility and clarity of the edge to improve the accuracy of matching.

[0070] In the area determined by fuzzy matching, detailed features of the edge are further extracted, such as using algorithms such as SIFT, SURF or ORB to generate feature descriptors of the edge. Matching is performed by comparing the similarity between the extracted feature descriptors and the preset or known feature descriptors by calculating the Euclidean distance, Hamming distance or cosine similarity between the descriptors. In addition to feature similarity, the positional relationship of the features in the image should also be considered. A matching algorithm based on spatial positional relationship, such as Hausdorff distance transform, is used to evaluate the positional similarity between two sets of edge features.

[0071] Based on the similarity matching results, the successfully matched edge features are marked by highlighting the matched edge features on the image using color, label or shape.

[0072] After determining the matching edge features, combined with the preset positioning recognition zero point, the relative size and position of the parts are determined by calculating the geometric relationship between the matching features and the reference points, such as distance, angle, etc. Finally, the relative size recognition results are output to the user interface. The relative size recognition output is completed through the above.

[0073] Further, the feature identification is performed according to the similar matching results, and the application embodiment also includes:

[0074] A similar anomaly threshold is set, where the similar anomaly threshold is an anomaly determination threshold for feature similarity matching; if the feature similarity matching in the similarity matching result cannot meet the similar anomaly threshold, a defect anomaly is reported and the anomaly position is marked.

[0075] In the embodiment of the present application, the similarity anomaly threshold is a standard for evaluating whether the feature similarity matching result is normal. It indicates the minimum level of similarity between two features that must be reached to ensure that they are matched. When setting the similarity anomaly threshold, a large amount of historical matching data is first collected. These data come from the previous similarity matching process, which should include the similarity score of each match and a mark whether it is considered abnormal. The collected data is statistically analyzed. The average similarity score and standard deviation of all normal matches are calculated. Analyze the data of abnormal matches and analyze how their similarity scores differ from the scores of normal matches. Based on the above statistical analysis, a similarity anomaly threshold is set. Usually, this threshold is set at the average similarity score minus several times the standard deviation to ensure that the similarity scores of most normal matches are higher than this threshold. For example, if the average similarity score is 0.85 and the standard deviation is 0.05, the threshold is set to 0.85-2×0.05=0.75. It means that any match with a similarity score below 0.75 will be considered abnormal.

[0076] After completing the setting of the similar abnormality threshold, the similar matching result obtained above is compared with the preset similar abnormality threshold. If the similar matching result is lower than the threshold, it is judged as abnormal and the defect abnormality is reported. The specific location of the abnormal feature is marked in the image by using color, shape or label on the image.

[0077] Furthermore, step S600 in the method provided in the application embodiment also includes:

[0078] Based on the feature matching result, the associated size parameters of the feature are called; the associated evaluation of the positioning identification zero point is performed through the associated size parameters, and the positioning identification zero point association is established; and relative size identification output is performed through the positioning identification zero point association and the positioning identification zero point and the associated size parameters.

[0079] In the embodiment of the present application, according to the feature matching result, the size parameters associated with these feature points are searched in the pre-established correspondence between feature points and size parameters. The associated size parameters obtained from the correspondence include geometric properties such as length, width, area, and direction of the feature.

[0080] Based on the associated dimensional parameters, one or more key positions are determined in the part image as the zero points for positioning and identification. These points are fixed marks, geometric centers or important feature points on the part. To verify the accuracy of the zero points for positioning and identification, statistical methods such as calculating the mean and standard deviation of the deviation or geometric analysis methods such as the least squares method are used to evaluate the positioning results. In addition, the positioning results are compared with preset templates or known data to further verify their accuracy. If the evaluation results of the zero points for positioning and identification meet the requirements, the zero point association for positioning and identification is established.

[0081] Based on the positioning recognition zero point, the relative size of other feature points or areas on the part is calculated by using the associated size parameters and image processing technology, such as edge detection and contour extraction. The calculation is achieved by measuring the distance between two points, calculating the angle or area, etc. Finally, the result of relative size recognition is output. Through the above process, the relative size recognition output is completed.

[0082] Furthermore, the method provided in the application embodiment also includes:

[0083] Establish a part identification of the part and construct a storage database mapped with the part identification; store the relative size in the storage database and perform compliance judgment of the part; establish a part flow constraint based on the compliance judgment result; and manage the part through the part flow constraint.

[0084] In the embodiment of the present application, a unique identifier is assigned to each part using barcode, QR code or RFID technology. A database mapped to the part identifier is established, and the database adopts a relational database or a non-relational database, and the relevant information of the part is stored, retrieved and updated through the established database.

[0085] The relative size information of the parts obtained in the above process is stored in the database and associated with the corresponding part identification. According to the specification requirements and design standards of the parts, the relative size information stored in the database is used to perform compliance checks, and the actual size is compared with the preset tolerance range to determine whether the part is qualified.

[0086] According to the compliance judgment results, the flow constraint rules of the parts are formulated. For compliant parts, their flow is not restricted and they can enter the next process or be stored for further processing. For non-compliant parts, strict flow constraints are established and special treatment is performed, such as rework, scrapping or isolation. Through a combination of automated systems and manual inspections, ensure that parts are moved and processed strictly in accordance with the flow constraint rules.

[0087] Finally, the part identification and database system is used to track the location, status, and compliance of parts in real time. By scanning the part identification, relevant information about the part can be quickly obtained, including its compliance status, current location, etc. According to the compliance status and flow constraint rules of the part, the inventory management strategy is optimized. For example, compliant parts can be stored in the regular warehouse area, while non-compliant parts should be isolated and properly handled.

[0088] In the embodiments of the present application, in summary, the embodiments of the present application have at least the following technical effects:

[0089] The present application performs feature analysis of parts, configures a line array camera based on the feature analysis result, wherein the line array camera includes a first line array camera and a second line array camera, the first line array camera corresponds to a first clamping scheme, and the second line array camera corresponds to a second clamping scheme, and the feature analysis is an analysis based on the part information after the part information is collected; when the part passes through a first area through the first clamping scheme, data collection is performed by the first line array camera set in the first area to establish a first image set; when the part passes through a second area through the second clamping scheme, data collection is performed by the second line array camera set in the second area to establish a second image set; a positioning recognition zero point is set based on the first clamping scheme and the second clamping scheme, and after the positioning recognition zero point is mapped between the first image set and the second image set, adaptive edge monitoring of the image is performed to establish a blurred image edge; dynamic contrast enhancement of the blurred image edge is performed to establish an enhanced edge, and the specific enhancement is as follows: I g (x,y)=I(x,y)+α·tanh(β·(I(x,y)-T(x,y))); wherein I(x,y) is the original image, T(x,y) is the edge of the blurred image, α is a parameter for controlling the enhancement strength, and β is a parameter for controlling the enhancement contrast; part feature matching is performed through the enhanced edge, and relative size recognition output is performed based on the feature matching result and the positioning recognition zero point. The present invention solves the technical problems of low precision and poor efficiency in part size detection in the prior art, and achieves the technical effect of improving the efficiency and accuracy of part size detection by using technologies such as feature analysis, precise configuration of linear array cameras, dual-clamping data acquisition, positioning recognition, and edge monitoring.

[0090] Embodiment 2

[0091] Based on the same inventive concept as the method for online detection of part size based on a linear array camera in the aforementioned embodiment, Figure 2 As shown, the present application provides an online detection system for part dimensions based on a linear array camera, and the system and method embodiments in the present application are based on the same inventive concept. The system includes:

[0092] A line array camera configuration module 11, wherein the line array camera configuration module 11 performs feature analysis of the part and configures the line array camera based on the feature analysis result, wherein the line array camera includes a first line array camera and a second line array camera, wherein the first line array camera corresponds to a first clamping scheme, and the second line array camera corresponds to a second clamping scheme, and the feature analysis is an analysis based on the part information after the part information is collected; a first image set establishment module 12, wherein the first image set establishment module 12 performs data acquisition by the first line array camera set in the first area when the part passes through the first clamping scheme to establish a first image set; a second image set establishment module 1 3. The second image set establishment module 13 performs data acquisition through the second linear array camera set in the second area when the part passes through the second clamping scheme to establish the second image set; the fuzzy image edge establishment module 14, the fuzzy image edge establishment module 14 sets the positioning recognition zero point based on the first clamping scheme and the second clamping scheme, maps the positioning recognition zero point between the first image set and the second image set, performs adaptive edge monitoring of the image, and establishes the fuzzy image edge; the edge enhancement module 15, the edge enhancement module 15 performs dynamic contrast enhancement of the fuzzy image edge to establish the enhanced edge, and the specific enhancement is as follows:

[0093] I g (x,y)=I(x,y)+α·tanh(β·(I(x,y)-T(x,y))); where, I(x,y) is

[0094] Original image, T(x, y) is the blurred image edge, α is the parameter for controlling the enhancement strength, β is the parameter for controlling the enhancement contrast; relative size recognition output module 16, the relative size recognition output module 16 performs part feature matching through the enhanced edge, and performs relative size recognition output according to the feature matching result and the positioning recognition zero point.

[0095] Furthermore, the system is also used to implement the following functions:

[0096] The pixel gradient amplitude is calculated for the edge of the blurred image, and the first constraint data is generated according to the pixel gradient amplitude value, which is calculated as follows:

[0097] Among them, G is the pixel gradient amplitude value, which represents the speed of pixel intensity change. x Characterizes the gradient of the image in the x direction, G yThe gradient of the image in the y direction is characterized; the local contrast of the pixels at the edge of the blurred image is calculated, and the second constraint data is generated according to the local contrast calculation result; the local brightness of the blurred image edge is identified, the local average brightness is established, and the third constraint data is generated with the local average brightness; the first constraint data, the second constraint data, and the third constraint data are input into the parameter adaptive update model for controlling the enhancement intensity, and the adaptive control enhancement intensity parameter is output; the contrast of the blurred image edge is dynamically enhanced according to the adaptive control enhancement intensity parameter.

[0098] Furthermore, the system is also used to implement the following functions:

[0099] Extract local texture information of the edge of the blurred image, calculate texture richness and complexity of the local texture information, generate texture calculation results, and use them as fourth constraint data; perform consistency evaluation of edge direction on the blurred image edge, and generate fifth constraint data according to the consistency evaluation result; perform color saturation recognition on the blurred image edge, and generate sixth constraint data according to the color saturation evaluation result; input the fourth constraint data, the fifth constraint data and the sixth constraint data into a parameter adaptive update model for controlling enhanced contrast, and output adaptive control enhanced contrast parameters; perform dynamic contrast enhancement of the blurred image edge according to the adaptive control enhanced intensity parameters and the adaptive control enhanced contrast parameters.

[0100] Furthermore, the system is also used to implement the following functions:

[0101] Establish edge features and edge position features of the part; perform fuzzy matching of enhanced edges through the edge position features, and call edge features in the fuzzy matching area to perform similarity matching of enhanced edges, wherein similarity matching includes similarity matching of features and similarity matching of positions; perform feature identification according to the similarity matching results, use the feature identification results as feature matching results, and perform relative size recognition output according to the feature matching results and the positioning recognition zero point.

[0102] Furthermore, the system is also used to implement the following functions:

[0103] A similar anomaly threshold is set, where the similar anomaly threshold is an anomaly determination threshold for feature similarity matching; if the feature similarity matching in the similarity matching result cannot meet the similar anomaly threshold, a defect anomaly is reported and the anomaly position is marked.

[0104] Furthermore, the system is also used to implement the following functions:

[0105] Based on the feature matching result, the associated size parameters of the feature are called; the associated evaluation of the positioning identification zero point is performed through the associated size parameters, and the positioning identification zero point association is established; and relative size identification output is performed through the positioning identification zero point association and the positioning identification zero point and the associated size parameters.

[0106] Furthermore, the system is also used to implement the following functions:

[0107] Establish a part identification of the part and construct a storage database mapped with the part identification; store the relative size in the storage database and perform compliance judgment of the part; establish a part flow constraint based on the compliance judgment result; and manage the part through the part flow constraint.

[0108] It should be noted that the above-mentioned sequence of the embodiments of the present application is only for description and does not represent the advantages and disadvantages of the embodiments. And the above-mentioned specific embodiments of this specification are described. The processes depicted in the accompanying drawings do not necessarily require the specific order and continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0109] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

[0110] This specification and drawings are merely exemplary illustrations of the present application and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, a person skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalents, the present application intends to include these modifications and variations.

Claims

1. The method for online detection of part dimensions based on a linear array camera is characterized in that: The method comprises: Performing feature analysis of the part, and configuring a line array camera based on the feature analysis result, wherein the line array camera includes a first line array camera and a second line array camera, the first line array camera corresponds to a first clamping scheme, and the second line array camera corresponds to a second clamping scheme, and the feature analysis is an analysis performed based on the part information after the part information is collected; When the part passes through the first area through the first clamping scheme, performing data acquisition by a first line array camera disposed in the first area to establish a first image set; When the part passes through the second area through the second clamping scheme, performing data acquisition by a second line array camera disposed in the second area to establish a second image set; Setting a positioning identification zero point based on the first clamping scheme and the second clamping scheme, mapping the positioning identification zero point between the first image set and the second image set, performing adaptive edge monitoring of the image, and establishing a fuzzy image edge; Perform dynamic contrast enhancement of blurred image edges to establish enhanced edges. The specific enhancements are as follows: I g (x,y)=I(x,y)+α·tanh(β·(I(x,y)-T(x,y))); Wherein, I(x, y) is the original image, T(x, y) is the edge of the blurred image, α is a parameter for controlling the enhancement strength, β is a parameter for controlling the enhancement contrast, and the original image is the edge information of the part detected by applying the selected adaptive edge detection algorithm to the first image set and the second image set; Part feature matching is performed through the enhanced edge, and relative size recognition output is performed based on the feature matching result and the positioning recognition zero point.

2. The method according to claim 1, characterized in that The method of dynamically enhancing the contrast of the blurred image edge and establishing the enhanced edge further includes: The pixel gradient amplitude is calculated for the edge of the blurred image, and the first constraint data is generated according to the pixel gradient amplitude value, which is calculated as follows: Among them, G is the pixel gradient amplitude value, which represents the speed of pixel intensity change. x Characterizes the gradient of the image in the x direction, G y Characterizes the gradient of the image in the y direction; Performing local contrast calculation of pixels on the edge of the blurred image, and generating second constraint data according to the local contrast calculation result; Performing local brightness recognition on the edge of the blurred image, establishing local average brightness, and generating third constraint data with the local average brightness; Input the first constraint data, the second constraint data, and the third constraint data into a parameter adaptive updating model for controlling enhanced strength, and output an adaptive control enhanced strength parameter; Dynamic enhancement of the contrast of blurred image edges is performed according to the adaptively controlled enhancement strength parameter.

3. The method according to claim 2, characterized in that The method of dynamically enhancing the contrast of the blurred image edge and establishing the enhanced edge further includes: Extracting local texture information of the edge of the blurred image, calculating texture richness and complexity of the local texture information, generating a texture calculation result, and using it as fourth constraint data; Performing consistency evaluation on the edge direction of the blurred image edge, and generating fifth constraint data according to the consistency evaluation result; Performing color saturation recognition on the edge of the blurred image, and generating sixth constraint data based on the color saturation evaluation result; Inputting the fourth constraint data, the fifth constraint data and the sixth constraint data into a parameter adaptive updating model for controlling contrast enhancement, and outputting adaptive control contrast enhancement parameters; Dynamic enhancement of the contrast of the blurred image edge is performed according to the adaptive control enhancement strength parameter and the adaptive control enhancement contrast parameter.

4. The method according to claim 1, characterized in that The performing of part feature matching by the enhanced edge and performing relative size recognition output according to the feature matching result and the positioning recognition zero point also includes: Establish edge features and edge position features of parts; Performing fuzzy matching of enhanced edges through the edge position features, and calling edge features in the fuzzy matching area to perform similarity matching of enhanced edges, wherein the similarity matching includes similarity matching of features and similarity matching of positions; Feature identification is performed based on the similarity matching result, and the feature identification result is used as the feature matching result. Relative size recognition output is performed based on the feature matching result and the positioning recognition zero point.

5. The method according to claim 4, characterized in that The performing feature identification according to the similar matching results also includes: Setting a similar anomaly threshold, which is an anomaly determination threshold for performing feature similarity matching; If the feature similarity matching in the similarity matching result cannot meet the similarity abnormality threshold, a defect abnormality is reported and the abnormal position is marked.

6. The method according to claim 1, characterized in that The performing of part feature matching by the enhanced edge and performing relative size recognition output according to the feature matching result and the positioning recognition zero point also includes: Calling the associated size parameters of the feature based on the feature matching result; Performing correlation evaluation of the positioning identification zero point through the correlation size parameters, and establishing the positioning identification zero point correlation; Relative size recognition output is performed through the positioning recognition zero point association and the positioning recognition zero point and the associated size parameters.

7. The method according to claim 1, characterized in that The method further comprises: Establish part identification of parts and build a storage database mapped with part identification; storing the relative dimensions in the storage database and performing compliance determination of the parts; Establish part flow constraints based on compliance judgment results; Part management is performed through the part flow constraints.

8. The online detection system of part size based on linear array camera is characterized by: The system comprises: A line array camera configuration module, wherein the line array camera configuration module performs feature analysis of the part and configures the line array camera based on the feature analysis result, wherein the line array camera includes a first line array camera and a second line array camera, the first line array camera corresponds to a first clamping scheme, and the second line array camera corresponds to a second clamping scheme, and the feature analysis is an analysis performed based on the part information after the part information is collected; A first image set establishing module, wherein when the part passes through the first area through the first clamping scheme, the first image set establishing module performs data acquisition through a first linear array camera disposed in the first area to establish a first image set; A second image set establishing module, wherein when the part passes through the second area through the second clamping scheme, the second image set establishing module performs data acquisition through a second linear array camera disposed in the second area to establish a second image set; a fuzzy image edge establishment module, wherein the fuzzy image edge establishment module sets a positioning identification zero point based on the first clamping scheme and the second clamping scheme, maps the positioning identification zero point between the first image set and the second image set, performs adaptive edge monitoring of the image, and establishes a fuzzy image edge; The edge enhancement module performs dynamic contrast enhancement of the blurred image edge and establishes an enhanced edge. The specific enhancement is as follows: I g (x,y)=I(x,y)+α·tanh(β·(I(x,y)-T(x,y))); Wherein, I(x, y) is the original image, T(x, y) is the edge of the blurred image, α is a parameter for controlling the enhancement strength, β is a parameter for controlling the enhancement contrast, and the original image is the edge information of the part detected by applying the selected adaptive edge detection algorithm to the first image set and the second image set; A relative size recognition output module is provided, wherein the relative size recognition output module performs part feature matching through the enhanced edge, and performs relative size recognition output according to the feature matching result and the positioning recognition zero point.

Citation Information

Patent Citations

  • Image segmentation method for industrial defect detection

    CN115631127A

  • Stylized rendering using a multi-flash camera

    US20040212725A1