A square grid product quality detection method based on machine vision

CN117372372BActive Publication Date: 2026-09-18ZHONGKE WEIKE TECH (HENAN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311364311.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2026-09-18
Estimated Expiration
2043-10-20

AI Technical Summary

Technical Problem

[0005]鉴于此,本发明的目的在于提供一种基于机器视觉的方形网格产品质量检测方法,有效的解决了现有的方孔网板方形孔形状规范检测工作效率低,误差大的问题

Benefits of technology

[0013]The beneficial effects of the above technical solution are as follows: Given the shape characteristics of square mesh holes—that all four sides are of equal length and the shape remains unchanged after a 90-degree rotation—this invention provides a machine vision-based method for inspecting the quality of square mesh products. This method involves rotating the acquired image by 90 degrees and then overlaying and comparing the rotated image with the original image. The overlaid image is then processed and compared with the rotated image. Correlation analysis of the images yields the standardization of the square holes in the square mesh. This method, through rotation and overlay processing, ensures high image discernibility even when the square holes in the mesh are irregular, enabling rapid sorting of non-standard parts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117372372B_ABST
    Figure CN117372372B_ABST
Patent Text Reader

Abstract

The application relates to a square grid product quality detection method based on machine vision, which comprises the following steps: carrying out gray scale processing on a first detection sample image and a second detection sample image, and carrying out edge detection on the two detection sample images to obtain the image contour of the gray scale image; carrying out extreme value screening on the image contour according to a set threshold value to obtain the first sample contour and the second sample contour after pretreatment; determining the center points of the first sample contour and the second sample contour, rotating all sample blocks in the first sample set by 90 degrees to obtain a second sample set; one-to-one overlapping corresponding sample blocks of the first sample set and the second sample set, and carrying out edge detection and extreme value screening to obtain an overlapping image sample set; carrying out correlation degree analysis on the overlapping sample set and the first sample set or the second sample set, and taking the correlation degree as the evaluation basis of the product quality of the square grid product. The application improves the detection efficiency and accuracy, and improves the overall quality of the square grid product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of product quality inspection technology using machine vision, and specifically to a method for inspecting the quality of square grid products based on machine vision. Background Technology

[0002] Machine vision is a rapidly developing branch of artificial intelligence. Simply put, machine vision uses machines to replace human eyes for measurement and judgment. A machine vision system uses machine vision products (i.e., image acquisition devices, which can be CMOS or CCD) to convert the captured target into image signals, which are then transmitted to a dedicated image processing system. This system obtains the target's shape information and, based on pixel distribution, brightness, color, and other information, converts it into digital signals. The image system performs various calculations on these signals to extract the target's features, and then controls the on-site equipment based on the judgment results.

[0003] Existing technologies, such as the invention patent with patent number 202011182219x, disclose a bearing quality inspection method based on machine vision. This method includes sampling two-dimensional images from a first sample set to obtain first bearing image information, thus obtaining a second sample set; performing three-dimensional measurement and reconstruction on the bearings in the second sample set to obtain second bearing image information; and obtaining the bearing surface defect type based on the second bearing image information. This approach uses image acquisition to obtain product information and then judges the product quality based on that information.

[0004] For products with square mesh, which have corresponding square mesh perforations, it is necessary to check whether the mesh meets the standards before leaving the factory. Therefore, it is necessary to inspect the shape of the square holes in the mesh. For this special structure, the existing technology generally uses image processing to detect the square holes, which is based on the contour attributes of the image itself. This requires a large amount of data comparison, has a long data processing time, a slow response time, and is prone to errors due to the shooting environment. However, it ignores the square characteristics of the square holes. This inspection method is inefficient, has errors, and is not easy to identify. Therefore, it is necessary to study a machine vision-based quality inspection method for square mesh products. Summary of the Invention

[0005] Therefore, the purpose of this invention is to provide a machine vision-based method for inspecting the quality of square mesh products, which effectively solves the problems of low efficiency and large error in the existing inspection of the shape specifications of square holes in square mesh panels.

[0006] To achieve the above objectives, the technical solution adopted by this invention is: a machine vision-based method for inspecting the quality of square grid products, comprising... The center of the product to be tested is placed at the detection center point of the conveyor belt, and it is linearly conveyed forward along the conveyor belt. The first and second cameras, which are arranged at intervals and correspond to the detection center point, are used to take pictures of the product to be tested located directly below it, thereby obtaining the first detection sample image and the second detection sample image. The first and second detection sample images are processed into grayscale, and then edge detection is performed on the two detection sample images to obtain the image contours of the grayscale images. The image contours are then subjected to extreme value filtering according to a set threshold to obtain the preprocessed first and second sample contours. Determine the center point of the first and second sample contours, and use this center point as the center to cut a circle between the two sample contours. Figure 1 One or more sample blocks are selected, and the sample blocks are marked in the corresponding order and placed into the first sample set and the second sample set. Then, all sample blocks in the first and second sample sets are rotated by 90 degrees to obtain the rotated sample sets. The corresponding samples in the rotated sample set are overlapped one-to-one with the corresponding sample blocks before rotation. Edge detection and extreme value screening are then performed to obtain the overlapping image sample set. The overlapping sample set is then compared with the first or second sample set to analyze the image correlation. The correlation degree is used as the evaluation criterion for the quality of square grid products.

[0007] Furthermore, in the correlation analysis, the overlapping sample set is analyzed separately with the first sample set and the second sample set, and the average correlation between the two is used as the evaluation basis for the quality of square grid products.

[0008] Furthermore, a central marker is provided on the testing center.

[0009] Furthermore, the sample block is square or circular.

[0010] Furthermore, during the correlation analysis, the center point is used as the coordinate far point, and the sample contours and superimposed sample contours are uniformly sampled to obtain two two-dimensional contour sets. The correlation between the two contours is obtained by calculating the correlation between the two sets of two-dimensional data.

[0011] Furthermore, a detection switch is installed on the conveyor belt to detect whether there is a product at the center point, and the detection result is reported to the first camera and the second camera. After a corresponding delay, the first camera and the second camera are activated to take pictures.

[0012] Furthermore, an indicator light is provided at the center point, and the corresponding indicator is activated according to the quality of the product. The indicator includes the brightness or color of the indicator light.

[0013] The beneficial effects of the above technical solution are as follows: Given the shape characteristics of square mesh holes—that all four sides are of equal length and the shape remains unchanged after a 90-degree rotation—this invention provides a machine vision-based method for inspecting the quality of square mesh products. This method involves rotating the acquired image by 90 degrees and then overlaying and comparing the rotated image with the original image. The overlaid image is then processed and compared with the rotated image. Correlation analysis of the images yields the standardization of the square holes in the square mesh. This method, through rotation and overlay processing, ensures high image discernibility even when the square holes in the mesh are irregular, enabling rapid sorting of non-standard parts.

[0014] In practical implementation, this invention employs two-point sampling and uses samples collected from both points as the processing objects, thereby expanding the sample diversity of the data. At the same time, the correlation between the two points can be used to determine the operational stability of the conveyor belt. Furthermore, the square plate can be rotated 90 degrees mechanically to obtain a sample image after mechanical rotation. The correlation between the two detected sample images is compared, and the mechanical correlation and correlation are weighted to obtain the evaluation criteria for the quality of the square grid product. This method can reduce errors caused by camera shooting, such as those caused by environment, grayscale processing, and edge detection.

[0015] In addition, the present invention also has an indicator light arranged at the center point, which displays different symbols to indicate the quality of the product, providing a clear and intuitive display that makes it easy for users to distinguish between them.

[0016] Therefore, this invention targets square-structured products for square inspection. Utilizing the characteristic that the shape of a square image remains unchanged after rotation, it can quickly distinguish the squareness standard of a shape. Images of the product under test are acquired by two spaced cameras. The acquired images are preprocessed to obtain a sample contour. This sample contour image is rotated 90 degrees to obtain a sample set. This sample set is then overlaid with the original sample image to obtain an overlapping sample set. Correlation analysis is performed between the overlapping sample set and a first or second sample set to obtain a quality evaluation of the square grid product. This method is quick and simple, improving data processing efficiency and reducing the amount of data processed. It enables rapid, accurate, and automated quality inspection of square grid products, improving inspection efficiency and accuracy, and enhancing the overall quality of square grid products. Furthermore, this invention can also classify and mark products based on the inspection results, facilitating subsequent sorting and repair work. Attached Figure Description

[0017] Figure 1 This is a schematic diagram illustrating an embodiment of the present invention; Figure 2 This is a flowchart illustrating the implementation structure of the present invention. Detailed Implementation

[0018] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments: Example 1: This example aims to provide a machine vision-based method for inspecting the quality of square grid products. It is mainly used to inspect the square grid standardization of square grid products. In view of the problems of current conventional image inspection methods, such as poor targeting, large data processing volume, low work efficiency, and large error, this example adds a constraint adjustment based on the characteristics of square structure. By rotating the image by 90 degrees, the sample complexity is increased, which can make the judgment more obvious, and a machine vision-based method for inspecting the quality of square grid products is provided.

[0019] like Figure 1-2 The paper demonstrates a machine vision-based method for inspecting the quality of square grid products. This method involves acquiring images of the product under test using two cameras spaced apart, preprocessing the images to obtain sample contours, rotating the sample contour images by 90 degrees to obtain a sample set, overlapping the obtained sample set with the original sample images to obtain an overlapping sample set, and performing correlation analysis between the overlapping sample set and a first or second sample set to obtain a quality evaluation of the square grid products.

[0020] In this embodiment, a conveyor belt is used for transport. The center of the product to be tested is placed at the detection center point of the conveyor belt, and the product is transported linearly forward along the conveyor belt. A detection switch is set on the conveyor belt to detect whether there is a product at the center point. The detection result is reported to the first camera and the second camera, and the first camera and the second camera are activated to take pictures after a corresponding delay. By transporting the product linearly along the conveyor belt, good stability can be achieved. By collecting data at two points, good data diversity can be achieved, and errors caused by the environment can be reduced.

[0021] In implementation, the first and second cameras are industrial cameras. They take pictures of the square grid products laid flat on the conveyor belt from an overhead perspective, corresponding to the detection center point. The first and second cameras, spaced apart, also take pictures of the products under test directly below them, obtaining a first and a second test sample image. The center point of both the first and second test sample images is located at the detection center point, providing a standard center for subsequent rotation processing. Furthermore, this embodiment takes pictures of the sample images from the central region, with the center point corresponding to the middle of the image, facilitating subsequent image processing, reducing processing difficulty, and improving data processing efficiency.

[0022] Subsequently, grayscale processing is performed on the first and second detection sample images, and edge detection is performed on the two detection sample images to obtain the image contours of the grayscale images. Extreme value filtering is performed on the image contours according to a set threshold to obtain the preprocessed first and second sample contours. This method can preprocess the image and extract the features of the image. This processing method also includes noise removal, contrast enhancement, image binarization and other operations to improve the image clarity and recognition accuracy.

[0023] The center point of the first sample contour and the second sample contour is determined, and the center point is used as the center of the circle. In this embodiment, the center point is the detection center point on the conveyor belt. Since the product to be tested is located at the center point, it can serve as the rotation center, providing a basis for the selection of the center point. At the same time, the detection center point has special identifiability, such as a circular structure, which can be easily found in the image without the need to re-determine the position of the center point.

[0024] This embodiment cuts out from two sample contours. Figure 1 One or more sample blocks are selected and labeled in a corresponding order, and then placed into a first sample set and a second sample set. During the operation, all sample blocks in the first sample set and the second sample set are rotated by 90 degrees to obtain a rotated sample set.

[0025] This embodiment takes advantage of the square characteristics of the sample image, which has the same length on all four sides and retains its shape after being rotated 90 degrees. Based on this characteristic, the acquired image is rotated 90 degrees and then superimposed on the original image for comparison. Correlation analysis of the images is used to obtain the standard degree of the square holes in the square mesh.

[0026] The rotated sample set is overlapped one-to-one with the corresponding sample block before rotation, and edge detection and extreme value screening are performed to obtain the overlapping image sample set. The correlation degree of the overlapping sample set is analyzed with the first sample set or the second sample set, and the correlation degree is used as the evaluation criterion for the quality of square grid products.

[0027] Specifically, after rotating 90 degrees, if the image is not square, the lines of the image are difficult to match with the original sample image, resulting in obvious forks, messy lines, and ghosting. After comparing it with the original sample image, the results can be obtained quickly and clearly through data correlation, that is, the correlation is very small and the graphic features are more obvious.

[0028] In practice, the sample blocks are either square or circular. The square and circular properties have the property that the edges remain unchanged after rotation, thereby reducing the impact of the sample block unit edges on the image.

[0029] This embodiment uses the mean squared error (MSE) method to calculate the similarity of images: it calculates the differences between pixels in two images, sums the squares of these differences, and finally divides by the number of pixels to obtain the MSE. The smaller the MSE value, the more similar the images are. This method is fast because its calculation method is relatively simple. It only requires calculating the differences between pixels in two images, summing the squares of these differences, and dividing by the number of pixels. It does not require complex image processing or conversion, so it is relatively fast. For contour images under grayscale images, focusing only on pixel-level differences can easily distinguish the similarity of images.

[0030] The mean squared error method is used to calculate the correlation between images. It calculates the difference between each pixel and then averages the results. The specific formula is as follows: Where a and y are the grayscale values ​​of corresponding pixels in the two images, m is the number of pixels, and the smaller J is, the more similar the images are.

[0031] In association analysis, the center point is used as the origin of the coordinate system. Uniform sampling is performed on the sample contours and the superimposed sample contours to obtain two two-dimensional contour sets. The correlation between the two contours is calculated by comparing the correlation between the two sets of two-dimensional data. The mean squared error (MSE) method is used to measure the difference between predicted and actual values. In image processing, MSE is used to measure the similarity or correlation between images. MSE is calculated by comparing the pixel values ​​of two images.

[0032] Suppose we have two images A and B of size M×N, where A is the sample image and B is the overlaid image. For each pixel position (i, j) in the image, calculate the difference between the pixel values ​​of A and B: diff(i, j) = A(i, j) - B(i, j).

[0033] Square the differences between all pixels: `diff_squared(i, j) = diff(i, j)²`. Average the squared differences between all pixels: `MSE = (1 / M*N) * Σ diff_squared(i, j)`. This represents the average difference between each pixel in the two images. A smaller value indicates greater similarity or correlation between the two images. It's worth noting that this method assumes higher brightness in the images, indicating a higher correlation.

[0034] This embodiment employs two-point sampling and uses the samples collected at both points as the processing objects, thereby expanding the sample diversity of the data. At the same time, the correlation between the two points can be used to determine the operational stability of the conveyor belt. In addition, the square plate can be rotated 90 degrees by mechanical rotation to obtain a sample image after mechanical rotation. The correlation between the two detected sample images is compared, and the mechanical correlation and correlation are weighted to obtain the evaluation criteria for the quality of the square grid product. This method can reduce the errors caused by camera shooting, such as those caused by environment, grayscale processing, and edge detection.

[0035] This invention addresses the squareness detection of products with a square structure. Utilizing the characteristic that the shape of a square image remains unchanged after rotation, it can quickly distinguish the squareness standard of a shape. This method is fast and simple, improving data processing efficiency and reducing the amount of data processed. It enables rapid, accurate, and automated quality inspection of square grid products, improving both inspection efficiency and accuracy, and ultimately enhancing the overall quality of square grid products. Furthermore, this invention can classify and mark products based on the inspection results, facilitating subsequent sorting and repair work.

[0036] Example 2: This example further provides a part to identify the quality of a product, so that users can distinguish between good and bad products.

[0037] In this embodiment, a central marker is provided at the testing center. A marker light is installed at the central marker, and the corresponding marker is activated based on the product's quality. The marker includes the brightness or color of the marker light. This embodiment uses marker lights at the central marker to display different markers, thus indicating the product's quality intuitively and easily for users to distinguish between them.

[0038] Example 3 further illustrates the comparison set of overlapping samples.

[0039] In the correlation analysis, the overlapping sample set is analyzed separately with the first sample set and the second sample set, and the average correlation between the two is used as the evaluation criterion for the quality of square grid products.

[0040] In this embodiment, a linear conveyor belt is used for transportation, so the shape of the product does not change. During the transportation process, two different cameras are used to capture product images. The superimposed image is compared with two sample images at the same time, which can reduce the errors caused by the environment and image processing. The average of the two images reflects the quality of the product, further reducing the error.

[0041] The sequence numbers of the embodiments in this application are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The above descriptions are only specific implementations of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art, within the technical scope disclosed in this application, can easily conceive of various equivalent modifications or substitutions, all of which should be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A machine vision-based method for inspecting the quality of square grid products, characterized in that: include The center of the product to be tested is placed at the detection center point of the conveyor belt, and it is linearly conveyed forward along the conveyor belt. The first and second cameras, which are arranged at intervals and correspond to the detection center point, are used to take pictures of the product to be tested located directly below it, thereby obtaining the first detection sample image and the second detection sample image. The first and second detection sample images are processed into grayscale, and then edge detection is performed on the two detection sample images to obtain the image contours of the grayscale images. The image contours are then subjected to extreme value filtering according to a set threshold to obtain the preprocessed first and second sample contours. Determine the center point of the first sample contour and the second sample contour, and take the center point as the center to capture one or more sample blocks in the two sample contours. Mark the sample blocks in the corresponding order and put them into the first sample set and the second sample set. Then, all sample blocks in the first and second sample sets are rotated by 90 degrees to obtain the rotated sample sets. The corresponding samples in the rotated sample set are overlapped one-to-one with the corresponding sample blocks before rotation. Edge detection and extreme value screening are then performed to obtain the overlapping image sample set. The overlapping sample set is then compared with the first or second sample set to analyze the image correlation. The correlation degree is used as the evaluation criterion for the quality of square grid products.

2. The machine vision-based method for inspecting the quality of square grid products according to claim 1, characterized in that: In the correlation analysis, the overlapping sample set is analyzed separately with the first sample set and the second sample set, and the average correlation between the two is used as the evaluation criterion for the quality of square grid products.

3. The machine vision-based method for inspecting the quality of square grid products according to claim 1, characterized in that: When performing correlation analysis, the center point is used as the coordinate far point. The sample contours and superimposed sample contours are uniformly sampled to obtain two two-dimensional contour sets. The correlation between the two contours is obtained by calculating the correlation between the two sets of two-dimensional data.

4. The machine vision-based method for inspecting the quality of square grid products according to claim 1, characterized in that: In the correlation analysis, the mean squared error method is used to calculate the correlation between images.

5. The machine vision-based method for inspecting the quality of square grid products according to claim 1, characterized in that: The testing center is equipped with a central marker.

6. The machine vision-based method for inspecting the quality of square grid products according to claim 1, characterized in that: The sample block is square or circular.

7. The machine vision-based method for inspecting the quality of square grid products according to claim 1, characterized in that: A detection switch is installed on the conveyor belt to detect whether there is a product at the center point. The detection result is reported to the first camera and the second camera, and the first camera and the second camera are activated to take pictures after a corresponding delay.

8. The machine vision-based method for inspecting the quality of square grid products according to claim 1, characterized in that: An indicator light is installed at the center point, and the corresponding indicator is activated according to the quality of the product. The indicator includes the brightness or color of the indicator light.

Citation Information

Patent Citations

  • Solid-state image pickup device

    CN103003944A

  • Photoetching alignment mark for measuring inclination angle and rotation angle and alignment method

    CN112904682A