A correction method, device, apparatus and storage medium
Patent Information
- Application Number
- CN202210652218.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-09
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2042-06-09
AI Technical Summary
[0004]本发明实施例提供一种校正方法、装置、设备及存储介质,基于校正参数能够克服由于丝杆带来的误差,与通过在丝杆上设置传感器校正误差的方式相比,既降低了成本,又能够防止出现由于传感器故障导致采集的误差不准确的问题,根据校正参数对成像装置的测量移动距离进行校正,能够有效提升成像装置的测量移动距离的精度,从而提升整机测量精度
[0063]本发明实施例通过升降装置带动成像装置沿标定板上标定块的高度方向移动,依次获取每个标定块对应的目标移动距离,再根据所述每个标定块对应的目标移动距离和所述每个标定块的高度信息确定校正参数,根据确定校正参数对所述成像装置的测量移动距离进行校正,基于校正参数能够克服由于丝杆带来的误差,与通过在丝杆上设置传感器校正误差的方式相比,既降低了成本,又能够防止出现由于传感器故障导致采集的误差不准确的问题,根据校正参数对成像装置的测量移动距离进行校正,能够有效提升成像装置的测量移动距离的精度,从而提升整机测量精度。
Smart Images

Figure CN117250211B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of positioning correction technology, and in particular to a correction method, apparatus, device and storage medium. Background Technology
[0002] AOI (Automatic Optical Inspection) is a device that uses optical principles to detect defects in the PCB manufacturing process. 3D-AOI, on the other hand, introduces 3D imaging technology, providing height information and thus improving inspection efficiency.
[0003] Current 3D-AOI imaging devices use a motion mechanism to move the imaging device along the test board to detect the 3D information of the object at different positions and heights on the test board. The motion mechanism is driven by a lead screw, and due to manufacturing errors of the lead screw itself and the cumulative errors generated after multiple movements, the final obtained 3D information is inaccurate. Summary of the Invention
[0004] This invention provides a calibration method, apparatus, device, and storage medium. Based on calibration parameters, it can overcome errors caused by the lead screw. Compared with the method of setting sensors on the lead screw to correct errors, it reduces costs and prevents inaccurate acquisition errors caused by sensor failure. By correcting the measurement movement distance of the imaging device according to the calibration parameters, the accuracy of the measurement movement distance of the imaging device can be effectively improved, thereby improving the overall measurement accuracy.
[0005] In a first aspect, embodiments of the present invention provide a correction method, the correction method comprising:
[0006] The imaging device is moved along the height direction of the calibration blocks on the calibration plate by a lifting device, and the target movement distance corresponding to each calibration block is obtained in sequence. The calibration plate includes at least two calibration blocks.
[0007] The correction parameters are determined based on the target movement distance corresponding to each calibration block and the height information of each calibration block;
[0008] The measurement movement distance of the imaging device is corrected according to the correction parameters.
[0009] Furthermore, the imaging device is moved along the height direction of the calibration blocks on the calibration plate by a lifting device, and the target movement distance corresponding to each calibration block is obtained sequentially, including:
[0010] The imaging device is moved along the height direction of the calibration block on the calibration plate by the lifting device until the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, and the current position of the imaging device is obtained. The target calibration block can be any calibration block.
[0011] The target movement distance corresponding to the target calibration block is determined based on the current position and the initial position of the imaging device.
[0012] Furthermore, the step of moving the imaging device along the height direction of the calibration block on the calibration plate using the lifting device until the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, and then obtaining the current position of the imaging device, includes:
[0013] The imaging device is moved along the height direction of the calibration block on the calibration plate by the lifting device. The imaging device includes a projection module and an image acquisition module. The projection module projects a target image onto the calibration plate during the movement.
[0014] The first image is obtained by acquiring the target image through the image acquisition module and projecting it onto the calibration plate.
[0015] The phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the position of the imaging device after it has moved is determined based on the first image.
[0016] When the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, the current position of the imaging device is obtained.
[0017] Furthermore, determining the phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the position of the imaging device after its movement based on the first image includes:
[0018] The set of pixels corresponding to each calibration block in the first image is determined based on the position information of each calibration block;
[0019] The set of pixels corresponding to the bottom surface of the calibration plate in the first image is determined based on the position information of the bottom surface of the calibration plate.
[0020] The phase value corresponding to each calibration block is determined based on the set of pixels corresponding to each calibration block;
[0021] The phase value corresponding to the bottom surface of the calibration board is determined based on the set of pixels corresponding to the bottom surface of the calibration board;
[0022] The phase difference between each calibration block and the bottom surface of the calibration plate is determined based on the phase value corresponding to each calibration block and the phase value corresponding to the bottom surface of the calibration plate after the imaging device moves.
[0023] Furthermore, correction parameters are determined based on the target movement distance corresponding to each calibration block and the height information of each calibration block, including:
[0024] The fitting parameters are determined based on the target movement distance corresponding to each calibration block and the height information of each calibration block.
[0025] Furthermore, correcting the measurement movement distance of the imaging device according to the correction parameters includes:
[0026] Construct the target model based on the fitting parameters;
[0027] The measurement movement distance of the imaging device is corrected based on the target model.
[0028] Furthermore, it also includes:
[0029] The lifting device drives the imaging device to move along the height direction of the object being measured on the board until the second image obtained by projecting the target image acquired by the image acquisition module onto the board meets the preset conditions. Then, the first position of the imaging device is obtained. During the movement, the projection module projects the target image onto the board.
[0030] Determine the first height corresponding to each measured object based on the second image;
[0031] The first moving distance is determined based on the first position of the imaging device, the initial position of the imaging device, and the target model;
[0032] The target height of each measured object is determined based on the first height and the first moving distance of each measured object.
[0033] Secondly, embodiments of the present invention also provide a calibration device, the calibration device comprising:
[0034] The first acquisition module is used to drive the imaging device to move along the height direction of the calibration blocks on the calibration plate through the lifting device, and sequentially acquire the target movement distance corresponding to each calibration block. The calibration plate includes at least two calibration blocks.
[0035] The calibration parameter determination module is used to determine calibration parameters based on the target movement distance corresponding to each calibration block and the height information of each calibration block;
[0036] A calibration module is used to correct the measurement movement distance of the imaging device according to the determined calibration parameters.
[0037] Furthermore, the first acquisition module is specifically used for:
[0038] The imaging device is moved along the height direction of the calibration block on the calibration plate by the lifting device until the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, and the current position of the imaging device is obtained. The target calibration block can be any calibration block.
[0039] The target movement distance corresponding to the target calibration block is determined based on the current position and the initial position of the imaging device.
[0040] Furthermore, the first acquisition module is specifically used for:
[0041] The imaging device is moved along the height direction of the calibration block on the calibration plate by the lifting device. The imaging device includes a projection module and an image acquisition module. The projection module projects a target image onto the calibration plate during the movement.
[0042] The first image is obtained by acquiring the target image through the image acquisition module and projecting it onto the calibration plate.
[0043] The phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the position of the imaging device after it has moved is determined based on the first image.
[0044] When the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, the current position of the imaging device is obtained.
[0045] Furthermore, the first acquisition module is specifically used for:
[0046] The set of pixels corresponding to each calibration block in the first image is determined based on the position information of each calibration block;
[0047] The set of pixels corresponding to the bottom surface of the calibration plate in the first image is determined based on the position information of the bottom surface of the calibration plate.
[0048] The phase value corresponding to each calibration block is determined based on the set of pixels corresponding to each calibration block;
[0049] The phase value corresponding to the bottom surface of the calibration board is determined based on the set of pixels corresponding to the bottom surface of the calibration board;
[0050] The phase difference between each calibration block and the bottom surface of the calibration plate is determined based on the phase value corresponding to each calibration block and the phase value corresponding to the bottom surface of the calibration plate after the imaging device moves.
[0051] Furthermore, the correction parameter determination module is specifically used for:
[0052] The fitting parameters are determined based on the target movement distance corresponding to each calibration block and the height information of each calibration block.
[0053] Furthermore, the correction module is specifically used for:
[0054] Construct the target model based on the fitting parameters;
[0055] The measurement movement distance of the imaging device is corrected based on the target model.
[0056] Furthermore, it also includes:
[0057] The second acquisition module is used to move the imaging device along the height direction of the object being measured on the board through the lifting device until the second image obtained by projecting the target image acquired by the image acquisition module onto the board meets the preset conditions, and then acquire the first position of the imaging device, wherein the projection module projects the target image onto the board during the movement.
[0058] The first height determination module is used to determine the first height corresponding to each measured object based on the second image;
[0059] A distance determination module is used to determine a first moving distance based on the first position of the imaging device, the initial position of the imaging device, and the target model;
[0060] The target height determination module is used to determine the target height corresponding to each measured object based on the first height corresponding to each measured object and the first moving distance.
[0061] Thirdly, embodiments of the present invention also provide a terminal device, including a storage device, a processor, and a computer program stored on the storage device and executable on the processor, wherein the processor executes the program to implement the correction method as described in any of the embodiments of the present invention.
[0062] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the correction method as described in any of the embodiments of the present invention.
[0063] In this embodiment of the invention, a lifting device drives the imaging device to move along the height direction of the calibration blocks on a calibration plate, sequentially acquiring the target movement distance corresponding to each calibration block. Then, based on the target movement distance and the height information of each calibration block, correction parameters are determined. The measured movement distance of the imaging device is corrected according to the determined correction parameters. Based on the correction parameters, the error caused by the lead screw can be overcome. Compared with the method of correcting errors by setting sensors on the lead screw, this method reduces costs and prevents inaccurate acquisition errors due to sensor failure. Correcting the measured movement distance of the imaging device according to the correction parameters can effectively improve the accuracy of the measured movement distance of the imaging device, thereby improving the overall measurement accuracy. Attached Figure Description
[0064] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 This is a flowchart illustrating a correction method according to Embodiment 1 of the present invention;
[0066] Figure 2 This is a diagram of the calibration block in Embodiment 1 of the present invention;
[0067] Figure 3 This is a flowchart illustrating the correction process in Embodiment 1 of the present invention;
[0068] Figure 4 This is an error diagram corresponding to the measured movement distance in Embodiment 1 of the present invention;
[0069] Figure 5 This is the error diagram corresponding to the movement distance obtained after correcting the measured movement distance in Embodiment 1 of the present invention;
[0070] Figure 6 This is a schematic diagram of the structure of a calibration device according to Embodiment 2 of the present invention;
[0071] Figure 7 This is a schematic diagram of the structure of a terminal device according to Embodiment 3 of the present invention. Detailed Implementation
[0072] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0073] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the figures. The process can correspond to a method, function, procedure, subroutine, subroutine, etc. Moreover, embodiments and features in the embodiments of the present invention can be combined with each other without conflict.
[0074] The term "comprising" and its variations as used in this invention are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment".
[0075] It should be noted that the concepts of "first" and "second" mentioned in this invention are only used to distinguish the corresponding contents and are not used to limit the order or interdependence.
[0076] Example 1
[0077] Figure 1 This is a flowchart illustrating a correction method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where the measurement movement distance of an imaging device needs to be corrected. The method can be executed by the correction device in this embodiment, which can be implemented in software and / or hardware, such as... Figure 1 As shown, the method specifically includes the following steps:
[0078] S110, the imaging device is driven to move along the height direction of the calibration blocks on the calibration plate by the lifting device, and the target movement distance corresponding to each calibration block is obtained in sequence. The calibration plate includes at least two calibration blocks.
[0079] In this embodiment of the invention, at least two calibration blocks are present on the calibration plate, and a lifting device is provided within a preset range on one side of the calibration plate. The lifting device can drive the imaging device to move along the height direction of the calibration blocks on the calibration plate. The setting position of the lifting device is related to the performance parameters of the imaging device, and the setting position of the lifting device needs to ensure that the clarity of the image of the calibration plate acquired by the imaging device is greater than a clarity threshold. The calibration blocks can be square pillars.
[0080] In this calibration plate, at least two calibration blocks have different heights, and these two calibration blocks can be located in the central area of the calibration plate. For example, there could be eight calibration blocks on the calibration plate, each a square pillar with a different height. The eight calibration blocks could be arranged as follows: Figure 2 As shown.
[0081] One method for moving the imaging device along the height direction of the calibration block on the calibration plate via a lifting device can be: sending a control command to the lifting device to move the imaging device along the height direction of the calibration block on the calibration plate. Another method is to adjust the lifting device to move the imaging device along the height direction of the calibration block on the calibration plate. Yet another method is to move the imaging device up and down along the height direction of the calibration block on the calibration plate. A third method is to move the imaging device left and right along the height direction of the calibration block on the calibration plate. For example, after the lead screw rotates 100 revolutions and the lifting device receives a movement command from the central control unit, pressing a button on the lifting device will cause the lifting device to move the imaging device along the height direction of the calibration block on the calibration plate.
[0082] The target moving distance for each calibration block is defined as the distance the imaging device moves when the phase difference between the calibration block and the bottom surface of the calibration plate is zero. For example, when the imaging device is moved upwards from position A to position B along the height direction of the calibration block using a lifting device, the phase difference between calibration block A and the bottom surface of the calibration plate is zero. Here, positions A and B are measured moving distances and contain errors; they are not the actual moving distances. Therefore, the target moving distance corresponding to calibration block A is determined to be the moving distance from position A to position B, which is the height at position B minus the height at position A.
[0083] Specifically, the method of moving the imaging device along the height direction of the calibration blocks on the calibration plate using a lifting device, and sequentially obtaining the target movement distance corresponding to each calibration block, can be as follows: The imaging device is moved along the height direction of the calibration blocks on the calibration plate using a lifting device until the phase difference between the target calibration block and the bottom surface of the calibration plate is zero. The current position of the imaging device is then obtained, where the target calibration block can be any calibration block. The target movement distance corresponding to the target calibration block is determined based on the current position and the initial position of the imaging device. This process is repeated until the target movement distance corresponding to each calibration block is obtained. For example, the imaging device can be moved upwards from position A along the height direction of the calibration blocks using a lifting device. The phase of each calibration block is collected every certain distance. When the phase difference between any calibration block and the bottom surface of the calibration plate is zero, the current position of the imaging device is obtained. The target movement distance corresponding to the calibration block is then determined based on the current position of the imaging device and position A.
[0084] S120, determine the correction parameters based on the target movement distance corresponding to each calibration block and the height information of each calibration block.
[0085] The height information of each calibration block is the actual height of the calibration block that has been stored in advance.
[0086] The correction parameter is a parameter used to overcome the error caused by the lead screw.
[0087] Specifically, the correction parameters can be determined based on the target movement distance and height information of each calibration block. For example, the fitting parameters can be determined by using gradient descent based on the target movement distance and height information of each calibration block.
[0088] S130, the measurement movement distance of the imaging device is corrected according to the correction parameters.
[0089] Specifically, the method for correcting the measurement movement distance of the imaging device based on the correction parameters can be as follows: construct a target model based on the fitting parameters; and correct the measurement movement distance of the imaging device based on the target model.
[0090] The technical solution of this embodiment uses a lifting device to move the imaging device along the height direction of the calibration blocks on the calibration plate, sequentially acquiring the target movement distance corresponding to each calibration block. Then, based on the target movement distance and the height information of each calibration block, a correction parameter is determined. The measurement movement distance of the imaging device is corrected according to the correction parameter. This solves the problem that the cumulative error after multiple movements of the imaging device due to manufacturing errors in the lifting device leads to large errors when measuring tall objects. Based on the correction parameter, the error caused by the lead screw can be overcome. Correcting the measurement movement distance of the imaging device according to the correction parameter can effectively improve the accuracy of the measurement movement distance of the imaging device, thereby improving the overall measurement accuracy.
[0091] In one embodiment, the imaging device is moved along the height direction of the calibration blocks on the calibration plate by a lifting device, and the target movement distance corresponding to each calibration block is obtained sequentially, including:
[0092] The imaging device is moved along the height direction of the calibration block on the calibration plate by the lifting device until the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, and the current position of the imaging device is obtained. The target calibration block can be any calibration block.
[0093] The target movement distance corresponding to the target calibration block is determined based on the current position and the initial position of the imaging device.
[0094] In this process, as the imaging device moves along the height of the calibration blocks on the calibration plate using a lifting device, the phase difference between the calibration block and the bottom surface of the calibration plate is collected every certain distance. For example, the imaging device can be moved from position A to position B using the lifting device. When the imaging device is at position B, the phase difference between each calibration block and the bottom surface of the calibration plate is acquired. It is then determined whether there is a calibration block with a zero phase difference from the bottom surface of the calibration plate. If so, the position B and the identifier of the calibration block with a zero phase difference from the bottom surface of the calibration plate are recorded. If not, the imaging device is moved from position B using the lifting device. Move the device to position C. When the imaging device is in position C, obtain the phase difference between each calibration block and the bottom surface of the calibration plate. Determine if there is a calibration block with a zero phase difference from the bottom surface of the calibration plate. If there is, record position C and the identifier of the calibration block with a zero phase difference from the bottom surface of the calibration plate. If not, move the imaging device from position C to position D using the lifting device. Repeat the above operation until the current position of the imaging device when the phase difference between each calibration block and the bottom surface of the calibration plate is zero is obtained. Note that positions C and D are measured moving distances with errors and are not actual moving distances.
[0095] Optionally, the method of moving the imaging device along the height direction of the calibration blocks on the calibration plate using a lifting device to sequentially obtain the target movement distance corresponding to each calibration block can also be as follows: obtain the position information of each calibration block, move the imaging device sequentially to directly above each calibration block according to the position information of each calibration block, and sequentially record the target movement distance corresponding to zero phase difference for each calibration block. The position information of each calibration block can be pre-stored position information, and this embodiment of the invention does not impose any limitations on this. The method of obtaining the current position of the imaging device can be as follows: the lifting device has a display screen that can display the current position of the imaging device; after the user reads the position information displayed on the screen, the current position of the imaging device is input into the calibration device. Alternatively, the lifting device can include a scale; the user reads the current position of the imaging device according to the scale and inputs the current position of the imaging device into the calibration device. Another way to obtain the current position of the imaging device is as follows: the lifting device and the calibration device are connected. When there is a calibration block with zero phase difference from the bottom surface of the calibration plate, the calibration device sends a command to the lifting device. The lifting device obtains the current position of the imaging device according to the command. The lifting device sends the current position of the imaging device to the calibration device so that the calibration device can obtain the current position of the imaging device. This embodiment of the present invention does not limit this.
[0096] The bottom surface of the calibration plate is the plane on which the bottom surface of the calibration block is located.
[0097] The initial position of the imaging device is the position of the imaging device before it is moved. Since the calibration plate has a certain thickness, the initial position of the imaging device is not zero.
[0098] Specifically, the method for determining the target movement distance corresponding to the target calibration block based on the current position and the initial position of the imaging device can be as follows: the difference between the current position and the initial position of the imaging device is determined as the target movement distance. For example, the imaging device can be moved from position A to position B by a lifting device. When the imaging device is at position B, the phase difference between each calibration block and the bottom surface of the calibration plate is obtained. If there is a calibration block with a zero phase difference with the bottom surface of the calibration plate, then position B is determined as the current position of the imaging device. Since position A is the initial position of the imaging device, the difference between position B and position A is determined as the target movement distance (wherein, position A, position B, and target movement distance are all measured movement distances with errors, and are not the actual movement distances).
[0099] In one embodiment, the imaging device is moved along the height direction of the calibration block on the calibration plate by a lifting device until the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, and the current position of the imaging device is obtained, including:
[0100] The imaging device is moved along the height direction of the calibration block on the calibration plate by a lifting device. The imaging device includes a projection module and an image acquisition module. The projection module projects the target image onto the calibration plate during the movement.
[0101] The first image is obtained by acquiring the target image through the image acquisition module and projecting it onto the calibration board.
[0102] The phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the position of the imaging device after it has moved is determined based on the first image.
[0103] When the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, the current position of the imaging device is obtained.
[0104] The imaging device includes a projection module and an image acquisition module. The projection module can be a projector or other modules with projection function, and the image acquisition module can be a camera or other modules with image acquisition function. This embodiment of the invention does not limit the scope of the invention.
[0105] The target image can be a moiré pattern or a dot pattern, and the embodiments of the present invention do not limit it.
[0106] It should be noted that there can be one or more target images. When there are multiple target images, the accuracy of phase value determination can be improved.
[0107] Specifically, the method for acquiring the target image and projecting it onto the calibration plate using the image acquisition module is as follows: During the movement of the projection module, each time a target image is projected, the image acquisition module acquires the first image after the target image is deformed by the modulation of the shapes of at least two calibration blocks. For example, the imaging device can be moved from position A to position B using a lifting device. Position A is the initial position of the imaging device. When the imaging device is at position B, the projection module projects the target image X onto the calibration plate, and the image acquisition module acquires the target image and projects it onto the calibration plate to obtain the first image x. The projection module then projects the target image Y onto the calibration plate, and the image acquisition module acquires the target image and projects it onto the calibration plate to obtain the first image y. Finally, the projection module projects the target image Z onto the calibration plate, and the image acquisition module acquires the target image and projects it onto the calibration plate to obtain the first image z.
[0108] Specifically, the method for determining the phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the position of the imaging device after movement based on the first image can be as follows: determine the set of pixels corresponding to each calibration block in the first image and the set of pixels corresponding to the bottom surface of the calibration plate in the first image based on the position information of each calibration block; determine the phase value corresponding to each calibration block based on the set of pixels corresponding to each calibration block; determine the phase value corresponding to the bottom surface of the calibration plate based on the set of pixels corresponding to the bottom surface of the calibration plate; and determine the phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the position of the imaging device after movement based on the phase value corresponding to each calibration block and the phase value corresponding to the bottom surface of the calibration plate. The method for determining the phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the moved position of the imaging device based on the first image can also be as follows: determine the set of pixels corresponding to each calibration block in the first image based on the position information of each calibration block; determine the set of pixels corresponding to the bottom surface of the calibration plate in the first image based on the position information of the bottom surface of the calibration plate; determine the phase value corresponding to each calibration block based on the set of pixels corresponding to each calibration block; determine the phase value corresponding to the bottom surface of the calibration plate based on the set of pixels corresponding to the bottom surface of the calibration plate; and determine the phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the moved position of the imaging device based on the phase value corresponding to each calibration block and the phase value corresponding to the bottom surface of the calibration plate. The method for determining the phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the moved position of the imaging device based on the first image can also be as follows: Determine the set of pixels corresponding to each calibration block in the first image based on the position information of each calibration block; determine the set of pixels corresponding to the bottom surface of the calibration plate in the first image based on the position information of the bottom surface of the calibration plate; determine the phase value of the calibration block corresponding to each pixel in the set of pixels corresponding to each calibration block; then determine the average of the phase values of the calibration block corresponding to each pixel in the set of pixels as the phase value corresponding to the calibration block; determine the phase value of the bottom surface of the calibration plate corresponding to each pixel in the set of pixels corresponding to each pixel in the set of pixels; then determine the average of the phase values of the bottom surface of the calibration plate corresponding to each pixel in the set of pixels as the phase value of the bottom surface of the calibration plate; finally, determine the phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the moved position of the imaging device based on the phase value corresponding to each calibration block and the phase value corresponding to the bottom surface of the calibration plate. This embodiment of the invention does not limit this method.
[0109] In one embodiment, determining the phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the position of the imaging device after movement, based on the first image, includes:
[0110] The set of pixels corresponding to each calibration block in the first image is determined based on the position information of each calibration block;
[0111] The set of pixels corresponding to the bottom surface of the calibration plate in the first image is determined based on the position information of the bottom surface of the calibration plate.
[0112] The phase value corresponding to each calibration block is determined based on the set of pixels corresponding to each calibration block;
[0113] The phase value corresponding to the bottom surface of the calibration board is determined based on the set of pixels corresponding to the bottom surface of the calibration board.
[0114] The phase difference between each calibration block and the bottom surface of the calibration plate is determined based on the phase value corresponding to each calibration block and the phase value corresponding to the bottom surface of the calibration plate after the imaging device is moved.
[0115] Specifically, the method for determining the set of pixels corresponding to each calibration block in the first image based on the position information of each calibration block can be as follows: The set of pixels corresponding to each calibration block can be selected from the set of pixels corresponding to the first image based on the position information of each calibration block. For example, if there are four calibration blocks: calibration block 1, calibration block 2, calibration block 3, and calibration block 4, the set of pixels corresponding to calibration block 1 can be selected from the set of pixels corresponding to the first image based on the position information of calibration block 1, the set of pixels corresponding to calibration block 2 can be selected from the set of pixels corresponding to the first image based on the position information of calibration block 2, the set of pixels corresponding to calibration block 3 can be selected from the set of pixels corresponding to the first image based on the position information of calibration block 3, and the set of pixels corresponding to calibration block 4 can be selected from the set of pixels corresponding to the first image based on the position information of calibration block 4.
[0116] Specifically, the method for determining the set of pixels corresponding to the bottom surface of the calibration plate in the first image based on the position information of the bottom surface of the calibration plate can be as follows: The set of pixels corresponding to the bottom surface of the calibration plate can be selected from the set of pixels corresponding to the bottom surface of the first image based on the position information of the bottom surface of the calibration plate. It should be noted that the set of pixels corresponding to the bottom surface of the calibration plate can also be determined by generating the set of pixels corresponding to the bottom surface of the calibration plate from the set of pixels in the set of pixels corresponding to the first image, excluding the set of pixels corresponding to the calibration block.
[0117] It should be noted that if there are multiple target images, there will also be multiple first images. It is necessary to obtain the set of pixels corresponding to each calibration block in each first image and the set of pixels corresponding to the bottom surface of the calibration board; then determine the phase value corresponding to each calibration block based on the set of pixels corresponding to each calibration block in each first image; and determine the phase value corresponding to the bottom surface of the calibration board based on the set of pixels corresponding to the bottom surface of the calibration board in each first image.
[0118] Specifically, the method for determining the phase value of each calibration block based on the set of pixels corresponding to each calibration block can be as follows: determine the phase value of each calibration block based on the set of pixels corresponding to each calibration block in each first image; another method is to determine the phase value of each calibration block based on each pixel in the set of pixels corresponding to each calibration block, then obtain the average of the phase values of each pixel corresponding to each calibration block, and determine the average of the phase values of each pixel corresponding to each calibration block as the phase value of each calibration block. For example, the expression for pixel (x, y) in the set of pixels corresponding to a calibration block can be as follows:
[0119] I m (x,y)=B(x,y)+A(x,y)cos[φ(x,y)+2πm / M];
[0120] Where m = 1, 2, 3, ..., M, M is the total number of target images, B(x,y) is the background light intensity, A(x,y) is the intensity modulation parameter, and φ(x,y) is the phase value. φ(x,y) can be solved by least squares using M of the above equations, as shown in the following expression:
[0121] Among them, -π<φ(x,y)<π.
[0122] Specifically, the method of determining the phase value corresponding to the bottom surface of the calibration board based on the set of pixels corresponding to the bottom surface of the calibration board is the same as the method of determining the phase value corresponding to each calibration block based on the set of pixels corresponding to each calibration block, and will not be elaborated here.
[0123] In one embodiment, the correction parameters are determined based on the target movement distance corresponding to each calibration block and the height information of each calibration block, including:
[0124] The fitting parameters are determined based on the target movement distance and height information of each calibration block.
[0125] Specifically, the fitting parameters can be determined based on the target movement distance and height information of each calibration block. This can be achieved using gradient descent, with the objective function shown below:
[0126]
[0127] Among them, z i Let be the target movement distance corresponding to the i-th calibration block. Let be the height of the i-th calibration block, n be the total number of calibration blocks, θ0, θ1, θ2, θ3 be the fitting parameters, and f be the height of the ith calibration block. θ (zi )=θ0+θ1z+θ2z 2 +θ3z 3 z represents the target movement distance corresponding to the calibration block.
[0128] The gradient descent iterative function is:
[0129]
[0130] Where α is the gradient descent rate, j = 0, 1, 2, 3, and after a sufficient number of iterations, the accurate fitting parameters θ0, θ1, θ2, θ3 can be obtained.
[0131] Optionally, the measurement movement distance of the imaging device is corrected according to the correction parameters, including:
[0132] Construct the target model based on the fitted parameters;
[0133] The measurement movement distance of the imaging device is corrected based on the target model.
[0134] Specifically, the method for constructing the target model based on the fitted parameters can be as follows: Substitute the fitted parameters θ0, θ1, θ2, θ3 into the formula: in, The height of the calibration block is determined. The target model is then obtained. Where P is the measurement movement distance of the imaging device. The measured movement distance of the imaging device after calibration.
[0135] Specifically, the method for correcting the measured movement distance of the imaging device based on the target model can be as follows: after obtaining the measured movement distance of the imaging device, substitute it into... The measured movement distance of the calibrated imaging device is obtained.
[0136] Optional, also includes:
[0137] The imaging device is moved along the height of the object being measured on the board by the lifting device until the second image obtained by projecting the target image acquired by the image acquisition module onto the board meets the preset conditions. The first position of the imaging device is then obtained. During the movement, the projection module projects the target image onto the board.
[0138] Determine the first height corresponding to each measured object based on the second image;
[0139] The first moving distance is determined based on the first position of the imaging device, the initial position of the imaging device, and the target model;
[0140] The target height for each measured object is determined based on its first height and first moving distance.
[0141] The object being tested can be the material on the circuit board.
[0142] The preset condition can be that the image sharpness is greater than a sharpness threshold.
[0143] Specifically, the imaging device is moved upward along the height of the object being measured on the board by a lifting device until the second image obtained by projecting the target image acquired by the image acquisition module onto the board meets the preset conditions. The first position of the imaging device can be obtained as follows: the imaging device is moved upward along the height of the object being measured on the board by a lifting device. After moving to a certain height, the projection module projects the target image onto the board, and the image acquisition module acquires the second image obtained by projecting the target image onto the board and obtains the clarity of the second image. If the clarity of the second image is less than the clarity threshold, the imaging device continues to move upward. After moving to a certain height, the projection module projects the target image onto the board during the movement, and the image acquisition module acquires the second image obtained by projecting the target image onto the board and obtains the clarity of the second image. If the clarity of the second image is less than the clarity threshold, the above steps are repeated until the clarity of the acquired second image is greater than the clarity threshold. The measurement movement distance of the imaging device when the clarity of the acquired second image is greater than the clarity threshold is obtained.
[0144] Optionally, the imaging device can be moved along the height direction of the object being measured on the board by means of a lifting device. This can be done by moving the imaging device up and down along the height direction of the object being measured on the board, or by moving the imaging device left and right along the height direction of the object being measured on the board. This embodiment of the invention does not limit this.
[0145] In one embodiment, each calibration block has a different height.
[0146] This invention improves measurement accuracy by obtaining the target movement distance corresponding to calibration blocks at different heights and the height information of calibration blocks at different heights to correct the measurement movement distance of the imaging device.
[0147] In a specific example, such as Figure 3 As shown, the correction method provided in this embodiment of the invention includes the following steps:
[0148] 1. Acquire moiré fringe patterns of the calibration blocks using an imaging device (the calibration blocks consist of multiple square pillars of known height, ranging from 500 micrometers to 5000 micrometers in height, such as...). Figure 2 (As shown).
[0149] 2. Perform phase calculation on the acquired moiré fringe pattern, record the phase value of the bottom surface of the calibration plate and each square column, and calculate the phase difference between each square column and the bottom surface of the calibration plate.
[0150] 3. Move the imaging device upward along the lead screw and continuously record the phase difference until the phase difference between the square column 1 and the bottom surface of the calibration plate is 0, and record the measured movement distance of the imaging device;
[0151] 4. Repeat steps 1-3, moving the imaging device upwards until the phase difference between the square pillar 2 and the bottom surface of the calibration plate is 0, and record the difference between the height of the imaging system and the initial height. Similarly, move the imaging device to the height where the phase difference between each square pillar and the bottom surface of the calibration plate is 0, and record the distance it moves relative to the initial height.
[0152] 5. Fit the measured movement distance corresponding to each square column to the height value of the square column (actual movement distance) to obtain the objective function. The objective function can be used to correct the measured movement distance to obtain the corrected measured movement distance of the imaging device.
[0153] Figure 4 To measure the error corresponding to the distance traveled, Figure 5 To correct for the error in the measured movement distance, such as... Figure 4 and Figure 5 As shown, the correction method provided in this embodiment of the invention can reduce the error of the moving distance of the imaging device from 70 micrometers to less than 20 micrometers. Therefore, the correction method provided in this embodiment of the invention can effectively improve the accuracy of the moving distance of the 3D-AOI imaging device.
[0154] Example 2
[0155] Figure 6 This is a schematic diagram of a calibration device provided in Embodiment 2 of the present invention. This embodiment is applicable to calibration situations. The device can be implemented using software and / or hardware, and can be integrated into a terminal, such as... Figure 6 As shown, the calibration device specifically includes: a first acquisition module 210, a calibration parameter determination module 220, and a calibration module 230.
[0156] The first acquisition module 210 is used to drive the imaging device to move along the height direction of the calibration blocks on the calibration plate through the lifting device, and sequentially acquire the target movement distance corresponding to each calibration block. The calibration plate includes at least two calibration blocks.
[0157] The calibration parameter determination module 220 is used to determine calibration parameters based on the target movement distance corresponding to each calibration block and the height information of each calibration block;
[0158] The calibration module 230 is used to calibrate the measurement movement distance of the imaging device according to the determined calibration parameters.
[0159] Optionally, the first acquisition module is specifically used for:
[0160] The imaging device is moved along the height direction of the calibration block on the calibration plate by the lifting device until the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, and the current position of the imaging device is obtained. The target calibration block can be any calibration block.
[0161] The target movement distance corresponding to the target calibration block is determined based on the current position and the initial position of the imaging device.
[0162] Optionally, the first acquisition module is specifically used for:
[0163] The imaging device is moved along the height direction of the calibration block on the calibration plate by the lifting device. The imaging device includes a projection module and an image acquisition module. The projection module projects a target image onto the calibration plate during the movement.
[0164] The first image is obtained by acquiring the target image through the image acquisition module and projecting it onto the calibration plate.
[0165] The phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the position of the imaging device after it has moved is determined based on the first image.
[0166] When the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, the current position of the imaging device is obtained.
[0167] Optionally, the first acquisition module is specifically used for:
[0168] The set of pixels corresponding to each calibration block in the first image is determined based on the position information of each calibration block;
[0169] The set of pixels corresponding to the bottom surface of the calibration plate in the first image is determined based on the position information of the bottom surface of the calibration plate.
[0170] The phase value corresponding to each calibration block is determined based on the set of pixels corresponding to each calibration block;
[0171] The phase value corresponding to the bottom surface of the calibration board is determined based on the set of pixels corresponding to the bottom surface of the calibration board;
[0172] The phase difference between each calibration block and the bottom surface of the calibration plate is determined based on the phase value corresponding to each calibration block and the phase value corresponding to the bottom surface of the calibration plate after the imaging device moves.
[0173] Optionally, the correction parameter determination module is specifically used for:
[0174] The fitting parameters are determined based on the target movement distance corresponding to each calibration block and the height information of each calibration block.
[0175] Optionally, the correction module is specifically used for:
[0176] Construct the target model based on the fitting parameters;
[0177] The measurement movement distance of the imaging device is corrected based on the target model.
[0178] Optional, also includes:
[0179] The second acquisition module is used to move the imaging device along the height direction of the object being measured on the board through the lifting device until the second image obtained by projecting the target image acquired by the image acquisition module onto the board meets the preset conditions, and then acquire the first position of the imaging device, wherein the projection module projects the target image onto the board during the movement.
[0180] The first height determination module is used to determine the first height corresponding to each measured object based on the second image;
[0181] A distance determination module is used to determine a first moving distance based on the first position of the imaging device, the initial position of the imaging device, and the target model;
[0182] The target height determination module is used to determine the target height corresponding to each measured object based on the first height corresponding to each measured object and the first moving distance.
[0183] The above-described products can perform the methods provided in any embodiment of the present invention, and have the corresponding functional modules and beneficial effects for performing the methods.
[0184] The technical solution of this embodiment uses a lifting device to move the imaging device along the height direction of the calibration blocks on the calibration plate, sequentially acquiring the target movement distance corresponding to each calibration block. Then, based on the target movement distance and the height information of each calibration block, correction parameters are determined. The measurement movement distance of the imaging device is corrected according to the correction parameters. Based on the correction parameters, the error caused by the lead screw can be overcome. Compared with the method of correcting the error by setting a sensor on the lead screw, this method reduces costs and prevents inaccurate acquisition due to sensor failure. Correcting the measurement movement distance of the imaging device according to the correction parameters can effectively improve the accuracy of the measurement movement distance of the imaging device, thereby improving the overall measurement accuracy.
[0185] Example 3
[0186] Figure 7 This is a schematic diagram of the structure of a terminal device provided in Embodiment 3 of the present invention. Figure 7 As shown, the terminal device provided in Embodiment 3 of the present invention includes: one or more processors 31 and a storage device 32; the processor 31 in the terminal device may be one or more, Figure 7 Taking a processor 31 as an example; storage device 32 is used to store one or more programs; one or more programs are executed by one or more processors 31, such that one or more processors 31 implement the correction method as described in any of the embodiments of the present invention.
[0187] The terminal device may also include an input device 33 and an output device 34.
[0188] The processor 31, storage device 32, input device 33, and output device 34 in the terminal device can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.
[0189] The storage device 32 in this terminal device serves as a computer-readable storage medium, which can be used to store one or more programs. These programs can be software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the driving method provided in Embodiment 1 of this invention (e.g., attached...). Figure 6 The modules in the calibration device shown include: a first acquisition module 210, a calibration parameter determination module 220, and a calibration module 230. The processor 31 executes various functional applications and data processing of the terminal device by running software programs, instructions, and modules stored in the storage device 32, thereby implementing the calibration method in the above method embodiment.
[0190] Storage device 32 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, storage device 32 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, storage device 32 may further include memory remotely located relative to processor 31, and this remote memory may be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0191] Input device 33 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the terminal device. Output device 34 may include display devices such as a display screen.
[0192] Furthermore, when one or more programs included in the aforementioned terminal device are executed by one or more processors 31, the programs perform the following operations:
[0193] The imaging device is moved along the height direction of the calibration blocks on the calibration plate by a lifting device, and the target movement distance corresponding to each calibration block is obtained in sequence. The calibration plate includes at least two calibration blocks.
[0194] The correction parameters are determined based on the target movement distance corresponding to each calibration block and the height information of each calibration block;
[0195] The measurement movement distance of the imaging device is corrected according to the correction parameters.
[0196] Example 4
[0197] Embodiment 4 of the present invention provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the program is used to perform a correction method, the correction method comprising:
[0198] The imaging device is moved along the height direction of the calibration blocks on the calibration plate by a lifting device, and the target movement distance corresponding to each calibration block is obtained in sequence. The calibration plate includes at least two calibration blocks.
[0199] The correction parameters are determined based on the target movement distance corresponding to each calibration block and the height information of each calibration block;
[0200] The measurement movement distance of the imaging device is corrected according to the correction parameters.
[0201] Optionally, when executed by a processor, the program can also be used to perform the correction method provided in any embodiment of the present invention.
[0202] The computer storage medium of this invention can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable CD-ROM, optical storage device, magnetic storage device, or any suitable combination thereof. The computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0203] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device.
[0204] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, radio frequency (RF), etc., or any suitable combination thereof.
[0205] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Python, and conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0206] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A calibration method, characterized in that, include: The imaging device is moved along the height direction of the calibration blocks on the calibration plate by a lifting device, and the target moving distance corresponding to each calibration block is obtained in sequence. The calibration plate includes at least two calibration blocks, and the target moving distance is the measured moving distance of the imaging device when the phase difference between the calibration block and the bottom surface of the calibration plate is zero. The fitting parameters are determined based on the target movement distance corresponding to each calibration block and the height information of each calibration block. The fitting parameters are used to overcome the errors caused by the lead screw. The measurement movement distance of the imaging device is corrected based on the fitting parameters and the target model determined based on the fitting parameters.
2. The method according to claim 1, characterized in that, The imaging device is moved along the height of the calibration blocks on the calibration plate by a lifting device, and the target movement distance corresponding to each calibration block is obtained sequentially, including: The imaging device is moved along the height direction of the calibration block on the calibration plate by the lifting device until the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, and the current position of the imaging device is obtained. The target calibration block can be any calibration block. The target movement distance corresponding to the target calibration block is determined based on the current position and the initial position of the imaging device.
3. The method according to claim 2, characterized in that, The step of moving the imaging device along the height direction of the calibration block on the calibration plate using the lifting device until the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, and then obtaining the current position of the imaging device, includes: The imaging device is moved along the height direction of the calibration block on the calibration plate by the lifting device. The imaging device includes a projection module and an image acquisition module. The projection module projects a target image onto the calibration plate during the movement. The first image is obtained by acquiring the target image through the image acquisition module and projecting it onto the calibration plate. The phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the position of the imaging device after it has moved is determined based on the first image. When the phase difference between the target calibration block and the bottom surface of the calibration plate is zero, the current position of the imaging device is obtained.
4. The method according to claim 3, characterized in that, The step of determining the phase difference between each calibration block and the bottom surface of the calibration plate corresponding to the position of the imaging device after movement based on the first image includes: The set of pixels corresponding to each calibration block in the first image is determined based on the position information of each calibration block; The set of pixels corresponding to the bottom surface of the calibration plate in the first image is determined based on the position information of the bottom surface of the calibration plate. The phase value corresponding to each calibration block is determined based on the set of pixels corresponding to each calibration block; The phase value corresponding to the bottom surface of the calibration board is determined based on the set of pixels corresponding to the bottom surface of the calibration board; The phase difference between each calibration block and the bottom surface of the calibration plate is determined based on the phase value corresponding to each calibration block and the phase value corresponding to the bottom surface of the calibration plate after the imaging device moves.
5. The method according to claim 3, characterized in that, Also includes: The lifting device drives the imaging device to move along the height direction of the object being measured on the board until the second image obtained by projecting the target image acquired by the image acquisition module onto the board meets the preset conditions. Then, the first position of the imaging device is obtained. During the movement, the projection module projects the target image onto the board. Determine the first height corresponding to each measured object based on the second image; The first moving distance is determined based on the first position of the imaging device, the initial position of the imaging device, and the target model; The target height of each measured object is determined based on the first height and the first moving distance of each measured object.
6. A calibration device, characterized in that, The correction device includes: The first acquisition module is used to drive the imaging device to move along the height direction of the calibration blocks on the calibration plate through the lifting device, and sequentially acquire the target moving distance corresponding to each calibration block. The calibration plate includes at least two calibration blocks, and the target moving distance is the measured moving distance of the imaging device when the phase difference between the calibration block and the bottom surface of the calibration plate is zero. The calibration parameter determination module is used to determine fitting parameters based on the target movement distance corresponding to each calibration block and the height information of each calibration block. The fitting parameters are used to overcome the error caused by the lead screw. A correction module is used to correct the measurement movement distance of the imaging device based on the fitting parameters and the target model determined based on the fitting parameters.
7. A terminal device, characterized in that, include: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the correction method as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the correction method as described in any one of claims 1-5.
Citation Information
Patent Citations
Grating projection system and grating phase shift height measurement automatic correction compensation method
CN114234847A