A method for fast and accurate focusing of a laser-assisted camera
By calculating the relative displacement vectors of the camera and the laser module in the monocular line laser three-dimensional vision sensor, fast and accurate focusing of the laser assisted camera is achieved, solving the measurement accuracy problem of unfixed positions of the laser emitter and camera, and improving the repetition and accuracy of the measurement.
Patent Information
- Application Number
- CN202411575794.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-08-15
- 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 unstable measurement accuracy and inability to achieve fast and accurate focus.
By placing standard workpieces in the image measurement area, using the camera and laser module to measure the position data of the marking points, calculate the relative displacement vector, synchronize the camera and the laser module, so that the measurement data in the same space are consistent, and adjust the clear focal plane position from the camera to the workpiece.
The repetition and accuracy of the measurement are achieved, eliminating the problem of unsatisfactory focus position due to poor imaging effects on the workpiece surface, and ensuring the stability and accuracy of the measurement data.
Smart Images

Figure CN119179163B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to measurement technology, and in particular to a method for fast and accurate focusing of a camera using a laser as an auxiliary tool. Background Art
[0002] Monocular line laser 3D vision sensors primarily consist of a line laser transmitter and a single industrial camera. Due to their simple structure, low cost, short measurement time, and robustness, they are widely used in industrial applications such as weld seam tracking systems, weld quality inspection systems, body-in-white (BIW) quality inspection systems, BIW gap and flushness measurement, and reverse engineering. The calibration accuracy of monocular line laser 3D vision sensors directly impacts their measurement accuracy. However, the position of a clear surface captured by an industrial camera during autofocus is not fixed, resulting in variations between measurements, leading to errors in the measured values.
[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.
[0004] In this optical imaging system, laser emitter 1 is tilted at a predetermined angle α, which is factory-set and known. However, if laser emitter 1 is later installed by the user on the camera side and used together with camera 3 to measure spatial data of object 2, the user's position is not fixed, and the relative position of laser emitter 1 and camera 3 cannot be determined in advance. This requires positioning laser emitter 1 during measurement, which is inconvenient. Therefore, it is necessary to develop a solution to this problem. Summary of the Invention
[0005] In view of this, the present invention addresses the deficiencies in the prior art, and its main purpose is to provide a method for quickly and accurately focusing a camera using a laser to assist in focusing. The method can solve the problem that the relative positions of the laser emitter and the camera are not fixed, making it impossible to use the laser emitter to quickly and accurately focus the camera.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] A method for rapidly and accurately focusing a camera using a laser-assisted method comprises the following steps:
[0008] Step 1: Place a standard workpiece for synchronization between the camera and 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 mark point A. Use the camera's fast focus function to obtain a clear focal plane and measure it. The calculation module obtains the position data P1 of mark point A, that is, the position data P1 is the clear focal plane position of the camera.
[0009] Step 2: Move the laser module to the measurement area of mark point A, use the laser module to measure the position of mark point A, and make the laser data displayed as 0. The calculation module obtains the position data P2 of mark point A;
[0010] Step 3: There is a relative displacement vector between the position data P1 recorded by the camera when the marker point A is in clear focus and the position data P2 recorded by the laser module when the marker point A is measured. 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 by the camera when the marker point A is in clear focus and the position data P2 recorded by the laser module when the marker point A is measured, that is, the relative displacement vector = P2-P1. The camera and the laser module are synchronized based on the current relative displacement vector, so that the data measured by the laser module and camera at the current position are consistent with the data measured by the marker point in the same space.
[0011] 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, the position data P1 in 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.
[0012] 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:
[0013] 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 with 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
[0014] Figure 1 This is a schematic diagram of the structure of an existing optical imaging system;
[0015] Figure 2 In a preferred embodiment of the present invention, a standard part in the image is selected for focusing;
[0016] Figure 3 In the preferred embodiment of the present invention, the laser focuses on the standard part selected in the image;
[0017] Figure 4 It is calculated Figure 2 Location and Figure 3 The space vector difference of the position.
[0018] Description of the accompanying drawings:
[0019] 1. Laser emitter 2. Object to be measured
[0020] 3. Camera. DETAILED DESCRIPTION
[0021] The present invention discloses a method for fast and accurate focusing of a camera using laser assistance, comprising the following steps:
[0022] Step 1: Place a standard workpiece for synchronization of the camera and 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 camera's fast focus function to obtain a clear focal plane and measure it, 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.
[0023] Step 2: Move the laser module to the measurement area of mark point A, use the laser module to measure the position of mark point A, and make the laser data display as 0. The calculation module obtains the position data P2 of mark point A.
[0024] Step 3: A relative displacement vector exists between the position data P1 recorded by the camera when the camera is in focus and the position data P2 recorded by the laser module when measuring point A. The calculation module subtracts position data P2 from position data P1 to obtain the current relative displacement vector between position data P1 recorded by the camera when the camera is in focus and position data P2 recorded by the laser module when measuring point A. This relative displacement vector is P2-P1. The camera and laser module are synchronized based on this current relative displacement vector, ensuring that the data measured by the laser module and camera at the current position is consistent with the data measured by the marker in the same space. By synchronizing the current position with the laser and using the laser to measure, the height error between the current position and the clear surface is obtained, which can be used to control the machine to achieve precise and automatic adjustment of the Z-axis height.
[0025] 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, the position data P1 in 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.
[0026] Example 1:
[0027] A method for rapidly and accurately focusing a camera using a laser-assisted method comprises the following steps:
[0028] 1: First, place a standard workpiece for synchronization of the camera and laser module in the effective area of image measurement as a reference point.
[0029] 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.
[0030] 3: Open the synchronization device dialog box and record the position of the point.
[0031] 4: Manually control the laser and move it 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.
[0032] 5: Record the position of this point in the Synchronize Device dialog box.
[0033] 6: Click Calculate to get the vector value of camera and laser synchronization.
[0034] 7: Save.
[0035] 8: Verify, move the image to the top of the reference point. The image does not need to be clear, but must be within the laser's measurable range (i.e., the X and Y positions remain unchanged, but the Z position changes).
[0036] 9: Right-click the mouse to open the dialog box and select Laser Focus. The machine will automatically run, use the laser to obtain the clear position of the current point, and then control the machine to move to the clear position of the camera at the current point. You can focus on the same point multiple times. Check whether the data is the same to verify whether the result is correct.
[0037] 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, which can achieve measurement repeatability and accuracy, eliminating the problem of unsatisfactory focus position due to poor imaging effect on the surface of some workpieces, which makes the measurement data unstable, inaccurate and repeatable. The specific position is measured by laser to quickly synchronize with 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.
[0038] The above description is merely a preferred embodiment of the present invention and does not limit the technical scope of the present invention. Therefore, any minor 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 rapid and accurate focusing of a camera using laser assistance, characterized by: This method is suitable for scenarios where the user later installs the laser module on the camera side and uses it to measure the spatial data of the object being measured. Since the relative position of the laser module and the camera cannot be obtained in advance, the laser module needs to be positioned during measurement. The following steps are included: Step 1: Place a standard workpiece for synchronization between the camera and 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 mark point A. Use the camera's fast focus function to obtain a clear focal plane and measure it. The calculation module obtains the position data P1 of 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 mark point A and use the laser module to measure the position of mark point A. When the laser module obtains data and clears the laser data, the calculation module obtains the position data P2 of mark point A. Step 3: There is a relative displacement vector between the position data P1 recorded by the camera when the marker point A is in clear focus and the position data P2 recorded by the laser module when the marker point A is measured. 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 by the camera when the marker point A is in clear focus and the position data P2 recorded by the laser module when the marker point A is measured, that is, the relative displacement vector = P2-P1. The camera and the laser module are synchronized based on the current relative displacement vector, so that the data measured by the laser module and the camera at the current position for the marker 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, the position data P1 in 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
Surveying device with function for calibrating focusing optical unit positions to be set in a distance-dependent manner
CN105424005A