Method for using laser to assist camera in fast and accurate focusing
By using standard workpieces and laser modules to measure relative displacement vectors in monocular laser three-dimensional vision sensors, the focus problem caused by unfixed positions of the laser emitter and camera is solved, and fast and accurate focus adjustment is achieved, improving measurement stability is improved. and precision.
Patent Information
- Application Number
- CN202411575794.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-11-06
AI Technical Summary
In the monocular laser three-dimensional vision sensor, the relative position of the laser emitter and the camera is not fixed, resulting in the inability to focus quickly and accurately, affecting measurement accuracy and stability.
By placing standard workpieces in the effective area of the image measurement, recording the position data of their marking points, and using the laser module to measure the relative displacement vector, synchronizing the camera and the laser module, adjusting to the clear focal position, ensuring the consistency of the measurement data.
It realizes rapid and accurate finding of the clearest position of the image, improves the repetition and accuracy of the measurement, eliminates the instability and inaccuracy of the measurement data caused by unsatisfactory focus position, and ensures the accuracy and repeatability of the measurement.
Smart Images

Figure CN119179163A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to measurement technology, and in particular to a method for fast and accurate focusing of a laser-assisted camera. Background Art
[0002] The monocular line laser 3D vision sensor is mainly composed of a line laser transmitter and a single industrial camera. Due to its simple structure, low cost, short measurement time, strong robustness and other significant advantages, it has extremely wide applications in the industrial field, such as: weld visual tracking system, welding quality inspection system, body-in-white quality inspection system, body-in-white gap and flushness measurement, reverse engineering, etc. The parameter calibration accuracy of the monocular line laser 3D vision sensor directly affects its measurement accuracy. However, the position of the industrial camera in autofocusing to obtain a clear surface is not fixed, and there will be differences in each measurement, resulting in errors in the measurement value.
[0003] There is an optical imaging system, such as Figure 1 As shown, the laser emitter 1 is tilted at a certain angle, and the laser emitted by the laser emitter 1 irradiates the surface of the object 2 to be measured. The height of the object 2 to be measured is h. Since the surface of each object 2 to be measured is not completely flat, the offset value c of the laser point is captured by the camera 3, and the height difference of the object to be measured is calculated in combination with the setting angle value of the laser emitter 1. The camera 3 adjusts the focus according to the height difference, so that the imaging component can achieve automatic focus when shooting each object 2 to be measured, thereby improving the clarity of the image and reducing the loss of details in the image. In the optical imaging system, the laser emitter 1 is tilted at a certain angle α, which is set at the factory and the setting angle value is known. If the laser emitter 1 is installed by the user on the camera side later, and measures the spatial data of the object 2 together with the camera 3, since the laser emitter 1 is installed by the user later and the position is not fixed, the relative position relationship between the laser emitter 1 and the camera 3 cannot be obtained in advance. The laser emitter 1 needs to be positioned during measurement, which brings inconvenience to the measurement. Therefore, it is necessary to study a solution to solve the above problem. Summary of the invention
[0004] In view of this, the present invention aims at the deficiencies in the prior art, and its main purpose is to provide a method for using laser to assist a camera in fast and accurate focusing, which can solve the problem that the relative positions of the laser emitter and the camera are not fixed, and the laser emitter cannot be used to focus the camera quickly and accurately.
[0005] To achieve the above purpose, the present invention adopts the following technical solutions: A method for fast and accurate focusing of a laser-assisted camera comprises the following steps: Step 1: Place a standard workpiece for synchronization of the camera and the laser module in the effective area of image measurement, set a mark point A on the standard workpiece, move the camera to the measurement area of the mark point A, use the fast focus function of the camera to obtain a clear focal plane and measure, and the calculation module obtains the position data P1 of the mark point A, that is, the position data P1 is the clear focal plane position of the camera; Step 2, move the laser module to the measurement area of the marking point A, use the laser module to measure the position of the marking point A, and make the laser data display as 0, and the calculation module obtains the position data P2 of the marking point A; Step 3: There is a relative displacement vector between the position data P1 recorded when the camera is in clear focus and the position data P2 recorded when the laser module measures the mark point A. The calculation module subtracts the position data P2 from the position data P1 to obtain the current relative displacement vector between the position data P1 recorded when the camera is in clear focus and the position data P2 recorded when the laser module measures the mark point A, that is, the relative displacement vector = P2-P1. The camera and the laser module are synchronized according to the current relative displacement vector, so that the data measured by the laser module and the camera at the current position and the mark point in the same space are consistent. Step 4: During actual measurement, the measuring point of the measured workpiece is measured by the laser module. According to the measurement data measured by the laser module, based on the position data P1 of step 1 and the relative displacement vector calculated in step 3, the camera is adjusted to a clear focal position of the measured workpiece, and the measured workpiece is measured using the camera.
[0006] Compared with the prior art, the present invention has obvious advantages and beneficial effects. Specifically, it can be seen from the above technical solution that: By adopting the method of the present invention, the position close to the clearest image can be found quickly and accurately, and the measured object can be measured at this clear position, so that the repeatability and accuracy of the measurement can be achieved, and the problem of unstable, inaccurate and poor repeatability of the measurement data caused by the unsatisfactory focus position due to the poor imaging effect on the surface of some workpieces is eliminated. The specific position is measured by laser to quickly synchronize to the clear image position. In the case that the image cannot be accurate and repeatable, the measurement of the workpiece is achieved more accurately and repeatedly. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 It is a schematic diagram of the structure of an existing optical imaging system; Figure 2 In the preferred embodiment of the present invention, a standard part in the image is selected for focusing; Figure 3 In the preferred embodiment of the present invention, the laser focuses on the standard part selected in the image; Figure 4 It is calculated Figure 2 Location and Figure 3 The space vector difference of the position.
[0008] Description of the accompanying drawings: 1. Laser transmitter 2. Object to be measured 3. Camera. DETAILED DESCRIPTION
[0009] The present invention discloses a method for fast and accurate focusing of a camera using a laser, comprising the following steps: Step 1: Place a standard workpiece for synchronization of the camera and the laser module in the effective area of image measurement, set a marking point A on the standard workpiece, move the camera to the measurement area of the marking point A, use the camera's fast focus function to obtain a clear focal plane and measure, and the calculation module obtains the position data P1 of the marking point A, that is, the position data P1 is the clear focal plane position of the camera.
[0010] Step 2: Move the laser module to the measurement area of the marking point A, use the laser module to measure the position of the marking point A, and make the laser data display as 0. The calculation module obtains the position data P2 of the marking point A.
[0011] Step 3: There is a relative displacement vector between the position data P1 recorded when the camera is clearly focused and the position data P2 recorded when the laser module measures the mark point A. The calculation module subtracts the position data P2 from the position data P1 to obtain the current relative displacement vector between the position data P1 recorded when the camera is clearly focused and the position data P2 recorded when the laser module measures the mark point A, that is, the relative displacement vector = P2-P1. The camera and the laser module are synchronized according to the current relative displacement vector, so that the laser module and the camera at the current position are consistent with the data measured by the mark point in the same space. By moving the current position to synchronize with the laser, using the laser for measurement, and obtaining the height error value between the current position and the clear surface, the machine can be controlled to achieve accurate automatic adjustment of the Z-axis height.
[0012] Step 4: During actual measurement, the measuring point of the measured workpiece is measured by the laser module. According to the measurement data measured by the laser module, based on the position data P1 of step 1 and the relative displacement vector calculated in step 3, the camera is adjusted to a clear focal position of the measured workpiece, and the measured workpiece is measured using the camera.
[0013] Embodiment 1: A method for fast and accurate focusing of a laser-assisted camera comprises the following steps: 1: First, place a standard workpiece for synchronization between the camera and laser module in the effective area of image measurement as a reference point.
[0014] 2: Move the image near the reference point, use fast focus to get a clear surface, measure the reference point, get the position of the point, and move to the position of the point.
[0015] 3: Open the Synchronize Device dialog box and record the position of the point.
[0016] 4: Manually control the laser and move the laser to the reference point. When the laser obtains data, double-click the Laser Data Reset button in the Synchronize Device dialog box to allow the laser control machine to automatically adjust the height.
[0017] 5: Record the point position in the Synchronize Device dialog box.
[0018] 6: Click Calculate to get the vector value of camera and laser synchronization.
[0019] 7: Save.
[0020] 8: Verification: Move the image to the top of the reference point. The image does not need to be clear, but must be within the measurable range of the laser (i.e. the X and Y positions remain unchanged, but the Z position changes).
[0021] 9: Right-click the mouse to pop up a dialog box, select laser focus, the machine will automatically run, get the clear position of the current point through the laser, and then control the machine to move to the clear position of the camera at the current point. You can focus on the point position multiple times. Check whether the data is the same to verify whether the result is correct.
[0022] The design focus of the present invention is that by adopting the method of the present invention, the position close to the clearest image can be found quickly and accurately, and the measured object can be measured at this clear position, so that the repeatability and accuracy of the measurement can be achieved, and the problem of unstable, inaccurate and poor repeatability of the measurement data caused by the unsatisfactory focus position due to poor imaging effect on the surface of some workpieces is eliminated. The specific position is measured by laser to quickly synchronize to the clear image position. In the case that the image cannot be accurate and repeatable, the measurement of the workpiece is achieved more accurately and repeatedly.
[0023] The above description is only a preferred embodiment of the present invention and does not limit the technical scope of the present invention. Therefore, any slight modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A method for fast and accurate focusing of a laser-assisted camera, characterized in that: The following steps are involved: Step 1: Place a standard workpiece for synchronization of the camera and the laser module in the effective area of image measurement, set a mark point A on the standard workpiece, move the camera to the measurement area of the mark point A, use the fast focus function of the camera to obtain a clear focal plane and measure, and the calculation module obtains the position data P1 of the mark point A, that is, the position data P1 is the clear focal plane position of the camera; Step 2, move the laser module to the measurement area of the marking point A, use the laser module to measure the position of the marking point A, and make the laser data display as 0, and the calculation module obtains the position data P2 of the marking point A; Step 3: There is a relative displacement vector between the position data P1 recorded when the camera is in clear focus and the position data P2 recorded when the laser module measures the mark point A. The calculation module subtracts the position data P2 from the position data P1 to obtain the current relative displacement vector between the position data P1 recorded when the camera is in clear focus and the position data P2 recorded when the laser module measures the mark point A, that is, the relative displacement vector = P2-P1. The camera and the laser module are synchronized according to the current relative displacement vector, so that the data measured by the laser module and the camera at the current position and the mark point in the same space are consistent. Step 4: During actual measurement, the measuring point of the measured workpiece is measured by the laser module. According to the measurement data measured by the laser module, based on the position data P1 of step 1 and the relative displacement vector calculated in step 3, the camera is adjusted to a clear focal position of the measured workpiece, and the measured workpiece is measured using the camera.
Citation Information
Patent Citations
Laser-assisted focusing method and shooting device
CN105204269A
Surveying device with function for calibrating focusing optical unit positions to be set in a distance-dependent manner
CN105424005A
Test method and test device for laser ranging and mobile terminal
CN110196422A
Hardmeter camera focusing measurement method and device
CN113720264A
Automatic focusing error calibration implementation method
CN114727095A
