Device consistency detection method, device, equipment and storage medium
By analyzing the feature points and rotation angles in the images captured by the detection elements of the AOI device, and calculating the position and angle differences of each detection point, the problem that AOI devices are difficult to ensure consistency during parallel detection is solved, and efficient and accurate device consistency detection is achieved.
Patent Information
- Application Number
- CN202411689834.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-04
AI Technical Summary
When AOI optical detection equipment detects multiple components in parallel, it is difficult to ensure the consistency of each detection point, resulting in a decrease in detection efficiency and accuracy. The existing methods rely on empirical judgment, which is low efficiency and low reliability.
By acquiring the image to be detected captured by the detection element, analyzing the target feature points and rotation angles in the image, calculating the position difference and angle difference between each detection element, and determining the mechanical movement consistency of the mechanical moving device based on these differences.
The equipment consistency detection based on quantitative indicators is realized, the consistency detection efficiency and accuracy of AOI devices are improved, and the dependence on human judgment is reduced.
Smart Images

Figure CN119762425A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of device detection, and in particular to a method, apparatus, device and storage medium for detecting device consistency. Background Art
[0002] AOI optical inspection equipment has now become an important inspection tool and process quality control tool for ensuring product quality in the electronics manufacturing industry. In order to improve the inspection rate of AOI equipment, a common method is to inspect multiple materials in parallel and place multiple materials at different inspection points at one time. Use multiple cameras to take pictures of materials on multiple acupoints at the same time for measurement and inspection. However, the inspection and measurement results of materials on different acupoints are usually affected by many factors, making it difficult to achieve consistency between acupoints. In order to improve the inspection accuracy, it is necessary to obtain consistency between acupoints so that the equipment can be debugged when the consistency is poor.
[0003] Currently, the consistency of the detection equipment is usually judged manually by experienced optical engineers, which may result in low efficiency and low reliability of the judgment. Summary of the invention
[0004] Based on this, it is necessary to provide a device consistency detection method, apparatus, equipment and storage medium to address the above technical problems, which can improve the efficiency and accuracy of analyzing the consistency of optical detection equipment.
[0005] In a first aspect, the present application provides a method for detecting device consistency, comprising:
[0006] When at least two detection elements are respectively moved to corresponding detection points by a mechanical moving device associated with the optical detection device, an image to be detected captured for the detection element is acquired;
[0007] Determine the target feature points and target rotation angles of each detection element based on the area image where the detection element in the image to be detected is located;
[0008] Determining position differences between target feature points of each detection element and angle differences between target rotation angles of each detection element;
[0009] Based on the position difference and the angle difference, the consistency of the mechanical movement of the mechanical movement device is determined.
[0010] In a second aspect, the present application provides a device consistency detection apparatus, comprising:
[0011] An acquisition module, used for acquiring images to be detected taken for the detection elements when at least two detection elements are respectively moved to corresponding detection points by mechanical moving devices associated with the optical detection equipment;
[0012] A determination module, used to determine the target feature points and target rotation angle of each detection element based on the regional image where the detection element is located in the image to be detected;
[0013] A difference module, used to determine the position difference between the target feature points of each detection element and the angle difference between the target rotation angles of each detection element;
[0014] The consistency module is used to determine the mechanical movement consistency of the mechanical movement device based on the position difference and the angle difference.
[0015] In a third aspect, the present application provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method when executing the computer program.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above method when executed by a processor.
[0017] In a fifth aspect, the present application provides a computer program product, which includes a computer program, and the computer program implements the steps in the above method when executed by a processor.
[0018] The above-mentioned device consistency detection method, device, equipment and storage medium obtain the image to be detected by taking pictures of the detection element, and analyze the image to be detected to obtain the feature points and rotation angles of the detection element in the image to be detected, and then compare the feature points and rotation angles of the detection element in the image to be detected corresponding to different detection points to obtain the mechanical consistency of the optical detection device, that is, by obtaining the feature points and rotation angles of each detection element after it moves to the corresponding detection point, the mechanical movement consistency of the mechanical moving device of the optical detection device is inferred. In this way, the consistency can be quantified based on quantitative indicators, thereby improving the efficiency and accuracy of consistency detection of the optical detection device. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic diagram of a flow chart of a method for detecting device consistency provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of a process for determining target feature points and target rotation angles provided in an embodiment of the present application;
[0021] Figure 3 A schematic diagram of an image to be detected provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of a process for obtaining brightness consistency provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of a process for obtaining optical focal length consistency provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of a characteristic region provided in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of a process for determining a camera installation angle provided in an embodiment of the present application;
[0026] Figure 8 A schematic diagram of a flow chart of another device consistency detection method provided in an embodiment of the present application;
[0027] Fig. 9 A structural block diagram of a device consistency detection apparatus provided in an embodiment of the present application;
[0028] Fig.10 An internal structure diagram of a computer device provided in an embodiment of the present application;
[0029] Fig.11 An internal structure diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] AOI equipment, the full name of which is Automated Optical Inspection equipment, is a high-precision inspection technology that is widely used in modern manufacturing. AOI equipment uses machine vision technology to perform non-contact automated inspections of electronic components or products through light sources and cameras, so as to detect a large number of components in a short period of time, accurately identify potential defects or problems, and thus improve product quality.
[0032] In order to improve the inspection efficiency of AOI equipment, a parallel inspection method is usually used, that is, multiple inspection components are placed on the corresponding inspection points of the AOI equipment at one time, and then multiple cameras are used to take pictures of the inspection components on the corresponding inspection points to measure and inspect the inspection components.
[0033] When parallel detection is used, since the operation process of each detection element is independent, that is, the detection elements are moved to the corresponding detection points by mechanical moving devices, the position of each detection element relative to the detection point may also be different, so it is difficult to ensure the consistency and stability of the AOI equipment. When the consistency of the AOI equipment, that is, the optical detection equipment, is poor, the detection efficiency of the AOI equipment will also be reduced. Therefore, in order to solve or improve the above problems, the present application proposes the following embodiments.
[0034] like Figure 1 As shown, the embodiment of the present application provides a method for detecting device consistency, the method comprising the following steps:
[0035] S102, when at least two detection elements are respectively moved to corresponding detection points by mechanical moving devices associated with the optical detection equipment, images to be detected captured for the detection elements are acquired.
[0036] Among them, when the detection element is placed at the detection point, the shooting device corresponding to the detection point shoots the detection element to facilitate the subsequent detection of the detection element. In addition to detecting the detection element, the image obtained by shooting the detection element can also reflect the consistency of the optical detection device itself through the image, thereby realizing the consistency detection of the optical detection device. It can be understood that the mechanical moving device can be a device of the optical detection device, and can also perform the moving operation by communicating with the optical detection device. Specifically, the mechanical moving device can be a device such as a robotic arm.
[0037] In order to detect whether the optical inspection device is consistent when inspecting multiple components in parallel, when at least two inspection components are respectively moved to corresponding inspection points by a mechanical moving device, images to be inspected taken for the inspection components are acquired.
[0038] In some embodiments, the mechanical moving device may further include a fixture, which is a fixture for fixing the detection element. When the optical detection device is subjected to consistency detection, the fixture may also be detected, for example, whether the position and angle of the fixture corresponding to each detection point are consistent, so that the consistency of the optical detection device can be monitored from multiple angles.
[0039] In some embodiments, each detection point corresponds to a camera that takes a picture of the detection element moved to the detection point. In order to improve the fineness of the captured image and thus improve the detection accuracy of the AOI equipment, the camera can maintain a certain degree of verticality with the detection element. For example, each camera can face the corresponding detection element. That is, the optical axis of the camera can be kept perpendicular to the detection element. In this way, the structure on the detection element, such as the structure of components on a circuit board, can be accurately acquired, reducing image blur and deviation problems caused by shooting angles.
[0040] In some embodiments, obtaining an image to be detected captured for a detection element includes:
[0041] The images to be inspected for the inspection element are respectively acquired by at least two shooting devices of the optical inspection equipment, and the shooting devices face the inspection element.
[0042] S104, determining target feature points and target rotation angles of each detection element based on the area image where the detection element in the image to be detected is located.
[0043] The area image corresponding to the detection element is a partial image in the image to be detected. If the position of the detection element at the detection point is inconsistent with the positions of other detection elements at the corresponding detection points after the detection element is moved to the detection point, it can be reflected by comparing the area image corresponding to the detection element in the image to be detected corresponding to each detection point. The comparison index can be quantified based on the target feature points and target rotation angles of each detection element in the image to be detected.
[0044] Among them, the target feature point can be a point that identifies the position of the regional image corresponding to the detection element in the image to be detected. For example, it can be a corner point of the detection element. The target rotation angle is used to indicate the rotation angle of the regional image corresponding to the detection element compared to the image to be detected. If the target feature points and target rotation angles corresponding to different detection points are inconsistent, it means that the consistency of the optical detection device is poor. Afterwards, the consistency result of the optical detection device can be obtained based on the target feature points and target rotation angles corresponding to different detection points, and then the consistency of the optical detection device can be adjusted based on the consistency result.
[0045] In some embodiments, the horizontal edge line and the vertical edge line of the target area can be determined, and the target feature point can be determined based on the intersection of the horizontal edge line and the vertical edge line, and the target rotation angle can be determined based on the horizontal edge line and the preset edge line of the image to be detected.
[0046] S106, determining the position difference between the target feature points of each detection element and the angle difference between the target rotation angles of each detection element.
[0047] S108, determining the mechanical movement consistency of the mechanical movement device based on the position difference and the angle difference.
[0048] Among them, the position difference can be the distance between the target feature points. The coordinates of the target feature points of each detection element can be obtained first, and then the distance between the target feature points corresponding to each detection element and other target feature points can be obtained based on the coordinates, and then the position difference between the target feature points of each detection element can be obtained. Specifically, the images to be detected corresponding to each detection element can also be overlapped to obtain the distribution of the target feature points, and then the position difference can be obtained based on the distribution. The angle difference is the difference between the rotation angles of each target. The target rotation angle of the detection element can be the rotation angle of a certain edge of the detection element compared to the preset edge. The preset edge can be, for example, a certain edge of the image to be detected.
[0049] Among them, mechanical movement consistency refers to whether the operation of the mechanical moving device corresponding to each detection point is consistent, that is, whether each detection element is accurately moved to the detection point. Specifically, if the detection element is placed on a jig, and the jig can fix the detection element by suction, then the mechanical movement consistency also includes the consistency of the jig. That is, whether the jigs corresponding to each detection point are consistent. The steps of judging the consistency of the detection equipment through the jig can refer to the steps of judging the consistency of the detection equipment through the detection element, which will not be repeated here.
[0050] It can be seen that in the embodiment of the present application, by obtaining the image to be detected obtained by shooting for the detection element, and analyzing the image to be detected to obtain the characteristic points and rotation angles of the detection element in the image to be detected, and then by comparing the characteristic points and rotation angles of the detection element in the image to be detected corresponding to different detection points, the mechanical consistency of the optical detection device is obtained, that is, by obtaining the characteristic points and rotation angles after each detection element is moved to the corresponding detection point, the mechanical movement consistency of the mechanical moving device of the optical detection device is inferred. In this way, the consistency can be quantified based on quantitative indicators, so that the efficiency and accuracy of the consistency detection of the optical detection device can be improved. In addition, by analyzing the regional image of the detection element in the image to be detected, the abnormal problems of the transport detection element can also be monitored, for example, whether the mechanical moving device is abnormal can be monitored. And the method of the embodiment of the present application can be quickly reused in different optical detection equipment, compared with installing other equipment on the optical detection equipment to determine the consistency of the optical detection equipment, the detection efficiency can be improved and the detection cost can be reduced.
[0051] If the consistency of the AOI equipment is high, then the images taken by the AOI equipment for each detection element should be consistent. That is, the position of the detection element in the captured image is consistent, and the distance of the detection element relative to the edge of the captured image is consistent. Therefore, in order to determine the consistency of each detection point of the AOI equipment, it can be determined by the regional information of the detection element area image. The regional information can be, for example, the position information of a certain point in the detection element area image, the edge line of the detection element area, the angle of the detection element area image relative to the image, the position information or angle information of a specific area of the detection element in the captured image, etc.
[0052] like Figure 2 As shown, based on the regional image where the detection element in the image to be detected is located, the target feature points and the target rotation angle of each detection element are determined, including:
[0053] S202, determining a horizontal edge line and a vertical edge line of the detection element based on a region image where the detection element in the image to be detected is located.
[0054] S204: Taking the intersection of the horizontal edge line and the vertical edge line as the target feature point of the detection element.
[0055] S206, determining a target rotation angle of the detection element based on the horizontal edge line and a preset edge line of the image to be detected.
[0056] For example, the detection element has two intersecting edge lines, for example, the detection element is rectangular. By analyzing the image to be detected, the position of the detection element in the image to be detected can be roughly determined first, that is, the regional image where the detection element in the image to be detected is located can be determined, and then the horizontal edge line and the vertical edge line of the detection element can be determined based on the roughly determined position. Then, the target feature point can be determined based on the corner points of the horizontal edge line and the vertical edge line (refer to Figure 3 ). And determine the target rotation angle based on the horizontal edge line and the preset edge line of the image to be detected (reference Figure 3 ). For example, the target rotation angle may be determined based on the angle between the horizontal edge line and the preset edge line, or may be determined based on the angle between the vertical edge line and the preset edge line.
[0057] It can be seen that in the embodiment of the present application, by identifying the horizontal edge lines and vertical edge lines of the detection element in the image to be detected based on the area image where the detection element in the image to be detected is located, the target feature points and target feature angles can be determined, which can improve the possibility of quantification. By determining the consistency through points and angles, the accuracy of the consistency judgment of the optical detection equipment can be improved.
[0058] In some embodiments, determining the consistency of mechanical movement of the mechanical movement device based on the position difference and the angle difference includes:
[0059] If the position difference corresponding to each detection point is greater than the preset position difference or the corresponding angle difference is greater than the preset angle difference, it is determined that the mechanical movement consistency of the mechanical movement device is inconsistent.
[0060] In this way, the position difference and angle difference are obtained for judgment. If the difference is greater than the preset difference, it means that the inconsistency between the detection points is high and has reached the level that requires adjustment. In this way, minor inconsistencies can be ignored, and the fluctuation of data can be ignored, and the consistency of the optical detection equipment can be adjusted when necessary.
[0061] As mentioned above, the consistency of mechanical movement can also include the movement of the fixture of the AOI equipment. The consistency of the fixture is judged to enhance the consistency of the AOI equipment. When the image of the area where the fixture is located is determined from the image to be detected, the feature points of the fixture can also be determined by identifying the horizontal and vertical edge lines of the fixture, and then determining whether the position of the fixture is consistent. This can reduce the impact of the detection element placed on the fixture blocking the fixture and causing the fixture to be unable to be accurately positioned.
[0062] In addition to judging the consistency of the AOI equipment, by analyzing the image, it is also possible to determine whether there are any abnormalities in the transportation and movement of the detection component based on the analysis results of the image, such as whether the detection component has moved to the detection point, whether the detection component has fallen during the movement, and other abnormal situations.
[0063] In some embodiments, after determining the target feature points and the target rotation angle of each detection element based on the regional image where the detection element in the image to be detected is located, the method further includes:
[0064] If the target feature point is within the preset abnormal range or the target rotation angle is within the preset abnormal range, it is determined that the detection component handling is abnormal during the operation of the optical detection device.
[0065] It can be seen that in this embodiment, by analyzing the image to be detected, it is also possible to monitor and detect abnormal component transportation.
[0066] Since AOI equipment relies on optical imaging technology, light and environmental conditions are crucial to the inspection results. In some embodiments, image analysis can also determine the consistency of the optical inspection equipment at the optical level. For example, whether the brightness corresponding to multiple inspection points is consistent, and whether the optical focal lengths corresponding to multiple inspection points are consistent. Figure 4 As shown, the brightness consistency information of the optical detection device can be obtained through the grayscale information of the image to be detected.
[0067] S402: Establish a target coordinate system based on the target feature points and the target rotation angle.
[0068] The target coordinate system may be a coordinate system established with the target feature point as the origin and an edge line (vertical edge line or horizontal edge line) at a target rotation angle from a preset edge line as one of the coordinate axes. By establishing the coordinate system, the accuracy of positioning the target area can be improved.
[0069] S404: Determine the region of interest image in the image to be detected in the target coordinate system.
[0070] Among them, the region of interest image is a partial region image of the detection element. The region of interest image is used to focus on the target element or target area of the detection element. In some embodiments, the optical detection device may only focus on a partial area of the detection element, such as a certain part of the circuit element. Then, when determining the brightness consistency information of the optical detection device, it can be determined based on the region of interest image. In this way, the amount of calculation can be reduced while achieving the brightness consistency of the detection, thereby improving the detection efficiency.
[0071] S406, determining grayscale information of the image of the region of interest, and determining a brightness characteristic value of the image to be detected based on the grayscale information.
[0072] The grayscale information is the grayscale value of each pixel in the image of the region of interest. By obtaining the grayscale value of each pixel in the image of the region of interest, the average of the grayscale values of these pixels is calculated, and then the brightness characteristic value of the image to be detected is obtained. The brightness characteristic value is used to reflect the brightness of the environment where the optical detection device is located (specifically, it can be the environment where the detection element is located).
[0073] S408, determining the brightness consistency of the optical detection device based on the brightness characteristic values of different images to be detected.
[0074] Exemplarily, the brightness characteristic values corresponding to different detection images can be compared to determine the brightness consistency of the optical detection device. If the difference between the brightness characteristic values corresponding to different detection points is greater than the preset brightness difference, the brightness consistency of the optical detection device is poor. If the difference between the brightness characteristic values corresponding to different detection points is less than or equal to the preset brightness difference, the brightness consistency of the optical detection device is good.
[0075] It can be seen that in the embodiment of the present application, by performing brightness analysis on different images to be detected, the brightness characteristic value corresponding to the image to be detected is determined based on the grayscale information of the image of the region of interest in the image to be detected, and then the brightness consistency information of the optical detection device can be obtained based on the brightness characteristic value. After obtaining the image to be detected in this way, the brightness consistency of the device can also be analyzed, thereby expanding the detection breadth.
[0076] like Figure 5 As shown, the optical focal length consistency of the optical detection device can be obtained through the contrast information of the image to be detected.
[0077] S502: Establish a target coordinate system based on the target feature points and the target rotation angle.
[0078] S504: Determine a feature region image based on the edge of the detection element in the target coordinate system.
[0079] S506, determining the grayscale gradient information of the feature region image, and determining the contrast characteristic value of the image to be detected based on the grayscale gradient information.
[0080] S508: Determine the consistency of the optical focal length of the optical detection device based on the contrast characteristic values of different images to be detected.
[0081] The feature region image is used to reflect the contrast information of the image to be detected. Contrast refers to the ratio of the brightness difference between the brightest part and the darkest part of the image. Since the brightness and darkness of the edge of the image vary greatly, the feature region image can be determined based on the edge of the detection element. Figure 6 After determining the feature region image, the grayscale gradient information of the determined feature region image can be obtained along the edge. The grayscale gradient information refers to the rate of change of the grayscale value. The grayscale gradient can be calculated along the vertical edge. The contrast characteristic value of the image to be detected is then determined based on the grayscale gradient information.
[0082] In some embodiments, to enhance the reliability of data, multiple feature regions may be determined along the edge, the grayscale gradient values of these feature regions are calculated, and the contrast feature value of the detection point is obtained based on the average value of the grayscale gradient values of these feature regions.
[0083] Then, based on the contrast characteristic values of different images to be detected, it can be determined whether the focus position of the shooting device of the optical detection device is consistent, and then the consistency of the optical focal length of the optical detection device can be obtained. For example, the contrast characteristic values of different images to be detected can be compared. If the difference between the contrast characteristic values of different images to be detected is within a preset difference range, it can be determined that the consistency of the optical focal length of the optical detection device is high.
[0084] It can be seen that in this embodiment, by analyzing the image to be detected, the feature area image is determined based on the edge of the detection element area image, and then the contrast characteristic value is obtained based on the grayscale gradient information of these feature area images, so as to reflect whether the focus position of the camera is consistent, and then the optical focal length consistency of the optical detection device can be obtained. In this way, the optical focal length consistency of the optical detection device can also be obtained by analyzing the image to be detected, further increasing the consistency detection breadth of the detection device.
[0085] In the process of the optical inspection device inspecting the inspection element, the shooting device installed in the AOI device takes a picture of the inspection element, and the inspection element is inspected by analyzing the captured image. In some embodiments, due to the requirements of inspection accuracy, for example, when inspecting a circuit board, it may be required to maintain a certain verticality between the circuit board and the shooting device. If the verticality is not good, it may cause image blur, deformation or shadow, thereby reducing the image quality and affecting the accuracy of the inspection result. In the existing scheme, tools such as verticality detectors and vernier calipers are usually used to manually inspect and verify the camera installation position angle. The measurement accuracy is affected by the professional level of the operator and the degree of operation specification, and the inspection accuracy and reliability are poor. Alternatively, an expensive optical axis consistency detection device is used for inspection, which requires sufficient installation space inside the AOI device and has large usage restrictions. Therefore, in one implementation, a specific pattern can be set on the fixture of the optical inspection device, and the correctness of the camera installation angle can be judged by taking a picture of the fixture and analyzing the fixture image. The fixture is a device for fixing the inspection element. After the inspection element is moved to the fixture by a mechanical moving device, the camera takes a picture of the inspection element. Therefore, the verticality between the inspection component and the camera can be improved by analyzing the verticality between the fixture and the camera, thereby improving the quality of the captured image. Figure 7 For details, please refer to the following steps:
[0086] S702, photographing a fixture of the optical inspection equipment to obtain a fixture image.
[0087] S704, detecting edge points of the groove in the jig image, fitting the edge points based on the least square method, and determining the groove in the jig image.
[0088] S706, determining the inclination angle between the optical axis of the optical inspection device and the fixture based on the ratio of the major and minor axes of the groove, so as to determine the correctness of the camera installation angle of the optical inspection device.
[0089] Exemplarily, the specific pattern of the jig may be circular. When the optical axis of the shooting device is perpendicular to the jig, the specific pattern in the jig image is also circular. If the optical axis of the shooting device is not perpendicular to the jig, the specific image in the jig image may be elliptical. Therefore, the present embodiment can obtain an image of a specific pattern in the jig image to determine the correctness of the camera installation angle of the optical detection device. Specifically, after shooting the jig, the jig image is obtained. The edge points of the groove in the jig image are detected, and the grooves in the jig image are obtained by fitting the edge points based on the least squares method. The inclination angle between the optical axis of the optical detection device and the jig is determined based on the major-minor axis ratio of the groove. When the major-minor axis ratio of the groove is close to 1, it means that the optical axis of the shooting device is closer to the vertical surface of the jig. When the major-minor axis ratio of the groove is larger than 1, it means that the optical axis of the shooting device is less vertical to the jig surface, and relevant adjustments need to be made. When adjusting, the adjustment angle can be determined based on the major-minor axis ratio of the groove, and then the camera or jig is adjusted based on the adjustment angle.
[0090] It can be seen that in the embodiment of the present application, by setting a specific pattern on the fixture and photographing the specific image, the camera installation angle is reflected by the imaging of the specific pattern, so that the camera installation angle can be detected without the aid of other instruments, thereby reducing detection operations and reducing detection costs.
[0091] In an exemplary embodiment, Figure 8 As shown, in order to make the multiple detection points of the optical detection device consistent, the image obtained by the shooting device at each detection point shooting the material can be obtained. The material is the detection element. The image to be detected shot at each detection point is analyzed to determine the consistency of the multiple detection points of the optical detection device through imaging, and then adjust the optical detection device based on the consistency.
[0092] When at least two detection elements are respectively moved to corresponding detection points by the mechanical moving device, images to be detected captured for the detection elements are acquired.
[0093] To ensure the correctness of the detection results, corresponding images to be detected can be obtained respectively through at least two shooting devices of the optical detection equipment, and the shooting devices are facing the detection element. If the shooting device is not facing the detection element, the installation angle of the shooting device can be adjusted. Specifically, the installation angle of the shooting device and the detection element can be achieved by the following steps: shooting the fixture of the optical detection equipment to obtain a fixture image; determining the rotation angle of the fixture based on the fixture image; detecting the edge points of the groove in the fixture image, fitting the edge points based on the least squares method, and determining the groove in the fixture image; determining the inclination angle between the optical axis of the optical detection equipment and the fixture based on the major and minor axis ratio of the groove and the rotation angle, so as to determine the correctness of the camera installation angle of the optical detection equipment.
[0094] After obtaining the image to be detected, the horizontal edge line and the vertical edge line of the detection element can be determined. The intersection of the horizontal edge line and the vertical edge line is used as the target feature point of the detection element, and the target rotation angle of the detection element is determined based on the horizontal edge line and the preset edge line of the image to be detected. Specifically, before determining the horizontal edge line and the vertical edge line, the template matching method can be used to roughly locate the position of the detection element in the image to be detected. In this way, the range of determining the edge line can be narrowed first, reducing the amount of calculation.
[0095] Specifically, in order to enhance the detection of mechanical consistency, the horizontal and vertical edge lines of the material and the fixture can also be detected, and the position of the material and the fixture in the image to be detected can be analyzed. The mechanical consistency of the optical inspection equipment can be analyzed through the results of the two.
[0096] Then, the position difference between the target feature points of each detection element and the angle difference between the target rotation angles of each detection element are obtained. If the position difference corresponding to each detection point is greater than the preset position difference or the corresponding angle difference is greater than the preset angle difference, the mechanical movement consistency of the optical detection device is determined to be inconsistent. The higher the consistency requirement, the smaller the value of the preset angle difference and the preset position difference.
[0097] In addition, if the target feature point is within the preset abnormal range or the target rotation angle is within the preset abnormal range, it is determined that the detection element handling is abnormal during the operation of the optical detection device. For example, for multiple detection points, if the target feature point cannot be found in the image to be detected corresponding to a certain detection point, it means that the detection element corresponding to the detection point may have fallen.
[0098] In addition to analyzing the mechanical consistency of the optical inspection device based on the image to be inspected, the optical consistency of the optical inspection device may also be analyzed, such as optical brightness consistency and optical focal length consistency.
[0099] For optical brightness consistency, a target coordinate system can be established based on the target feature points and the target rotation angle; the image of the region of interest in the image to be detected is determined in the target coordinate system; the grayscale information of the image of the region of interest is obtained, and the brightness characteristic value of the image to be detected is determined based on the grayscale information; based on the brightness characteristic values corresponding to different images to be detected, the brightness information of each detection point is obtained to obtain the brightness consistency information of the optical detection device. For example, a material coordinate system is established based on the target feature points of the detection element and the target rotation angle. The ROI area is set in this coordinate system, and the ROI area should wrap the required detection area as much as possible. The detection area is determined according to the user setting. The average grayscale of the image under the ROI area is extracted as the characteristic value of the image brightness, and the consistency of the optical brightness is calculated by comparing the average grayscale value of the ROI area between different detection points.
[0100] For optical focal length consistency, a target coordinate system can be established based on the target feature point and the target rotation angle; in the target coordinate system, a feature area image can be determined based on the edge of the detection element; the grayscale gradient information of the feature area image can be determined, and the contrast characteristic value of the image to be detected can be determined based on the grayscale gradient information; based on the contrast characteristic values corresponding to different images to be detected, the contrast information of each detection point can be obtained to obtain the optical focal length consistency information of the optical detection device. For example, in the target coordinate system, a target area is set with the feature edge of the detection element, and the maximum value of the grayscale value gradient in the target area of the image is calculated along the vertical edge direction. Multiple gradient values can be calculated for multiple feature areas as the characteristic value of the image contrast. The consistency of the optical focal length is calculated by comparing the contrast between different detection points.
[0101] By comparing the coordinates of the feature points of the fixture and the detection element at multiple detection points, the consistency of the mechanical positioning between multiple detection points can be detected, and the corresponding average grayscale can detect the consistency of the imaging brightness, the edge contrast of the detection element surface camera focus point consistency, so as to quantitatively analyze the consistency of different detection points. During the operation process, it is also possible to monitor whether the current AOI equipment is operating normally by judging whether these feature values are within the specified range. This method based on image detection realizes the consistency detection of the installation position and angle of the AOI machine camera, the brightness of the light source, etc., which can be used in the machine debugging stage. And it can monitor whether there are any abnormalities in the material during the handling process. In addition, this method can be quickly reused for different AOI equipment, which is convenient and fast.
[0102] It should be understood that, although the steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0103] Based on the same inventive concept, the embodiment of the present application also provides a device consistency detection device. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more device consistency detection devices provided below can refer to the limitations of the device consistency detection method above, and will not be repeated here.
[0104] like Fig. 9 As shown, the embodiment of the present application provides a device consistency detection device 900, including:
[0105] An acquisition module 901 is used to acquire images to be inspected taken for the inspection elements when at least two inspection elements are respectively moved to corresponding inspection points by mechanical moving devices associated with the optical inspection device;
[0106] A determination module 902, for determining a target feature point and a target rotation angle of each detection element based on an image of a region where the detection element is located in the image to be detected;
[0107] A difference module 903, used to determine the position difference between the target feature points of each detection element and the angle difference between the target rotation angles of each detection element;
[0108] The consistency module 904 is configured to determine the mechanical movement consistency of the mechanical movement device based on the position difference and the angle difference.
[0109] In some embodiments, in determining the target feature points and the target rotation angle of each detection element based on the regional image where the detection element is located in the image to be detected, the determination module 902 is specifically used to:
[0110] Determine the horizontal edge line and the vertical edge line of the detection element based on the area image where the detection element is located in the image to be detected;
[0111] The intersection of the horizontal edge line and the vertical edge line is used as the target feature point of the detection element;
[0112] Based on the horizontal edge line and the preset edge line of the image to be detected, the target rotation angle of the detection element is determined.
[0113] In some embodiments, in determining the consistency of mechanical movement of the mechanical movement device based on the position difference and the angle difference, the consistency module 904 is specifically configured to:
[0114] If the position difference corresponding to each detection point is greater than the preset position difference or the corresponding angle difference is greater than the preset angle difference, it is determined that the mechanical movement consistency of the mechanical moving device is inconsistent.
[0115] In some embodiments, in terms of acquiring the image to be detected captured for the detection element, the acquisition module 901 is specifically used to:
[0116] The images to be inspected for the inspection element are respectively acquired by at least two shooting devices of the optical inspection equipment, and the shooting devices face the inspection element.
[0117] In some embodiments, the device consistency detection apparatus further includes an anomaly detection module, wherein the anomaly detection module is used to:
[0118] If the target feature point is within the preset abnormal range or the target rotation angle is within the preset abnormal range, it is determined that the detection component handling is abnormal during the operation of the optical detection device.
[0119] In some embodiments, the consistency module 904 is further configured to:
[0120] A target coordinate system is established based on target feature points and target rotation angles; in the target coordinate system, an image of a region of interest in an image to be detected is determined; grayscale information of the image of the region of interest is determined, and a brightness characteristic value of the image to be detected is determined based on the grayscale information; and brightness consistency of an optical detection device is determined based on brightness characteristic values of different images to be detected.
[0121] In some embodiments, the consistency module 904 is further configured to:
[0122] A target coordinate system is established based on target feature points and target rotation angles; in the target coordinate system, a feature area image is determined based on the edge of a detection element; grayscale gradient information of the feature area image is determined, and a contrast feature value of the image to be detected is determined based on the grayscale gradient information; and the optical focal length consistency of the optical detection device is determined based on the contrast feature values corresponding to different images to be detected.
[0123] In some embodiments, the device consistency detection apparatus further includes an installation detection module, wherein the installation detection module is used to:
[0124] The fixture of the optical inspection equipment is photographed to obtain a fixture image; the edge points of the groove in the fixture image are detected, and the edge points are fitted based on the least squares method to determine the groove in the fixture image; the inclination angle between the optical axis of the optical inspection equipment and the fixture is determined based on the major and minor axis ratio of the groove to determine the correctness of the camera installation angle of the optical inspection equipment.
[0125] Each module in the above-mentioned device consistency detection device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0126] In some embodiments, a computer device is provided, which may be a terminal, and the terminal is connected to an AOI device to obtain images captured by the AOI device. Fig.10As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, the steps in the above-mentioned device consistency detection method are implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen; the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0127] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0128] In some embodiments, a computer device is provided. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps in the above method embodiments are implemented.
[0129] In some embodiments, Fig.11 The figure shows an internal structure diagram of a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0130] In some embodiments, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0131] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0132] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0133] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0134] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for detecting device consistency, characterized in that: include: When at least two detection elements are respectively moved to corresponding detection points by a mechanical moving device associated with the optical detection device, an image to be detected captured for the detection elements is acquired; Determining target feature points and target rotation angles of each of the detection elements based on an area image where the detection elements in the image to be detected are located; Determining position differences between target feature points of each of the detection elements and angle differences between target rotation angles of each of the detection elements; Based on the position difference and the angle difference, a mechanical movement consistency of the mechanical movement device is determined.
2. The method according to claim 1, characterized in that The determining of the target feature points and the target rotation angle of each detection element based on the regional image where the detection element in the image to be detected is located includes: Determine a horizontal edge line and a vertical edge line of the detection element based on a region image where the detection element in the image to be detected is located; Using the intersection of the horizontal edge line and the vertical edge line as the target feature point of the detection element; Based on the horizontal edge line and the preset edge line of the image to be detected, a target rotation angle of the detection element is determined.
3. The method according to claim 1, characterized in that The determining the mechanical movement consistency of the mechanical movement device based on the position difference and the angle difference comprises: If the position difference corresponding to each of the detection points is greater than a preset position difference or the corresponding angle difference is greater than a preset angle difference, it is determined that the mechanical movement consistency of the mechanical movement device is inconsistent.
4. The method according to claim 1, characterized in that: The step of acquiring the image to be detected photographed from the detection element comprises: The images to be inspected for the inspection element are respectively acquired by at least two shooting devices of the optical inspection equipment, and the shooting devices face the inspection element.
5. The method according to claim 1, characterized in that After determining the target feature points and target rotation angles of each detection element based on the regional image where the detection element in the image to be detected is located, the method further includes: If the target feature point is within the preset abnormal range or the target rotation angle is within the preset abnormal range, it is determined that the detection element is transported abnormally during the operation of the optical detection device.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Establishing a target coordinate system based on the target feature points and the target rotation angle; In the target coordinate system, determining a region of interest image in the image to be detected; Determine the grayscale information of the image of the region of interest, and determine the brightness characteristic value of the image to be detected based on the grayscale information; The brightness consistency of the optical detection device is determined based on the brightness characteristic values of different images to be detected.
7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Establishing a target coordinate system based on the target feature points and the target rotation angle; In the target coordinate system, determining a feature region image based on an edge of the detection element; Determine the grayscale gradient information of the characteristic region image, and determine the contrast characteristic value of the image to be detected based on the grayscale gradient information; Based on the contrast characteristic values of different images to be detected, the consistency of the optical focal length of the optical detection device is determined.
8. The method according to claim 1, characterized in that Before acquiring the image to be detected photographed for the detection element, the method further includes: Photographing a fixture of the optical inspection device to obtain a fixture image; Detect edge points of the groove in the jig image, and fit the edge points based on a least squares method to determine the groove in the jig image; The inclination angle between the optical axis of the optical inspection device and the fixture is determined based on the ratio of the major and minor axes of the groove to determine the correctness of the camera installation angle of the optical inspection device.
9. A device for detecting device consistency, characterized in that: include: An acquisition module, used for acquiring the to-be-detected images captured for the at least two detection elements when the at least two detection elements are respectively moved to corresponding detection points by mechanical moving devices associated with the optical detection equipment; A determination module, used for determining a target feature point and a target rotation angle of each detection element based on an area image where the detection element in the image to be detected is located; A difference module, used to determine the position difference between the target feature points of each of the detection elements and the angle difference between the target rotation angles of each of the detection elements; A consistency module is configured to determine a mechanical movement consistency of the mechanical movement device based on the position difference and the angle difference.
10. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.