Visual detection precision improving method and system based on high-resolution image
By adopting high-resolution image acquisition equipment, uniform lighting system and image processing technology in the visual detection system, the problem of high-precision detection of irregularly shaped objects in the prior art is solved, and a more efficient and accurate detection effect is achieved.
Patent Information
- Application Number
- CN202411666191.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art is difficult to meet the needs of high-precision visual inspection in the fields of semiconductor manufacturing, especially when detecting objects with irregular shapes or multiple surface defects, the detection accuracy is insufficient.
High-resolution image acquisition equipment such as high-precision industrial cameras are used, combined with a uniform lighting system and image processing unit, and image preprocessing and feature extraction are carried out through Canny algorithm and other technologies to achieve high-precision detection of complex shape objects.
It significantly improves the accuracy and efficiency of visual inspection, can accurately capture the subtle characteristics of the product, quickly identify and position dimensional deviations and shape errors, and is suitable for various types of product inspection.
Smart Images

Figure FT_1 
Figure FT_2
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual inspection technology, and in particular to a method and system for improving visual inspection accuracy. Background Art
[0002] With the development of modern industrial production, the degree of refinement of products is constantly improving, and the requirements for detection accuracy are becoming more and more stringent. For example, in semiconductor manufacturing, nanoscale processes have been adopted, and the chip detection accuracy requirements are extremely high. Traditional detection methods are difficult to meet the needs. Visual inspection technology based on high-resolution images has become the key to ensuring processing technology, improving product quality and reducing packaging costs.
[0003] Advances in image sensor technology have reduced the cost and improved the performance of high-resolution cameras. High-pixel industrial cameras, high-definition cameras and other equipment are widely used in the field of visual inspection, providing a foundation for high-precision visual inspection. In the visual inspection process, image acquisition, preprocessing, feature processing and other links have extremely high requirements for inspection accuracy. Since visual inspection technology has been widely used in various industries, in order to improve inspection accuracy, a set of effective visual inspection accuracy improvement methods and systems are needed, especially for objects with irregular shapes or possible multi-faceted defects in industrial production. Achieving high-precision inspection has important practical significance. Summary of the invention
[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0005] In view of the above problems and / or the problems existing in the prior art, the present invention is proposed.
[0006] Therefore, the purpose of the present invention is to overcome the deficiencies in the prior art and provide a method and system for improving the accuracy of visual inspection based on high-resolution images and a method of using the same.
[0007] The present invention aims to provide a method and system for improving the accuracy of visual inspection based on high-resolution images. Through the above method and system, the accuracy of visual inspection can be effectively improved. In the fields of industrial production, for different types of products, whether automotive parts or electronic products, it is possible to more accurately capture the subtle features of the products, achieve faster identification and positioning, accurately control the size deviation and shape error of the products, and improve the inspection efficiency, which has great practical value and practical significance.
[0008] Preferably, the present invention uses a high-precision industrial camera as the core component of image acquisition, which can capture clearer and more detailed image information, providing a basis for subsequent high-precision detection. For example, when detecting the appearance of automotive parts or electronic products, the subtle features of the product can be clearly presented, such as tiny scratches on parts, texture details on the appearance of electronic products, etc. The appropriate frame rate ensures that there will be no image loss or blurring when detecting dynamic objects or scenes where continuous image acquisition is required. For example, when detecting electronic products that move quickly on an assembly line, it can be ensured that each product can be accurately imaged. The correct color mode helps to better identify the color characteristics of the product, and for some products where the appearance color is an important detection indicator (such as colored electronic product housings), the accuracy of detection can be improved.
[0009] Preferably, the internal lighting system of the present invention is used to provide uniform lighting, and can be adjusted according to different detection requirements. For objects with complex shapes, cameras arranged in a ring can also be used in combination with specific lighting methods to simultaneously shoot from different directions. Uniform lighting improves image quality: uniform lighting can avoid problems such as image shadows and reflections caused by uneven light, thereby improving the quality and stability of the image. This is crucial for accurately extracting product features. For example, when detecting automotive parts with smooth surfaces, uniform lighting can prevent reflections from interfering with feature extraction. Adjustability adapts to a variety of detection scenarios: parameters such as light intensity and angle can be adjusted according to the shape, material and detection requirements of different objects. For example, when detecting electronic products with different reflective properties, the lighting angle can be adjusted to avoid the influence of reflections on the detection results. For objects with complex shapes, using cameras arranged in a ring in combination with special lighting methods can reduce the loss of information caused by shooting at a single angle and obtain product feature information more comprehensively.
[0010] Preferably, the image processing unit of the present invention is responsible for quickly processing high-resolution images, and analyzing and measuring the collected images. Efficient processing ensures detection efficiency: it is able to quickly process large amounts of high-resolution image data to ensure the timeliness of the detection process. On industrial production lines, rapid image processing can meet the needs of efficient production and avoid production delays caused by slow image processing speeds. Accurate analysis improves detection accuracy: by analyzing and measuring images, various feature information of the product can be accurately extracted, such as edge features, geometric features, dimensional parameters, etc. This provides reliable data support for subsequent accuracy assessment and defect detection, thereby improving the accuracy of the entire detection system.
[0011] Preferably, the mechanical positioning system is used to accurately position the inspected object in the inspection area, and can be customized according to different component types. Precise positioning ensures image acquisition accuracy: ensures that the inspected object is in the same position and posture each time an image is captured, avoiding image acquisition errors caused by object position deviations. For example, when inspecting automotive parts, ensure that the position of the parts on the mechanical positioning system is fixed so that each image taken can accurately reflect the true characteristics of the parts. It can be customized according to the shape, size and inspection requirements of different parts, which improves the versatility and adaptability of the system. Whether it is a large automotive part or a small electronic product part, accurate inspection can be achieved through a customized mechanical positioning system.
[0012] Preferably, in the whole system, the application of Canny algorithm is realized through a series of calculation steps. First, the gradient amplitude and direction are calculated, then non-maximum suppression is performed, then double threshold detection is performed, and finally edge connection is performed. Accurately extract edge features: By calculating the gradient amplitude and direction, the change of pixel points in the image can be accurately determined, so as to find possible edge positions. For example, when detecting the edge contour of automotive parts, the edge curve of the parts can be clearly identified. The non-maximum suppression link retains the local maximum point in the gradient amplitude image, and suppresses other non-maximum points to 0, effectively removing the interference of non-edge information. This makes the subsequent edge features more accurate and reduces the possibility of misjudgment. Double threshold detection divides the pixels into strong edge pixels, weak edge pixels and non-edge pixels, and further determines the final edge through edge connection. This classification and connection method can more accurately construct the edge contour of the product, and can better restore the true shape of products with complex shapes (such as electronic products with irregular shapes) for detection.
[0013] The present invention also provides a method for improving the visual inspection accuracy based on high-resolution images and a method for using the system, which comprises the following steps:
[0014] S100, Equipment preparation: Select appropriate high-resolution image acquisition equipment, such as high-precision industrial cameras. Determine the camera's resolution, frame rate, color mode and other parameters to meet the feature extraction requirements of the object being inspected. For example, for the inspection of tiny parts, it is necessary to select a camera with high resolution and moderate frame rate to ensure that the details of the parts can be clearly captured while avoiding excessive data processing burden caused by excessive frame rate.
[0015] Prepare the lighting system according to the inspection scene and the complexity of the shape of the inspected object. Ensure that the lighting system can provide uniform lighting. For objects with complex shapes, consider using circular lighting equipment or special lighting angle settings to reduce the impact of shadows and reflections on image quality. Prepare the image processing unit and ensure that it has sufficient computing power and corresponding image processing software to quickly process high-resolution image data. According to the type and size of the inspected object, customize the mechanical positioning system so that it can accurately position the inspected object in the inspection area to ensure the accuracy and consistency of each image acquisition.
[0016] S200, collects various types of high-resolution images as references, including natural scenery, buildings, people and other categories, to test and optimize the system's image processing algorithms and parameters. These images can be used to verify the effectiveness and stability of the algorithm in different scenarios. Perform preliminary screening on the actual images collected for detection (such as images of automotive parts or electronic products) to remove images that obviously do not meet the detection requirements, such as images that are severely blurred or have large areas of occlusion.
[0017] S300, Image acquisition: Place the object to be inspected on the mechanical positioning system and start the high-resolution camera for image acquisition. For objects with complex shapes or requiring multi-viewing angles, multi-angle shooting can be used, such as using circularly arranged cameras to shoot from different directions at the same time to obtain multiple high-resolution images to ensure that the feature information of the object is fully obtained. When collecting images of electronic products, when the electronic products enter the inspection area through the transmission system, the camera should capture the image in time to ensure the integrity and accuracy of the image.
[0018] S400, image preprocessing: adjust the brightness and contrast to make the overall visual effect of the image clearer and facilitate subsequent processing. By performing linear or nonlinear transformation on the pixel values of the image, the contrast between the target object and the background in the image is enhanced to highlight the features of the object. Use a Gaussian filter to smooth the image and remove noise from the image. By performing a weighted average of each pixel in the image and its surrounding pixels, the interference of noise on image feature extraction is reduced. According to the detection requirements, the image is binarized and converted into a black and white image. The binarization threshold can be adjusted according to the specific situation of the image to ensure that the target object and the background can be accurately separated to facilitate subsequent feature extraction and analysis.
[0019] S500, gradient calculation: For each pixel in the preprocessed image, calculate its gradient components Gx and Gy in the horizontal and vertical directions respectively. You can use a filter such as the Sobel operator to perform a convolution operation to achieve the calculation of the gradient component. Based on the calculated Gx and Gy, further calculate the gradient amplitude G and direction &. Gradient amplitude represents the gradient strength of the pixel, and direction &=arctan(Gy / Gx) represents the gradient direction of the pixel.
[0020] S600, Canny algorithm application: perform non-maximum suppression. According to the gradient direction of the pixel, determine its two adjacent pixels in the gradient direction, and compare the gradient amplitudes of the pixel and its adjacent pixels. If the gradient amplitude of the pixel is not the local maximum, set the gradient amplitude of the pixel to 0; otherwise, keep the gradient amplitude of the pixel unchanged. Through non-maximum suppression, the local maximum points in the gradient amplitude image are retained to remove the interference of non-edge information. Set double threshold detection. Set the high threshold to Th = 2.5 and the low threshold to Tj = 1. Perform double threshold detection on the gradient amplitude image after non-maximum suppression. Pixels with gradient amplitudes greater than the high threshold are determined as strong edge pixels, pixels with gradient amplitudes less than the low threshold are determined as non-edge pixels, and pixels with gradient amplitudes between the high threshold and the low threshold are determined as weak edge pixels. Edge connection. Strong edge pixels must be part of the edge and are directly retained. For a weak edge pixel, if it is adjacent to a strong edge pixel, it is also determined as part of the edge; otherwise, it is determined as a non-edge pixel. Through the above steps, the edge features and geometric features of the detected object are extracted from the preprocessed image.
[0021] S700, Dimension measurement: Measure the dimensional parameters of the inspected object based on the extracted features. Appropriate dimension measurement algorithms can be used, selected and optimized according to different measurement requirements. For example, for objects with simple geometric shapes, a measurement method based on geometric formulas can be used; for objects with complex shapes, a measurement method based on feature matching or contour fitting can be used to ensure the accuracy and precision of the measurement.
[0022] S800, Accuracy Assessment: Evaluate the accuracy of the measurement results and calculate indicators such as measurement error and repeatability. If the accuracy does not meet the requirements, you can adjust the algorithm parameters or optimize the system settings for further optimization. For automotive parts inspection, you can calculate the percentage of dimensional measurement error relative to the design size; for electronic product appearance inspection, you can calculate indicators such as detection accuracy and recall rate to evaluate the quality of the inspection results.
[0023] S900, Defect Detection: Compare the extracted features with the preset standard features to determine whether the inspected object has defects. For automotive parts, compare whether their size parameters and shape features meet the design requirements; for the appearance of electronic products, compare whether their shape, color, texture and other features meet the preset standards. If a defect is found, the system will automatically mark the defect location and issue an alarm.
[0024] S1000, Result output: Output the test results (including dimensional measurement results, accuracy assessment results, defect detection results, etc.) in an appropriate form, such as displaying a detailed report on a display screen, or storing the data in a database for subsequent query and analysis. The output results should clearly and accurately reflect the status of the object being tested and relevant information about the testing process.
[0025] The beneficial effects of the method and system for improving the visual inspection accuracy based on high-resolution images of the present invention are as follows:
[0026] 1. By using high-precision industrial cameras and other image acquisition devices, high-resolution images can be obtained, providing rich details for accurate detection. For example, when detecting the fine structure of tiny electronic components or automotive parts, high-resolution images can clearly show the surface texture, tiny scratches, and slight changes in the edges. These details are crucial for accurately judging whether the product is qualified.
[0027] 2. Use Gaussian filter to remove image noise, improve image quality, and reduce the interference of noise on subsequent feature extraction and detection. For example, in the detection of some products with strong reflective surfaces, the real features of the product can be more clearly identified after removing the noise. The application of Canny algorithm further improves the accuracy of feature extraction. By calculating the gradient amplitude and direction, performing non-maximum suppression, dual threshold detection and edge connection, the edge features and geometric features of the product can be accurately extracted. This precise feature extraction helps to more accurately measure product size, evaluate shape errors, and determine whether there are defects. For example, when detecting the appearance of electronic products with complex shapes, it can accurately restore their shape contours, improving the accuracy of irregular shape product detection.
[0028] 3. Reasonable settings of image acquisition equipment parameters (such as resolution, frame rate) and fast image processing units ensure the high efficiency of image acquisition and processing. On industrial production lines, a large number of product images can be quickly acquired and processed, avoiding production delays caused by slow image acquisition and processing. For example, for electronic product inspection on high-speed production lines, image acquisition and inspection of each product can be completed in a short time, ensuring production efficiency.
[0029] 4. For objects with complex shapes, a circular array of cameras is used for multi-angle shooting and a customized mechanical positioning system is used to ensure accurate one-time positioning, reducing the time wasted due to multiple adjustments of position and angle. This method can fully obtain the characteristic information of the object and improve the detection efficiency. For example, when inspecting large automotive parts, through multi-angle shooting and accurate positioning, the inspection of each side of the parts can be completed quickly without repeatedly adjusting the position of the parts and the shooting angle.
[0030] 5. In the process of image acquisition and algorithm optimization, various types of images such as natural scenery, buildings, and people are referenced, which makes the method and system of the present invention have a certain versatility for different types of images. Whether it is the detection of industrial products or other image detection tasks that may be involved in other fields, the system can effectively process based on its optimized algorithms and parameters.
[0031] 6. The mechanical positioning system can be customized according to different component types, and the lighting system can be adjusted according to different detection requirements, which enables the present invention to adapt to objects of different shapes, sizes and materials. For example, for electronic products or automotive parts of different sizes and shapes, the detection requirements can be met by customizing the mechanical positioning system and adjusting the lighting system, which improves the adaptability of the system.
[0032] 7. By accurately extracting product features and performing size measurement and shape error evaluation, the size deviation and shape error of the product during the production process can be discovered in a timely manner. For example, in semiconductor manufacturing, the size and shape control of the chip is crucial. The present invention can accurately measure and evaluate to ensure that the product meets high quality requirements.
[0033] 8. Comparing the extracted features with the preset standard features can timely detect whether the product has defects, automatically mark the defect location and issue an alarm. This helps to timely detect problematic products during the production process and prevent unqualified products from entering the next process, thereby improving the overall quality of the product. For example, in the appearance inspection of electronic products, surface scratches, uneven colors and other defects can be detected in time to ensure the appearance quality of the product. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 the structures shown in these drawings without paying creative work.
[0035] Figure 1 This is a flowchart of the application of the high-resolution image-based visual inspection accuracy system in the embodiment of the present invention to automobile parts inspection
[0036] Figure 2 This is a flowchart of the visual inspection accuracy system based on high-resolution images in an embodiment of the present invention applied to the appearance inspection of electronic products.
[0037] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0038] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the present invention. It should be understood that the specific implementation methods described here are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the embodiments of the specification.
[0040] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0041] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0042] As a preferred solution described in the present invention, the present invention provides a method and system for improving visual inspection accuracy based on high-resolution images.
[0043] As a preferred solution described in the present invention, for the gradient calculation and direction determination, we place the automobile parts on a mechanical positioning system, and use a high-resolution camera to shoot the parts at multiple angles. We use cameras arranged in a ring to shoot from different directions simultaneously to obtain multiple high-resolution images.
[0044] As a preferred solution described in the present invention, the collected and preprocessed automobile parts image is input into the feature processing module. The image is convolved using the Sobel operator to calculate the gradient components Gx and Gy of each pixel in the horizontal and vertical directions respectively. For each pixel point (x, y) in the image, the template of the Sobel operator in the horizontal direction is [-1, 0, 1; -2, 0, 2; -1, 0, 1]. By convolving the template with the pixel values in the 3×3 neighborhood centered on (x, y) in the image, the horizontal gradient component Gx (x, y) of the pixel point is obtained. Similarly, the template in the vertical direction is [-1, -2, -1; 0, 0, 0; 1, 2, 1], and the vertical gradient component is obtained after the convolution operation.
[0045] As a preferred solution of the present invention, the gradient amplitude G and direction θ of each pixel are calculated based on the calculated horizontal and vertical gradient components. For each pixel (x, y), its gradient amplitude Gradient direction θ(x, y) = arctan(Gy(x, y) / Gx(x, y)), and store the calculated result for later use
[0046] As a preferred solution of the present invention, the non-maximum suppression traverses each pixel point θ(x, y) in the gradient amplitude image. For each pixel point, according to its gradient direction θ(x, y), its two adjacent pixel points in the gradient direction are determined. For example, if the gradient direction θ(x, y) is between 0 and π / 8, the adjacent pixel points are (x, y-1) and (x+1, y-1); if it is between π / 8 and π / 4, the adjacent pixel points are (x+1, y-1) and (x+1, y), etc. (the adjacent pixel points are determined according to the eight intervals of the gradient direction).
[0047] As a preferred solution of the present invention, the gradient amplitude of the pixel point (x, y) is compared with that of its two adjacent pixel points. If it is less than or equal to any gradient amplitude of its adjacent pixel points, G(x, y) is set to 0, indicating that the point is not a local maximum and is suppressed; otherwise, G(x, y) is kept unchanged, that is, the point is a local maximum and may be an edge point.
[0048] As a preferred solution described in the present invention, for the pixel points determined as edge points after edge connection, the Freeman chain code is used to describe the edge features. Starting from the upper left corner of the image, the direction code of each edge point relative to the previous edge point is calculated in a clockwise direction. For example, if the current edge point moves one pixel to the right relative to the previous edge point in the horizontal direction, it is encoded as 0; if it moves to the upper right, it is encoded as 1, etc. (encoded in eight directions), thereby forming a chain code sequence representing the edge shape, which can effectively reduce the amount of data and retain the shape information of the edge.
[0049] As a preferred solution of the present invention, the extracted edge chain code features and geometric features are matched with a preset standard feature library. The standard feature library stores the feature range of qualified automotive parts, including the allowable variation range of chain code features and the tolerance range of geometric features. The degree of matching is determined by calculating the distance (such as Euclidean distance) between the extracted features and the standard features. If the distance is within the set threshold range, the automotive part is judged to be qualified; otherwise, it is judged to be unqualified, and the defect type is determined based on the feature difference, such as shape deviation, size deviation, etc.
[0050] The present invention also provides a method for improving the visual inspection accuracy based on high-resolution images and a method for using the system, which comprises the following steps:
[0051] S100, equipment preparation: Select appropriate high-resolution image acquisition equipment, such as high-precision industrial cameras. Determine the camera's resolution, frame rate, color mode and other parameters to meet the feature extraction requirements of the object being inspected. For example, for the inspection of tiny parts, it is necessary to select a camera with high resolution and moderate frame rate to ensure that the details of the parts can be clearly captured while avoiding excessive data processing burden caused by excessive frame rate. Prepare the lighting system according to the inspection scene and the complexity of the shape of the inspected object. Ensure that the lighting system can provide uniform lighting. For objects with complex shapes, consider using circular lighting equipment or special lighting angle settings to reduce the impact of shadows and reflections on image quality. Prepare the image processing unit to ensure that it has sufficient computing power and corresponding image processing software to quickly process high-resolution image data. Customize the mechanical positioning system according to the type and size of the object being inspected so that it can accurately position the object being inspected in the inspection area to ensure the accuracy and consistency of each image acquisition.
[0052] S200, collects various types of high-resolution images as references, including natural scenery, buildings, people and other categories, to test and optimize the system's image processing algorithms and parameters. These images can be used to verify the effectiveness and stability of the algorithm in different scenarios. Perform preliminary screening on the actual images collected for detection (such as images of automotive parts or electronic products) to remove images that obviously do not meet the detection requirements, such as images that are severely blurred or have large areas of occlusion.
[0053] S300, Image acquisition: Place the object to be inspected on the mechanical positioning system and start the high-resolution camera for image acquisition. For objects with complex shapes or requiring multi-viewing angles, multi-angle shooting can be used, such as using circularly arranged cameras to shoot from different directions at the same time to obtain multiple high-resolution images to ensure that the feature information of the object is fully obtained. When collecting images of electronic products, when the electronic products enter the inspection area through the transmission system, the camera should capture the image in time to ensure the integrity and accuracy of the image.
[0054] S400, image preprocessing: adjust the brightness and contrast to make the overall visual effect of the image clearer and facilitate subsequent processing. By performing linear or nonlinear transformation on the pixel values of the image, the contrast between the target object and the background in the image is enhanced to highlight the features of the object. Use a Gaussian filter to smooth the image and remove noise from the image. By performing a weighted average of each pixel in the image and its surrounding pixels, the interference of noise on image feature extraction is reduced. According to the detection requirements, the image is binarized and converted into a black and white image. The binarization threshold can be adjusted according to the specific situation of the image to ensure that the target object and the background can be accurately separated to facilitate subsequent feature extraction and analysis.
[0055] S500, gradient calculation: For each pixel in the preprocessed image, calculate its gradient components Gx and Gy in the horizontal and vertical directions respectively. You can use a filter such as the Sobel operator to perform a convolution operation to achieve the calculation of the gradient component. Based on the calculated Gx and Gy, further calculate the gradient amplitude G and direction &. Gradient amplitude represents the gradient strength of the pixel, and direction &=arctan(Gy / Gx) represents the gradient direction of the pixel.
[0056] S600, Canny algorithm application: perform non-maximum suppression. According to the gradient direction of the pixel, determine its two adjacent pixels in the gradient direction, and compare the gradient amplitudes of the pixel and its adjacent pixels. If the gradient amplitude of the pixel is not the local maximum, set the gradient amplitude of the pixel to 0; otherwise, keep the gradient amplitude of the pixel unchanged. Through non-maximum suppression, the local maximum points in the gradient amplitude image are retained to remove the interference of non-edge information. Set double threshold detection. Set the high threshold to Th = 2.5 and the low threshold to Tj = 1. Perform double threshold detection on the gradient amplitude image after non-maximum suppression. Pixels with gradient amplitudes greater than the high threshold are determined as strong edge pixels, pixels with gradient amplitudes less than the low threshold are determined as non-edge pixels, and pixels with gradient amplitudes between the high threshold and the low threshold are determined as weak edge pixels. Edge connection. Strong edge pixels must be part of the edge and are directly retained. For a weak edge pixel, if it is adjacent to a strong edge pixel, it is also determined as part of the edge; otherwise, it is determined as a non-edge pixel. Through the above steps, the edge features and geometric features of the detected object are extracted from the preprocessed image.
[0057] S700, Dimension measurement: Measure the dimensional parameters of the inspected object based on the extracted features. Appropriate dimension measurement algorithms can be used, selected and optimized according to different measurement requirements. For example, for objects with simple geometric shapes, a measurement method based on geometric formulas can be used; for objects with complex shapes, a measurement method based on feature matching or contour fitting can be used to ensure the accuracy and precision of the measurement.
[0058] S800, Accuracy Assessment: Evaluate the accuracy of the measurement results and calculate indicators such as measurement error and repeatability. If the accuracy does not meet the requirements, you can adjust the algorithm parameters or optimize the system settings for further optimization. For automotive parts inspection, you can calculate the percentage of dimensional measurement error relative to the design size; for electronic product appearance inspection, you can calculate indicators such as detection accuracy and recall rate to evaluate the quality of the inspection results.
[0059] S900, Defect Detection: Compare the extracted features with the preset standard features to determine whether the inspected object has defects. For automotive parts, compare whether their size parameters and shape features meet the design requirements; for the appearance of electronic products, compare whether their shape, color, texture and other features meet the preset standards. If a defect is found, the system will automatically mark the defect location and issue an alarm.
[0060] S1000, Result output: Output the test results (including dimensional measurement results, accuracy assessment results, defect detection results, etc.) in an appropriate form, such as displaying a detailed report on a display screen, or storing the data in a database for subsequent query and analysis. The output results should clearly and accurately reflect the status of the object being tested and relevant information about the testing process.
[0061] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A visual inspection accuracy improvement system based on high-resolution images, characterized in that: include: An image acquisition device is used to acquire high-resolution images of the detected object. The image acquisition device is a high-precision industrial camera, and its resolution, frame rate and color mode can be set according to the feature extraction requirements of the detected object; Lighting system to provide uniform illumination that can be adjusted according to the inspection scene and the shape complexity of the inspected object, including the use of circular lighting devices or special lighting angle settings; Image processing unit, used to analyze and measure the acquired images, with the ability to quickly process high-resolution image data and corresponding image processing software; Mechanical positioning system, used to accurately position the inspected object in the inspection area, which can be customized according to the type and size of the inspected object; The feature processing module is used to process the pre-processed image using the Canny algorithm, including calculating the gradient amplitude and direction, performing non-maximum suppression, double threshold detection and edge connection, so as to extract the edge features and geometric features of the detected object; The dimension measurement module is used to measure the dimension parameters of the detected object according to the extracted features, and can adopt the measurement method based on geometric formula, feature matching or contour fitting; The accuracy assessment module is used to evaluate the accuracy of the measurement results and calculate indicators such as measurement error and repeatability; The defect detection module is used to compare the extracted features with the preset standard features to determine whether the inspected object has defects. If so, the defect location is automatically marked and an alarm is issued; The result output module is used to output the test results in a suitable form, including displaying a detailed report on a display screen or storing it in a database.
2. The visual inspection accuracy improvement system based on high-resolution images according to claim 1 is characterized in that: When collecting images, the high-precision industrial camera can adopt a multi-angle shooting method for objects with complex shapes or requiring multi-viewing angle detection, using cameras arranged in a ring to shoot simultaneously from different directions to obtain multiple high-resolution images.
3. The visual inspection accuracy improvement system based on high-resolution images according to claim 1 is characterized in that: When the image processing unit preprocesses the image, the following operations are included: Adjust brightness and contrast to enhance the contrast between the target object and the background by performing linear or nonlinear transformations on the image pixel values; Use a Gaussian filter to smooth the image and remove noise from the image by taking a weighted average of each pixel in the image and its surrounding pixels; The image is binarized according to the detection requirements and converted into a black and white image. The binarization threshold can be adjusted according to the specific situation of the image.
4. The system for improving visual inspection accuracy based on high-resolution images according to claim 1 is characterized in that: When calculating the gradient magnitude and direction, the feature processing module uses a filter such as a Sobel operator to perform a convolution operation on each pixel in the preprocessed image to calculate the gradient components Gx and Gy in the horizontal and vertical directions, and then calculates the gradient magnitude G = √(Gx 2 +Gy 2 ) and direction θ = arctan(Gy / Gx).
5. The visual inspection accuracy improvement system based on high-resolution images according to claim 1 is characterized in that: When performing non-maximum suppression, the feature processing module traverses each pixel in the gradient amplitude image, determines two adjacent pixel points in the gradient direction according to its gradient direction, compares the gradient amplitude of the pixel with its adjacent pixel points, and sets its gradient amplitude to 0 if it is not a local maximum, otherwise it remains unchanged.
6. The visual inspection accuracy improvement system based on high-resolution images according to claim 1 is characterized in that: When the feature processing module performs dual threshold detection, the high threshold Th is set to 2.5 and the low threshold Tj is set to 1. Pixels with gradient amplitudes greater than the high threshold are strong edge pixels, those with gradient amplitudes less than the low threshold are non-edge pixels, and those between the two are weak edge pixels. When the edges are connected, the strong edge pixels are directly retained. If the weak edge pixels are adjacent to the strong edge pixels, they are determined to be part of the edge, otherwise they are non-edge pixels.
7. The visual inspection accuracy improvement system based on high-resolution images according to claim 1 is characterized in that: When performing defect detection, the defect detection module compares the size parameters and shape characteristics of automobile parts to see whether they meet the design requirements; and compares the shape, color, texture and other characteristics of electronic product appearance to see whether they meet the preset standards.
8. A method for improving visual inspection accuracy based on high-resolution images, characterized in that: The following steps are involved: S100, equipment preparation: select appropriate high-resolution image acquisition equipment and determine its parameters; Prepare the lighting system, image processing unit, and mechanical positioning system; S200, collect various types of high-resolution images as references and conduct preliminary screening of actual detection images; S300, image acquisition: placing the object to be inspected on the mechanical positioning system, starting the image acquisition device to acquire images, and adopting multi-angle shooting for objects with complex shapes; S400, image preprocessing: adjusting brightness contrast, performing Gaussian filtering denoising and binarization processing; S500, gradient calculation: calculating the gradient component, amplitude and direction of each pixel in the preprocessed image; S600, Canny algorithm application: perform non-maximum suppression, double threshold detection and edge connection, extract edge and geometric features; S700, size measurement: measure the size parameters of the detected object based on the extracted features; S800, Accuracy Assessment: Calculate the accuracy index of the measurement results, and optimize if it does not meet the requirements; S900, defect detection: compare the extracted features with the preset standard features to determine whether there are defects and process them; S1000, result output: output the test result in a suitable form.
9. The method for improving visual inspection accuracy based on high-resolution images according to claim 8, characterized in that: In the S100 equipment preparation step, a high-resolution image acquisition device is selected based on the feature extraction requirements of the inspected object. A camera with high resolution and moderate frame rate is selected for the inspection of tiny parts. The lighting system is prepared based on the inspection scene and the complexity of the object shape, and the mechanical positioning system is customized based on the object type and size.
10. The method for improving visual inspection accuracy based on high-resolution images according to claim 8, characterized in that: In the S500 gradient calculation step, a filter such as the Sobel operator is used to perform a convolution operation to calculate the gradient component. Specifically, for each pixel point in the image, the Sobel operator's template in the horizontal and vertical directions is convolved with the pixel value in the neighborhood centered on the pixel point to obtain the gradient component, and then the gradient amplitude and direction are calculated.
11. The method for improving visual inspection accuracy based on high-resolution images according to claim 8, characterized in that: In the application steps of the S600 Canny algorithm, when non-maximum suppression is performed, adjacent pixels are determined according to the gradient direction of the pixel points and the gradient amplitudes are compared. When dual threshold detection is performed, the set high threshold of 2.5 and low threshold of 1 are used for classification. When edge connection is performed, the final edge is determined according to the rules.
12. The method for improving visual inspection accuracy based on high-resolution images according to claim 8, characterized in that: In the S900 defect detection step, different feature comparison methods are used for different types of objects. Auto parts are compared in terms of size and shape, and the appearance of electronic products is compared in terms of shape, color, texture and other features.
Citation Information
Cited By
Intelligent identification and classification system for conveyor belt materials based on machine vision
CN120431403A
Product assembly line automatic detection system based on visual identification
CN121860921A