CN115854864A - Optical detection device, compensation method thereof and storage medium - Google Patents

Optical detection device, compensation method thereof and storage medium Download PDF

Info

Publication number
CN115854864A
CN115854864A CN202111120589.5A CN202111120589A CN115854864A CN 115854864 A CN115854864 A CN 115854864A CN 202111120589 A CN202111120589 A CN 202111120589A CN 115854864 A CN115854864 A CN 115854864A
Authority
CN
China
Prior art keywords
offset
compensation
plate
reference plate
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111120589.5A
Other languages
Chinese (zh)
Inventor
朱林林
管凌乾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Vega Technology Co Ltd
Original Assignee
Suzhou Vega Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Vega Technology Co Ltd filed Critical Suzhou Vega Technology Co Ltd
Priority to CN202111120589.5A priority Critical patent/CN115854864A/en
Publication of CN115854864A publication Critical patent/CN115854864A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses an optical detection device, a compensation method thereof and a storage medium, wherein the optical detection device comprises an image acquisition device and a reference plate, the reference plate and a plate to be detected are positioned at the same side of the image acquisition device and are not overlapped, a plurality of positioning points are arranged on the reference plate, and the method comprises the following steps: before the detection of the board to be detected, controlling an image acquisition device to acquire first image information of a reference board; acquiring the actual coordinate of each positioning point in the plurality of positioning points and the offset between the actual coordinate and the theoretical coordinate according to the first image information; and acquiring the compensation quantity of the image acquisition device according to the actual coordinates and the offset of each positioning point. The method can improve the detection precision of the optical detection equipment and avoid damaging the image acquisition device.

Description

Optical detection device, compensation method thereof and storage medium
Technical Field
The present invention relates to the field of optical detection technologies, and in particular, to a compensation method for an optical detection device, an optical detection apparatus, and a computer-readable storage medium.
Background
In an apparatus for detecting the hole position accuracy of a Printed Circuit Board (PCB) Board using a wide industrial camera, since the wide industrial camera employs a Contact Image Sensor (CIS) Sensor, and the CIS Sensor is susceptible to thermal expansion and contraction, when the camera continuously operates, an acquired Image is deformed along the direction of the camera due to thermal expansion of the CIS Sensor, thereby affecting the detection accuracy.
In the related art, a water cooler is added on a camera, and the camera is cooled through the water cooler, so that the problem of heating and expansion of a CIS sensor in the camera is solved, and the detection precision is improved. However, when this method is adopted, if the ambient temperature around the camera is relatively high, condensed water is easily formed on the camera, thereby affecting the imaging quality of the camera, and in severe cases, even causing the camera to be damaged by water entering the camera.
Disclosure of Invention
The present invention is directed to solving, at least in part, one of the technical problems in the related art.
Therefore, a first object of the present invention is to provide a compensation method for an optical detection apparatus, which can not only improve the detection accuracy of the optical detection apparatus, but also avoid damage to the image acquisition device by adding a reference plate to the optical detection apparatus and using the reference plate to acquire the compensation amount of the image acquisition device for detection and compensation before the detection of the plate to be detected.
A second object of the invention is to propose a computer-readable storage medium.
A third object of the invention is to propose an optical detection device.
In order to achieve the above object, a first embodiment of the present invention provides a compensation method for an optical inspection apparatus, where the optical inspection apparatus includes an image capturing device and a reference plate, the reference plate and a board to be inspected are located on the same side of the image capturing device and do not overlap, and the reference plate is provided with a plurality of positioning points, the method includes: before the detection of the board to be detected, controlling an image acquisition device to acquire first image information of a reference board; acquiring the actual coordinate of each positioning point in the plurality of positioning points and the offset between the actual coordinate and the theoretical coordinate according to the first image information; and acquiring the compensation quantity of the image acquisition device according to the actual coordinates and the offset of each positioning point.
According to the compensation method of the optical detection device, the reference plate is added on the optical detection device, the image acquisition device is controlled to acquire the first image information of the reference plate before the detection of the plate to be detected is performed, the actual coordinate and the offset between the actual coordinate and the theoretical coordinate of each positioning point in the plurality of positioning points on the reference plate are acquired according to the first image information, and the compensation quantity of the image acquisition device is acquired according to the actual coordinate and the offset of each positioning point to perform detection compensation, so that the detection precision of the optical detection device can be improved, and the image acquisition device can be prevented from being damaged.
According to an embodiment of the present invention, obtaining the compensation amount of the image obtaining apparatus based on the actual coordinates of each positioning point and the offset amount includes: acquiring the actual coordinate in the X direction and the offset in the X direction of each positioning point; acquiring X-direction average offset of a plurality of positioning points according to the X-direction offset of each positioning point; and performing linear fitting operation according to the actual coordinate in the X direction of each positioning point and the difference between the offset in the X direction of each positioning point and the average offset in the X direction to obtain the expansion compensation amount.
According to an embodiment of the present invention, acquiring the compensation amount of the image acquisition device according to the actual coordinates and the offset amount of each positioning point further includes: acquiring the actual coordinate in the X direction and the offset in the Y direction of each positioning point; acquiring Y-direction average offset of a plurality of positioning points according to the Y-direction offset of each positioning point; and performing linear fitting operation according to the actual coordinates of each positioning point in the X direction and the difference value between the offset of each positioning point in the Y direction and the average offset of each positioning point in the Y direction to obtain the rotation compensation quantity.
According to one embodiment of the present invention, the compensation amount for the expansion and contraction and the compensation amount for the rotation are both the slopes of straight lines obtained after the straight line fitting operation.
According to an embodiment of the present invention, after obtaining the compensation amount of the image capturing device, the method further comprises: controlling the image acquisition device to acquire second image information of the board to be detected so as to detect the board to be detected; acquiring actual coordinates of a hole to be detected in the second image information; and compensating the actual coordinates of the hole to be detected according to the compensation amount.
According to one embodiment of the invention, the actual coordinates of the hole to be detected are compensated by:
Figure BDA0003276976240000021
wherein, (px, py) represents the actual coordinates of the well to be detected before compensation, (px 1, py 1) represents the actual coordinates of the well to be detected after compensation, a represents the compensation amount of expansion and contraction, and a 1 Indicating the amount of rotation compensation.
According to an embodiment of the present invention, acquiring an offset between actual coordinates and theoretical coordinates of each of a plurality of positioning points according to first image information includes: acquiring a first theoretical coordinate and an actual coordinate of any two positioning points in the plurality of positioning points; acquiring the rotational offset and the translational offset of a plurality of positioning points according to the first theoretical coordinate and the actual coordinate of the two positioning points; acquiring a second theoretical coordinate of each positioning point in the plurality of positioning points according to the rotation offset, the translation offset and the first theoretical coordinate of each positioning point in the plurality of positioning points; and acquiring the offset between the actual coordinate and the theoretical coordinate of each positioning point according to the second theoretical coordinate and the actual coordinate of each positioning point in the plurality of positioning points.
To achieve the above object, a second aspect of the present invention provides a computer-readable storage medium, on which a compensation program of an optical detection apparatus is stored, the compensation program of the optical detection apparatus, when executed by a processor, implementing the compensation method of the optical detection apparatus described in the above embodiments.
According to the computer-readable storage medium of the embodiment of the present invention, when the stored compensation program of the optical detection apparatus is executed by the processor, the detection accuracy of the optical detection apparatus can be improved and damage to the image acquisition device can be avoided by executing the compensation method of the optical detection apparatus described in the above embodiment.
To achieve the above object, an embodiment of a third aspect of the present invention provides an optical detection apparatus, including: the image acquisition device comprises an image acquisition device, a reference plate and a processor, wherein the reference plate and the plate to be detected are positioned on the same side of the image acquisition device and are not overlapped, a plurality of positioning points are arranged on the reference plate, and the processor is used for realizing the compensation method of the optical detection equipment described in the embodiment.
According to the optical detection device provided by the embodiment of the invention, the reference plate is additionally arranged on the optical detection device, and the compensation quantity of the image acquisition device is acquired by using the reference plate for detection and compensation before the detection plate is detected, so that the detection precision of the optical detection device can be improved, and the image acquisition device can be prevented from being damaged.
According to an embodiment of the invention, the optical detection device further comprises: the device comprises a lower cover plate used for bearing a plate to be detected, a reference plate arranged at the rear end of the lower cover plate, an image acquisition device positioned below the lower cover plate and the reference plate, and an image acquisition device used for acquiring an image of the reference plate before shooting the plate to be detected.
According to one embodiment of the invention, the reference plate is provided with a marking surface with positioning points, the lower cover plate is provided with a bearing surface for supporting the plate to be detected, and the marking surface and the bearing surface are at the same height.
According to one embodiment of the invention, the reference plate is embedded in the lower cover plate, or the reference plate is placed on the lower cover plate, or the reference plate is arranged outside the lower cover plate through the connecting piece.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic diagram of an optical inspection apparatus according to one embodiment of the present invention;
FIG. 2 is a front view of a reference plate and a lower cover plate according to a first embodiment of the present invention;
FIG. 3 is a front view of a reference plate and a lower cover plate according to a second embodiment of the present invention;
FIG. 4 is a front view of a reference plate and a lower cover plate according to a third embodiment of the present invention;
FIG. 5 is a top view of the datum plate and lower cover plate of FIG. 2;
FIG. 6 is a schematic view of a datum plate according to one embodiment of the present invention;
FIG. 7 is a schematic flow chart of a compensation method of an optical detection apparatus according to an embodiment of the invention;
fig. 8 is a schematic flow chart illustrating compensation of actual coordinates of a hole to be detected according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
An optical detection apparatus, a compensation method thereof, and a storage medium according to an embodiment of the present invention will be described with reference to the accompanying drawings.
It should be noted that, in the present application, the optical detection apparatus includes an image acquisition device and a reference plate, the reference plate and the plate to be detected are located on the same side of the image acquisition device and do not overlap, and a plurality of positioning points are provided on the reference plate. The board to be detected can be a PCB board or the like.
As a specific example, as shown in fig. 1, the optical detection apparatus may include: a machine table 110, a workbench 120, an image acquisition device 130 (such as a wide industrial camera), a lower cover plate 140, a reference plate 150, a backlight 160, and an upper cover plate 170. Wherein, the working platform 120 is disposed on the machine platform 110 in a translation manner; the image capturing device 130 is fixed on the machine table 110 in a lifting manner through a fine tuning support, and is located below the lower cover plate 140 and the reference plate 150; the lower cover plate 140 is arranged on the machine table 110 and used for bearing a board to be detected; the reference plate 150 is disposed on the lower cover plate 140, and optionally, the reference plate 150 is disposed at the rear end of the lower cover plate 140, that is, at an end of the lower cover plate 140 close to the image acquiring device 130, so that the image acquiring device 130 can acquire an image of the reference plate 150 before shooting a board to be detected, so as to compensate the image acquiring device 130 based on the image; the upper cover plate 170 is disposed on the worktable 120 in a horizontally movable and liftable manner. Further, a marking surface having a positioning point 151 is disposed on the reference plate 150, the lower cover plate 140 has a bearing surface for supporting a plate to be detected, and the marking surface and the bearing surface are at the same height.
As a first example, the reference plate 150 is embedded in the lower cover plate 140. Specifically, referring to fig. 2 and 5, the lower cover plate 140 includes an optical glass plate 142 and a rim 144, and the reference plate 150 is embedded in the rim 144 of the lower cover plate 140. For example, the size of the section limited by the frame 144 is 700 × 800mm, wherein the size of the optical glass plate 142 may be 700 × 780mm, the size of the reference plate 150 may be 700 × 20mm, the reference plate 150 is provided with a plurality of positioning points 151, the plurality of positioning points 151 are located on the upper surface (i.e., the mark surface 152) of the reference plate 150, the plate to be detected is located on the upper surface (i.e., the bearing surface 146) of the optical glass plate 142, the upper surface of the reference plate 150 and the upper surface of the optical glass plate 142 are at the same height, and the image capturing device 130 is located below the lower cover plate 140 and the reference plate 150, so that when the image capturing device 130 scans the reference plate 150 and the plate to be detected, the focal length of the image capturing device 130 is the same, thereby ensuring the verification accuracy.
As a second example, the reference plate 150 is placed on the lower cover plate 140. Specifically, referring to fig. 3, the lower cover plate 140 includes an optical glass plate 142, a reference plate 150 is located above the optical glass plate 142 of the lower cover plate 140, for example, the reference plate 150 is adhered to the optical glass plate 142 and close to one side of the optical glass plate 142, a plurality of positioning points 151 are disposed on the reference plate 150, the plurality of positioning points 151 are located on a lower surface (i.e., a mark surface 152) of the reference plate 150, a plate to be detected is located on an upper surface (i.e., a bearing surface 146) of the optical glass plate 142, and the lower surface (i.e., the mark surface 152) of the reference plate 150 is flush with the upper surface (i.e., the bearing surface 146) of the optical glass plate 142, and the image capturing device 130 is located on the lower surface of the lower cover plate 140, so as to ensure that the focal lengths of the image capturing device 130 are the same when the reference plate 150 and the plate to be detected are scanned, thereby ensuring the verification accuracy.
As a third example, the reference plate 150 is provided outside the lower cover plate 140 through a connection member. Specifically, as shown in fig. 4, the lower cover plate 140 includes an optical glass plate (not specifically shown in the figure) and a frame 144, a reference plate 150 may be connected to one side of the frame 144 through a connecting member (not specifically shown in the figure), the reference plate 150 is provided with a plurality of positioning points 151, the plurality of positioning points 151 are located on a lower surface (i.e., a mark surface 152) of the reference plate 150, the plate to be detected is located on an upper surface (i.e., a bearing surface 146) of the optical glass plate 142, the lower surface (i.e., the mark surface 152) of the reference plate 150 is flush with the upper surface (i.e., the bearing surface 146) of the optical glass plate 142, and the image capturing device 130 is located on the lower surface of the lower cover plate 140, so that it is ensured that when the image capturing device 130 scans the reference plate 150 and the plate to be detected, the focal distance of the image capturing device 130 is the same, thereby ensuring the verification accuracy.
Optionally, the reference plate 150 may be a hole positioning plate, as shown in fig. 5, at this time, the plurality of positioning points 151 of the reference plate 150 are central points of circular holes with the same diameter and size, which are regularly arranged according to a certain position on the hole calibration plate; the reference plate 150 may also be a checkerboard, as shown in fig. 6, at this time, a plurality of positioning points of the reference plate 150 are central points of black and white grids arranged according to a certain rule on the checkerboard calibration plate. The reference plate 150 is not limited thereto in practical use.
When the device is used, the upper cover plate 170 is controlled by the solenoid valve to translate to be staggered with the lower cover plate 140 in the horizontal direction, an operator places a plate to be detected on the lower cover plate 140, then the upper cover plate 170 is controlled by the solenoid valve to move to be overlapped with the lower cover plate 140 and descend to press the plate to be detected, then the workbench 120 drives the upper cover plate 170, the lower cover plate 140 and the plate to be detected to translate to pass through the upper part of the image acquisition device 130, the image of the reference plate 150 is scanned by the image acquisition device 130 to obtain corresponding compensation amount, then the image of the plate to be detected is scanned, and the image is compensated according to the compensation amount.
Fig. 7 is a flowchart illustrating a compensation method of an optical detection apparatus according to an embodiment of the present invention. As shown in fig. 7, the compensation method of the optical detection apparatus may include the steps of:
step S1, before the detection of the plate to be detected, controlling an image acquisition device to acquire first image information of a reference plate.
Specifically, before the board to be inspected is inspected, as shown in fig. 1, the workbench 120 is controlled to move, so that the workbench 120 drives the upper cover plate 170, the lower cover plate 140 and the board to be inspected to translate, so that the reference plate 150 on the lower cover plate 140 passes over the image acquiring device 130, and the image acquiring device 130 is controlled to acquire image information of the reference plate 150, which is recorded as first image information.
And S2, acquiring the actual coordinate of each positioning point in the plurality of positioning points and the offset between the actual coordinate and the theoretical coordinate according to the first image information.
Specifically, after the first image information is obtained, the first image information may be analyzed to obtain an actual coordinate of each positioning point on the reference plate and an offset between the actual coordinate and the theoretical coordinate.
Optionally, in some embodiments, obtaining an offset between the actual coordinate and the theoretical coordinate includes: acquiring a first theoretical coordinate and an actual coordinate of any two positioning points in a plurality of positioning points of a reference plate; acquiring the rotational offset and the translational offset of a plurality of positioning points according to the first theoretical coordinate and the actual coordinate of the two positioning points; acquiring a second theoretical coordinate of each positioning point in the plurality of positioning points according to the rotation offset, the translation offset and the first theoretical coordinate of each positioning point in the plurality of positioning points; and acquiring the offset between the actual coordinate and the theoretical coordinate of each positioning point according to the second theoretical coordinate and the actual coordinate of each positioning point in the plurality of positioning points.
For example, as shown in fig. 2, two positioning points at the leftmost end and the rightmost end of the reference plate may be used as references, and an offset between an actual coordinate and a theoretical coordinate of each of the multiple positioning points on the reference plate may be obtained, where the two positioning points are denoted as M and N for convenience of description. Specifically, the actual coordinates of the positioning point M can be obtained by analyzing the first image information as (X) m ,Y m ) The actual coordinate of the positioning point N is (X) n ,Y n ) Meanwhile, the first theoretical coordinate of the positioning point M can be obtained as (X1) according to the parameters of the datum plate in the software m ,Y1 m ) The first theoretical coordinate of the positioning point N is (X1) n ,Y1 n ). After the first theoretical coordinates and the actual coordinates of the positioning points M and N are obtained, the rotational offset θ and the translational offset t of the reference plate can be calculated and obtained according to the following formula (1) x And t y
Figure BDA0003276976240000061
Wherein (X, Y) represents actual coordinates and (X1, Y1) represents first theoretical coordinates.
Then, the rotational offset amount θ and the translational offset amount t obtained by the calculation are used x And t y Calculating the second theoretical coordinate of each positioning point on the datum plate, namely the first theoretical coordinate (X1) of each positioning point i ,Y1 i ) Substituting the following formula (2) to calculate and obtain a second theoretical coordinate (X2) of each positioning point i ,Y2 i ):
Figure BDA0003276976240000062
Wherein (X1) i ,Y1 i ) First theoretical coordinates representing the ith localization point, (X2) i ,Y2 i ) Representing the second theoretical coordinates of the ith location point.
Then, calculating and obtaining the offset (Dx) of each positioning point according to the actual coordinate and the second theoretical coordinate of each positioning point i ,Dy i ) Wherein i =1, 2.. And n, n represents the total number of anchor points.
And S3, acquiring the compensation quantity of the image acquisition device according to the actual coordinate and the offset of each positioning point.
Specifically, after the actual coordinates and the offset of each positioning point are obtained, the compensation amount of the image acquisition device may be acquired according to the actual coordinates and the offset.
It should be noted that, a CIS sensor in the image acquisition device deforms along the direction of the image acquisition device due to thermal expansion, that is, a shrinkage and expansion deviation is generated, so that the shrinkage and expansion deviation can be compensated to improve the detection accuracy; meanwhile, relative movement between the image acquisition device and the workbench can generate a rotation offset amount, namely, a rotation offset, on the image, so that the rotation offset can be compensated to improve the detection precision, and therefore, in some embodiments of the present application, the expansion and contraction offset compensation and the rotation offset compensation can be performed on the image acquisition device to improve the detection precision from multiple aspects. Accordingly, the compensation amount of the image pickup device includes a compensation amount for expansion and contraction and a compensation amount for rotation.
Wherein, obtain the harmomegathus compensation volume, include: acquiring the actual coordinate and the offset of each positioning point in the X direction; acquiring X-direction average offset of a plurality of positioning points according to the X-direction offset of each positioning point; and performing linear fitting operation according to the actual coordinate in the X direction of each positioning point and the difference value between the offset in the X direction and the average offset in the X direction of each positioning point to obtain the expansion and contraction compensation quantity.
Here, the X direction refers to a direction along the image pickup device. When the expansion compensation amount is obtained, taking the actual coordinate in the X direction of each positioning point on the reference plate as the coordinate in the X direction of the midpoint of the two-dimensional coordinate system, taking the X direction offset of each positioning point on the reference plate minus the average offset in the X direction as the coordinate in the Y direction of the midpoint of the two-dimensional coordinate system, and performing straight line fitting operation to obtain the expansion compensation amount. The average offset in the X direction is the sum of the offsets in the X direction of each positioning point on the reference plate divided by the total number of the positioning points, which is shown in the following formula (3):
Figure BDA0003276976240000071
wherein,
Figure BDA0003276976240000072
the average offset in the X direction is shown.
Correspondingly, the X-direction average offset is subtracted from the X-direction offset of each positioning point on the reference plate to obtain a difference between the two offsets, which is shown in the following formula (4):
Figure BDA0003276976240000073
wherein dx is i X direction representing the ith anchor pointDifference between offset and average offset in X direction, dx i The X-direction offset of the ith anchor point is indicated.
Correspondingly, with (X) i ,dx i ) And performing linear fitting operation on the formed points to obtain a straight line y = ax + b, wherein the slope a of the straight line represents the expansion and contraction compensation quantity of the image acquisition device.
Further, acquiring a rotation compensation amount of the image acquisition device includes: acquiring the actual coordinate in the X direction and the offset in the Y direction of each positioning point; acquiring Y-direction average offset of a plurality of positioning points according to the Y-direction offset of each positioning point; and performing linear fitting operation according to the actual coordinates of each positioning point in the X direction and the difference value between the offset of each positioning point in the Y direction and the average offset of each positioning point in the Y direction to obtain the rotation compensation quantity.
Here, the Y direction refers to a direction along the table movement. When the rotation compensation amount is obtained, taking the actual coordinate in the X direction of each positioning point on the reference plate as the coordinate in the X direction of the midpoint of the two-dimensional coordinate system, and taking the Y direction offset of each positioning point on the reference plate minus the average offset in the Y direction as the coordinate in the Y direction of the midpoint of the two-dimensional coordinate system, and performing straight line fitting operation to obtain the rotation compensation amount. The Y-direction average offset is the sum of the Y-direction offsets of each positioning point on the reference plate divided by the total number of positioning points, which is shown in the following formula (5):
Figure BDA0003276976240000081
wherein,
Figure BDA0003276976240000082
the Y-direction average offset is shown.
Accordingly, the Y-direction average offset is subtracted from the Y-direction offset of each positioning point on the reference plate to obtain a difference therebetween, which is shown in the following equation (6):
Figure BDA0003276976240000083
wherein dy i Represents the difference between the Y-direction offset and the Y-direction average offset of the ith positioning point, dy i Indicating the Y-direction offset of the ith anchor point.
Correspondingly, with (X) i ,dy i ) And performing linear fitting operation on the formed points to obtain a straight line y1= a1x + b1, wherein the slope a1 of the straight line represents the rotation compensation amount of the image acquisition device.
After the compensation amount of the image acquisition device is obtained, the optical detection device can be compensated according to the compensation amount. Therefore, the reference plate is added on the optical detection equipment, and before the detection plate is detected, the compensation amount of the image acquisition device is acquired by using the reference plate to perform detection compensation, so that the detection precision of the optical detection equipment can be improved, and the image acquisition device can be prevented from being damaged. The compensation quantity can comprise expansion compensation quantity and rotation compensation quantity, the precision problem caused by the thermal expansion of a CIS sensor in the image acquisition device can be effectively avoided through the expansion compensation quantity, and the precision problem caused by the angle deviation between the image acquisition device and the movement direction of the workbench can be effectively avoided through the rotation compensation quantity.
Further, in some embodiments, as shown in fig. 8, after obtaining the compensation amount of the image capturing device, the compensation method of the optical detection apparatus further includes the following steps:
and step S31, controlling the image acquisition device to acquire second image information of the board to be detected so as to detect the board to be detected.
Specifically, after the image capturing device finishes scanning the reference plate, as shown in fig. 1, the movement of the workbench 120 is controlled continuously, so that the workbench 120 drives the upper cover plate 170, the lower cover plate 140 and the plate to be detected to move horizontally, so that the plate to be detected on the lower cover plate 140 passes over the image capturing device 130, and the image capturing device 130 is controlled to capture the image information of the plate to be detected, which is recorded as the second image information.
And step S32, acquiring the actual coordinates of the hole to be detected in the second image information.
Specifically, after the second image information is obtained, the second image information may be analyzed to obtain actual coordinates of the hole to be detected on the plate to be detected.
And S33, compensating the actual coordinates of the hole to be detected according to the compensation amount.
Specifically, after the actual coordinates of the holes to be detected and the compensation amount of the image acquisition device are obtained, each hole to be detected is compensated according to the compensation amount. Alternatively, when the compensation amount includes a compensation amount for expansion and contraction and a compensation amount for rotation, the actual coordinates of the hole to be detected may be compensated by the following equation (7):
Figure BDA0003276976240000091
wherein, (px, py) represents the actual coordinates of the well to be detected before compensation, (px 1, py 1) represents the actual coordinates of the well to be detected after compensation, a represents the compensation amount of expansion and contraction, and a 1 Indicating the amount of rotation compensation. Therefore, the detection precision can be improved from multiple aspects, and the whole compensation process cannot damage the image acquisition device.
In summary, according to the compensation method of the optical detection device in the embodiment of the present invention, by adding the reference plate to the optical detection device, and before the detection of the board to be detected, controlling the image obtaining apparatus to obtain the first image information of the reference plate, obtaining the actual coordinate and the offset between the actual coordinate and the theoretical coordinate of each of the plurality of positioning points on the reference plate according to the first image information, and obtaining the compensation amount of the image obtaining apparatus according to the actual coordinate and the offset of each positioning point to perform detection and compensation, the detection accuracy of the optical detection device can be improved, and the image obtaining apparatus can be prevented from being damaged.
In some embodiments of the present invention, there is also provided a computer-readable storage medium having stored thereon a compensation program of an optical detection apparatus, which when executed by a processor, implements the compensation method of the optical detection apparatus described according to the above embodiments.
According to the computer-readable storage medium of an embodiment of the present invention, when the stored compensation program of the optical detection apparatus is executed by the processor, by executing the compensation method of the optical detection apparatus described in the above-described embodiment, by adding the reference plate to the optical detection apparatus, and before the detection of the board to be detected, controlling the image acquisition device to acquire the first image information of the reference plate, and acquiring the actual coordinate and the offset between the actual coordinate and the theoretical coordinate of each of the plurality of positioning points on the reference plate according to the first image information, and acquiring the compensation amount of the image acquisition device according to the actual coordinate and the offset of each of the positioning points to perform detection compensation, not only the detection accuracy of the optical detection apparatus can be improved, but also damage to the image acquisition device can be avoided.
In some embodiments of the present invention, there is also provided an optical inspection apparatus, as shown in fig. 1, including: image capture device 130, reference plate 150, and a processor (not specifically shown). The reference plate 150 and the plate to be detected are located on the same side of the image capturing device 130 and do not overlap, a plurality of positioning points are disposed on the reference plate 150, and the processor is configured to implement the compensation method of the optical detection apparatus described in the above embodiment.
Further, the optical detection apparatus further includes: the device comprises a lower cover plate used for bearing a plate to be detected, a reference plate arranged at the rear end of the lower cover plate, an image acquisition device positioned below the lower cover plate and the reference plate, and an image acquisition device used for acquiring an image of the reference plate before shooting the plate to be detected.
Optionally, in some embodiments of the present invention, the reference plate is provided with a mark surface having a positioning point, the lower cover plate has a bearing surface supporting the plate to be detected, and the mark surface and the bearing surface are at the same height.
Optionally, in some embodiments of the present invention, the reference plate is embedded in the lower cover plate, or the reference plate is placed on the lower cover plate, or the reference plate is disposed outside the lower cover plate through the connecting member.
It should be noted that, for the related description of the optical detection apparatus, please refer to the foregoing description of the compensation method of the optical detection apparatus, and details are not repeated here.
According to the embodiment of the invention, the reference plate is added on the optical detection equipment, and the compensation quantity of the image acquisition device is acquired by using the reference plate for detection and compensation before the detection plate is detected, so that the detection precision of the optical detection equipment can be improved, and the damage to the image acquisition device can be avoided.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specified otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Further, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer-readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (12)

1. A compensation method for optical detection equipment is characterized in that the optical detection equipment comprises an image acquisition device and a reference plate, the reference plate and a plate to be detected are positioned on the same side of the image acquisition device and do not overlap, a plurality of positioning points are arranged on the reference plate, and the method comprises the following steps:
before the board to be detected is detected, controlling the image acquisition device to acquire first image information of the reference board;
acquiring the actual coordinates of each positioning point in the plurality of positioning points and the offset between the actual coordinates and the theoretical coordinates according to the first image information;
and acquiring the compensation quantity of the image acquisition device according to the actual coordinates and the offset of each positioning point.
2. The compensation method of optical detection equipment according to claim 1, wherein said obtaining the compensation amount of the image obtaining device according to the actual coordinates and the offset of each positioning point comprises:
acquiring the actual coordinate in the X direction and the offset in the X direction of each positioning point;
obtaining the average offset of the plurality of positioning points in the X direction according to the offset of each positioning point in the X direction;
and performing linear fitting operation according to the actual coordinate in the X direction of each positioning point and the difference between the offset in the X direction of each positioning point and the average offset in the X direction to obtain the expansion compensation amount.
3. The compensation method for an optical detection apparatus according to claim 2, wherein said obtaining the compensation amount of the image obtaining device based on the actual coordinates and the offset amount of each positioning point further comprises:
acquiring the actual coordinate in the X direction and the offset in the Y direction of each positioning point;
acquiring Y-direction average offset of the positioning points according to the Y-direction offset of each positioning point;
and performing linear fitting operation according to the actual coordinates of each positioning point in the X direction and the difference between the offset of each positioning point in the Y direction and the average offset of each positioning point in the Y direction to obtain the rotation compensation quantity.
4. The compensation method for an optical inspection apparatus as claimed in claim 3, wherein the compensation amount for expansion and contraction and the compensation amount for rotation are both slopes of straight lines obtained after a straight line fitting operation.
5. The compensation method for an optical detection apparatus according to claim 4, wherein after obtaining the compensation amount for the image acquisition device, the method further comprises:
controlling the image acquisition device to acquire second image information of the board to be detected so as to detect the board to be detected;
acquiring actual coordinates of a hole to be detected in the second image information;
and compensating the actual coordinates of the hole to be detected according to the compensation amount.
6. The compensation method of an optical inspection apparatus according to claim 5, wherein the coordinates of the hole to be inspected are compensated by:
Figure FDA0003276976230000021
wherein, (px, py) represents the actual coordinates of the hole to be detected before compensation, (px 1, py 1) represents the actual coordinates of the hole to be detected after compensation, a represents the amount of compensation for expansion and contraction, and a1 represents the amount of compensation for rotation.
7. The compensation method of an optical detection apparatus according to any one of claims 1 to 6, wherein obtaining an offset between actual coordinates and theoretical coordinates of each of the plurality of positioning points from the first image information comprises:
acquiring a first theoretical coordinate and an actual coordinate of any two positioning points in the plurality of positioning points;
acquiring the rotational offset and the translational offset of the positioning points according to the first theoretical coordinate and the actual coordinate of the two positioning points;
acquiring a second theoretical coordinate of each positioning point in the plurality of positioning points according to the rotational offset, the translational offset and the first theoretical coordinate of each positioning point in the plurality of positioning points;
and acquiring the offset between the actual coordinate and the theoretical coordinate of each positioning point according to the second theoretical coordinate and the actual coordinate of each positioning point in the plurality of positioning points.
8. A computer-readable storage medium, characterized in that a compensation program of an optical detection apparatus is stored thereon, which when executed by a processor implements a compensation method of the optical detection apparatus according to any one of claims 1 to 7.
9. An optical inspection apparatus, comprising: the compensation method comprises an image acquisition device, a reference plate and a processor, wherein the reference plate and a plate to be detected are positioned on the same side of the image acquisition device and do not overlap, a plurality of positioning points are arranged on the reference plate, and the processor is used for realizing the compensation method of the optical detection equipment according to any one of claims 1-7.
10. The optical inspection apparatus of claim 9, further comprising: the device comprises a lower cover plate used for bearing the plate to be detected, a reference plate arranged at the rear end of the lower cover plate, an image acquisition device positioned below the lower cover plate and the reference plate, and an image acquisition device used for acquiring an image of the reference plate before shooting the plate to be detected.
11. The optical inspection apparatus of claim 10, wherein the reference plate is provided with a marking surface having positioning points, the lower cover plate has a bearing surface for supporting the board to be inspected, and the marking surface and the bearing surface are at the same height.
12. The optical inspection apparatus of claim 11, wherein the reference plate is embedded in the lower cover plate, or the reference plate is placed on the lower cover plate, or the reference plate is disposed outside the lower cover plate through a connector.
CN202111120589.5A 2021-09-24 2021-09-24 Optical detection device, compensation method thereof and storage medium Pending CN115854864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111120589.5A CN115854864A (en) 2021-09-24 2021-09-24 Optical detection device, compensation method thereof and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111120589.5A CN115854864A (en) 2021-09-24 2021-09-24 Optical detection device, compensation method thereof and storage medium

Publications (1)

Publication Number Publication Date
CN115854864A true CN115854864A (en) 2023-03-28

Family

ID=85653109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111120589.5A Pending CN115854864A (en) 2021-09-24 2021-09-24 Optical detection device, compensation method thereof and storage medium

Country Status (1)

Country Link
CN (1) CN115854864A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118293796A (en) * 2024-03-11 2024-07-05 东莞市盟拓智能科技有限公司 Substrate detection method, device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118293796A (en) * 2024-03-11 2024-07-05 东莞市盟拓智能科技有限公司 Substrate detection method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
KR101257188B1 (en) Three-dimensional shape measuring device, three-dimensional shape measuring method, and computer readable recording medium for three-dimessional shape measuring program
US6744499B2 (en) Calibration methods for placement machines incorporating on-head linescan sensing
CN114227791B (en) Cutting machine and machine-readable carrier
CN109920003B (en) Camera calibration detection method, device and equipment
US20130194569A1 (en) Substrate inspection method
JP2001160135A (en) Method and system for image processing, and method for preparing correction data
US20170254639A1 (en) Methods of inspecting a 3d object using 2d image processing
JP5455123B2 (en) Image processing device for component mounter
US6819789B1 (en) Scaling and registration calibration especially in printed circuit board fabrication
CN115854864A (en) Optical detection device, compensation method thereof and storage medium
JP2011232279A (en) Tilt inspection device and tilt inspection method
CN112985265B (en) Linear array camera, precision compensation method thereof and storage medium
JP3672371B2 (en) Method for measuring actual space length by imaging means, optical system calibration method, and reference gauge used for optical system calibration
JP2006129473A (en) Method and apparatus for correction of nonlinear field of view distortion of digital imaging system
JPWO2004106851A1 (en) Captured image processing apparatus and captured image processing method for electronic component mounter
JP2008281481A (en) Apparatus and method for measuring resolution
JP5653724B2 (en) Alignment device, alignment method, and alignment program
JP5787258B2 (en) Method and apparatus for measuring the position of a contact element of an electronic component
JP5702634B2 (en) Camera resolution automatic measurement method, automatic adjustment method, and image inspection method and apparatus
KR20140113449A (en) Drawing data generating method, drawing method, drawing data generating apparatus and drawing apparatus
JP4299688B2 (en) Substrate inspection method and substrate inspection apparatus
CN108605432A (en) Surface mounting apparatus, identification error bearing calibration
JP5465062B2 (en) Substrate appearance inspection apparatus and substrate appearance inspection method
KR20160117302A (en) Reference position obtaining method, reference position obtaining apparatus, pattern writing method, pattern writing apparatus, and a program recorded on
US20080008381A1 (en) Coordinate acquisition apparatus for test of printed board, and coordinate acquisition method and program for test thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination