Scanning control method, scanning control device, scanning control system and storage medium
By using dual-light source projection module and multiple calibration technology in three-dimensional scanning equipment, the problem of long-wavelength light is easily affected by environmental interference, and the accuracy of three-dimensional reconstruction is improved.
Patent Information
- Application Number
- CN202510045103.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2045-01-10
AI Technical Summary
Long-wavelength light is susceptible to natural environment interference, affecting the accuracy of three-dimensional reconstruction.
By using a dual light source projection module in the three-dimensional scanning device, the first and second light rays are projected, and the image acquisition component is calibrated twice based on the acquired first calibration image and the second calibration image to determine its internal parameter matrix and distortion based on the acquired first calibration image and the second calibration image. parameter.
The calibration accuracy of the image acquisition component under long wavelength light conditions is improved, and the three-dimensional reconstruction accuracy of the three-dimensional scanning equipment is ensured.
Smart Images

Figure CN119496857A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of three-dimensional scanning technology, and in particular to a scanning control method, a scanning control device, a scanning control system and a computer-readable storage medium. Background Art
[0002] 3D scanning equipment is a device that can capture the shape and appearance of objects or scenes in the real world and reconstruct them into digital 3D models. It has a wide range of applications in many fields, such as manufacturing, architecture, medical treatment, cultural heritage protection, and animation production. At present, for 3D scanning equipment that uses long-wavelength light (such as infrared laser, etc.) for scanning, the long-wavelength light is easily disturbed by the natural environment, which has an adverse effect on 3D reconstruction. Summary of the invention
[0003] The embodiments of the present application provide a scanning control method, a scanning control device, a scanning control system and a computer-readable storage medium to solve at least one of the above-mentioned technical problems.
[0004] The scanning control method of the embodiment of the present application is applied to a three-dimensional scanning device, wherein the three-dimensional scanning device includes an image acquisition component and a light source projection module, wherein the light source projection module is used to project a first light and a second light, wherein the wavelength of the first light is smaller than the wavelength of the second light, and the scanning control method includes: Acquire a first calibration image corresponding to the first light based on the light source projection module and the image acquisition component; Acquire a second calibration image corresponding to the second light based on the light source projection module and the image acquisition component; Performing a first calibration on the image acquisition component based on the first calibration image to determine a first intrinsic parameter matrix and a first distortion parameter of the image acquisition component; A second calibration is performed on the image acquisition component based on the first intrinsic parameter matrix, the first distortion parameter and the second calibration image to determine a second intrinsic parameter matrix and a second distortion parameter of the image acquisition component.
[0005] In some embodiments, the step of acquiring a first calibration image corresponding to the first light based on the light source projection module and the image acquisition component includes: Controlling the light source projection module to project the first light to a first calibration plate located at a first predetermined distance; The image acquisition component is used to acquire an image of the first calibration plate to obtain the first calibration image.
[0006] In some embodiments, the step of acquiring a second calibration image corresponding to the second light based on the light source projection module and the image acquisition component includes: Controlling the light source projection module to project the second light to a second calibration plate located at a second predetermined distance; Capturing the image of the second calibration plate by the image acquisition component to obtain the second calibration image; Wherein, the second predetermined distance is greater than the first predetermined distance.
[0007] In some embodiments, performing a second calibration on the image acquisition component based on the first intrinsic parameter matrix, the first distortion parameter, and the second calibration image to determine a second intrinsic parameter matrix and a second distortion parameter of the image acquisition component includes: Calculating an iterative intrinsic parameter matrix according to the first intrinsic parameter matrix, the first distortion parameter and the second calibration image; Calculating iterative distortion parameters according to the iterative intrinsic parameter matrix and the second calibration image; The iterative internal parameter matrix and the iterative distortion parameter are iteratively calculated to obtain a second internal parameter matrix and a second distortion parameter.
[0008] In some implementations, the iteratively calculating the iterative internal parameter matrix and the iterative distortion parameter to obtain a second internal parameter matrix and a second distortion parameter includes: Iteratively updating the iterative intrinsic parameter matrix according to the iterative distortion parameter, the first intrinsic parameter matrix and the second calibration image; Iteratively updating the iterative distortion parameters according to the iterative intrinsic parameter matrix and the second calibration image, and returning to the step of iteratively updating the iterative intrinsic parameter matrix according to the iterative distortion parameters, the first intrinsic parameter matrix and the second calibration image; When a preset condition is reached, stopping the iterative update of the iterative internal parameter matrix and the iterative distortion parameter; A second internal parameter matrix is determined according to the iterative internal parameter matrix of the last iteration, and a second distortion parameter is determined according to the iterative distortion parameter of the last iteration.
[0009] In some embodiments, the scanning control method further includes: Scanning a first object to be scanned located at a first scanning distance based on the light source projection module and the image acquisition component after the first calibration, and detecting a target area corresponding to the first object to be scanned in each frame of the image; Scanning a second object to be scanned located at a second scanning distance based on the light source projection module and the image acquisition component after the second calibration, and detecting a target area corresponding to the second object to be scanned in each frame of the image; Wherein, the second scanning distance is greater than the first scanning distance.
[0010] In some embodiments, the image acquisition component includes an image sensor, and the scanning control method further includes: In the process of scanning the first object to be scanned at the first scanning distance based on the light source projection module and the image acquisition component after the first calibration, and detecting the target area corresponding to the first object to be scanned in each frame of the image, the brightness of the first light projected by the light source projection module is controlled to be the first brightness, and the photosensitivity time of the image sensor is controlled to be the first photosensitivity time; In the process of scanning the second object to be scanned at the second scanning distance based on the light source projection module and the image acquisition component after the second calibration, and detecting the target area corresponding to the second object to be scanned in each frame of the image, the brightness of the second light projected by the light source projection module is controlled to be the second brightness, and the photosensitivity time of the image sensor is controlled to be the second photosensitivity time; Among them, the second brightness is greater than the first brightness, and the second photosensitivity time is shorter than the first photosensitivity time.
[0011] In some embodiments, scanning the second object to be scanned located at the second scanning distance based on the light source projection module and the image acquisition component after the second calibration, and detecting the target area corresponding to the second object to be scanned in each frame of the image, includes: Controlling the light source projection module to project the second light to the second object to be scanned at the second scanning distance; Capturing images of the second object to be scanned by the image acquisition component after the second calibration to obtain a plurality of frames of images to be processed; The target area is extracted and matched on multiple frames of the to-be-processed images to obtain the target area corresponding to the second to-be-scanned object.
[0012] In some embodiments, the step of extracting and matching the target area on the plurality of frames of the images to be processed to obtain the target area corresponding to the second object to be scanned includes: Setting a first mask area according to the target area extracted and matched in the image to be processed in the previous frame; Determining a second mask area of the image to be processed in the current frame according to the first mask area; Setting a judgment threshold of the image to be processed in the current frame according to the second mask area; The target area is extracted and matched for the image to be processed in the current frame according to the judgment threshold to obtain the target area corresponding to the second object to be scanned.
[0013] In some embodiments, determining a second mask area of the image to be processed in the current frame according to the first mask area includes: Determining a diffusion ratio of the first mask area according to an acquisition frame rate of the image acquisition component; Performing diffusion processing on the first mask area according to the diffusion ratio to obtain a diffusion area; According to the diffusion area, the second mask area is determined in the image to be processed in the current frame.
[0014] In some implementations, setting a judgment threshold of the image to be processed in the current frame according to the second mask area includes: For an area corresponding to the second mask area in the image to be processed in the current frame, setting the judgment threshold to a first judgment threshold; For an area outside the second mask area in the image to be processed in the current frame, setting the judgment threshold to a second judgment threshold; The second judgment threshold is greater than the first judgment threshold.
[0015] The scanning control device of the embodiment of the present application is applied to a three-dimensional scanning device, wherein the three-dimensional scanning device includes an image acquisition component and a light source projection module, wherein the light source projection module is used to project a first light and a second light, wherein the wavelength of the first light is smaller than the wavelength of the second light, and the scanning control device includes: A first acquisition module, used for acquiring a first calibration image corresponding to the first light based on the light source projection module and the image acquisition component; A second acquisition module, used for acquiring a second calibration image corresponding to the second light based on the light source projection module and the image acquisition component; A first calibration module, configured to perform a first calibration on the image acquisition component based on the first calibration image, and determine a first intrinsic parameter matrix and a first distortion parameter of the image acquisition component; A second calibration module is used to perform a second calibration on the image acquisition component based on the first intrinsic parameter matrix, the first distortion parameter and the second calibration image to determine a second intrinsic parameter matrix and a second distortion parameter of the image acquisition component.
[0016] The scanning control system of the embodiment of the present application includes one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the scanning control method of any of the above embodiments is implemented.
[0017] The computer-readable storage medium of the embodiment of the present application stores a computer program thereon, and when the program is executed by a processor, the scanning control method of any of the above-mentioned embodiments is implemented.
[0018] In the scanning control method, scanning control device, scanning control system and computer-readable storage medium of the embodiment of the present application, the image acquisition component is first calibrated based on the first calibration image to obtain a first internal parameter matrix and a first distortion parameter with high accuracy, and then the image acquisition component is second calibrated with reference to the first internal parameter matrix and the first distortion parameter to determine the second internal parameter matrix and the second distortion parameter corresponding to the image acquisition component and the second light. In this way, the calibration accuracy of the image acquisition component under long-wavelength light conditions is improved, and the three-dimensional reconstruction accuracy of the three-dimensional scanning device is guaranteed.
[0019] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which: Figure 1 is a flowchart of a scanning control method of certain embodiments of the present application; Figure 2 is a schematic diagram of a module of a three-dimensional scanning device according to certain embodiments of the present application; Figure 3 is a schematic diagram of a module of an image acquisition component of certain embodiments of the present application; Figure 4 is a flowchart of a scanning control method of certain embodiments of the present application; Figure 5 is a flowchart of a scanning control method of certain embodiments of the present application; Figure 6 is a flowchart of a scanning control method of certain embodiments of the present application; Figure 7 is a flowchart of a scanning control method of certain embodiments of the present application; Figure 8 is a flowchart of a scanning control method of certain embodiments of the present application; Fig. 9 is a flowchart of a scanning control method of certain embodiments of the present application; Fig.10 is a flowchart of a scanning control method of certain embodiments of the present application; Fig.11 is a flowchart of a scanning control method of certain embodiments of the present application; Fig.12 is a flowchart of a scanning control method of certain embodiments of the present application; Fig.13 is a flowchart of a scanning control method of certain embodiments of the present application; Fig.14 is a schematic diagram of a module of a scanning control device according to some embodiments of the present application; Fig.15 is a schematic diagram of a module of a scanning control device according to some embodiments of the present application; Fig.16 is a module schematic diagram of a scanning control system of certain embodiments of the present application; Fig.17 It is a schematic diagram of the connection status between a computer-readable storage medium and a processor in certain embodiments of the present application. DETAILED DESCRIPTION
[0021] The following is a further description of the embodiments of the present application in conjunction with the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements or elements with the same or similar functions from beginning to end. In addition, the embodiments of the present application described below in conjunction with the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the present application.
[0022] See also Figures 1 to 3 The embodiment of the present application provides a scanning control method, which is applied to a three-dimensional scanning device 100. The three-dimensional scanning device 100 includes an image acquisition component 10 and a light source projection module 20. The light source projection module 20 is used to project a first light and a second light, and the wavelength of the first light is smaller than the wavelength of the second light. The scanning control method includes: 010: Acquire a first calibration image corresponding to the first light based on the light source projection module 20 and the image acquisition component 10; 020: Acquire a second calibration image corresponding to the second light based on the light source projection module 20 and the image acquisition component 10; 030: Performing a first calibration on the image acquisition component 10 based on the first calibration image to determine a first intrinsic parameter matrix and a first distortion parameter of the image acquisition component 10; 040: Perform a second calibration on the image acquisition component 10 based on the first intrinsic parameter matrix, the first distortion parameter and the second calibration image to determine the second intrinsic parameter matrix and the second distortion parameter of the image acquisition component 10.
[0023] In the scanning control method of the embodiment of the present application, the image acquisition component 10 is first calibrated based on the first calibration image to obtain a first internal parameter matrix and a first distortion parameter with high accuracy, and then the image acquisition component 10 is second calibrated with reference to the first internal parameter matrix and the first distortion parameter to determine the second internal parameter matrix and the second distortion parameter corresponding to the image acquisition component 10 and the second light. In this way, the calibration accuracy of the image acquisition component 10 under long-wavelength light conditions is improved, and the three-dimensional reconstruction accuracy of the three-dimensional scanning device 100 is guaranteed.
[0024] Specifically, the image acquisition component 10 includes a lens 11. The calibration of the image acquisition component 10 is the calibration of the lens 11. The image acquisition component 10 is used to acquire images. The three-dimensional scanning device 100 may include one or more image acquisition components 10. For example, when the three-dimensional scanning device 100 performs ranging based on the time of flight (TOF) method, the three-dimensional scanning device 100 may include one image acquisition component 10; when the three-dimensional scanning device 100 performs ranging based on the triangulation method, the three-dimensional scanning device 100 may include two image acquisition components 10.
[0025] The light source projection module 20 is used to project the first light and the second light. The light source projection module 20 may include only one projection unit for projecting the first light and the second light. Alternatively, the light source projection module 20 may include a first projection unit and a second projection unit, the first projection unit being used to project the first light and the second projection unit being used to project the second light.
[0026] The first light and the second light can be lasers or any other light that can be used for three-dimensional scanning. The wavelength of the first light is smaller than the wavelength of the second light. In one example, the first light is a blue laser or a laser with a wavelength smaller than blue light, and the second light is a red laser or a laser with a wavelength larger than red light. The embodiments of the present application are described by taking the first light being a blue laser and the second light being an infrared laser as an example.
[0027] A first calibration image corresponding to the first light and a second calibration image corresponding to the second light are obtained based on the light source projection module 20 and the image acquisition component 10. Based on the first calibration image, the image acquisition component 10 is first calibrated using any calibration algorithm to determine the first intrinsic parameter matrix and the first distortion parameter of the image acquisition component 10 corresponding to the first light. The calibration algorithm is, for example, the Zhang Zhengyou calibration method.
[0028] Afterwards, based on the first intrinsic parameter matrix, the first distortion parameter and the second calibration image, the image acquisition component 10 may be subjected to a second calibration to determine the second intrinsic parameter matrix and the second distortion parameter of the image acquisition component 10 corresponding to the second light.
[0029] The internal parameter matrix is shown as follows:
[0030] in, , , , is the internal parameter that needs to be solved.
[0031] For distortion parameters, any form of expression may be used. For example, in the open source computer vision library (OpenCV), distortion parameters include k1, k2, k3, p1, and p2, where k1, k2, and k3 are radial distortion parameters, and p1 and p2 are tangential distortion parameters. Alternatively, in other forms of expression, distortion parameters include k1, k2, k3, k4, k5, k6, p1, p2, b1, and b2, where k4, k5, and k6 are higher-order radial distortion parameters, and b1 and b2 are thin prism distortion coefficients.
[0032] It should be noted that when the three-dimensional scanning device 100 includes one image acquisition component 10, after the first calibration and the second calibration are performed on the image acquisition component 10, the three-dimensional scanning device 100 can perform subsequent scanning and three-dimensional reconstruction operations. When the three-dimensional scanning device 100 includes two image acquisition components 10, it is necessary to perform the first calibration and the second calibration on each image acquisition component 10, and after the two image acquisition components 10 are calibrated, the two image acquisition components 10 are binocularly calibrated to obtain the external parameter matrix, baseline distance and other parameters between the two image acquisition components 10, and then perform subsequent scanning and three-dimensional reconstruction operations.
[0033] It can be understood that for the three-dimensional reconstruction algorithm, accurate calibration of the image acquisition component 10 is a prerequisite for high-precision reconstruction. Studies have found that compared with short-wavelength light, long-wavelength light has less concentrated energy and is more easily disturbed by the natural environment; the second calibration image corresponding to the second light has greater noise than the first calibration image corresponding to the second light. If the image acquisition component 10 is calibrated directly based on the second calibration image, the second intrinsic parameter matrix and the second distortion parameter obtained are less accurate.
[0034] In the embodiment of the present application, the image acquisition component 10 is first calibrated based on the first calibration image to obtain a first internal parameter matrix and a first distortion parameter with high accuracy, and then the image acquisition component 10 is second calibrated based on the first internal parameter matrix, the first distortion parameter and the second calibration image, that is, the second calibration result of the image acquisition component 10 corresponding to the second light is calculated with reference to the first calibration result of the image acquisition component 10. In this way, an accurate second internal parameter matrix and a second distortion parameter can be calculated, thereby ensuring the three-dimensional reconstruction accuracy of the three-dimensional scanning device 100.
[0035] See also Figure 2 and Figure 4 In some embodiments, obtaining a first calibration image (ie, 010) corresponding to the first light based on the light source projection module 20 and the image acquisition component 10 includes: 011: Control the light source projection module 20 to project a first light beam to a first calibration plate located at a first predetermined distance; 012: Capture an image of the first calibration plate through the image acquisition component 10 to obtain a first calibration image.
[0036] Specifically, the first calibration plate can be any calibration plate, which is not limited here. For example, the first calibration plate can be a checkerboard calibration plate, a circular grid calibration plate, etc. The distance between the first calibration plate and the image acquisition component 10 is a first predetermined distance. In an example, the first predetermined distance is less than 400 mm. The first predetermined distance can be 100 mm, 150 mm, 200 mm, 250 mm, 300 mm, or any value less than 400 mm. The first predetermined distance can be specifically determined according to the wavelength of the first light to ensure the clarity of the first calibration image.
[0037] The light source projection module 20 is controlled to project a first light beam to a first calibration plate located at a first predetermined distance, and the image acquisition component 10 is used to acquire an image of the first calibration plate, so as to obtain a first calibration image. There are multiple first calibration images. Based on the multiple first calibration images, the image acquisition component 10 is first calibrated using any calibration algorithm, and a first intrinsic parameter matrix and a first distortion parameter of the image acquisition component 10 can be determined.
[0038] It can be understood that the acquisition distance of the first calibration image is relatively short, the first calibration plate has relatively small noise in the first calibration image, has relatively good repeatability, has relatively high calibration accuracy, and the first intrinsic parameter matrix and the first distortion parameter obtained by calibration have relatively high accuracy.
[0039] See also Figure 2 and Figure 5 In some embodiments, obtaining a second calibration image (ie, 020) corresponding to the second light based on the light source projection module 20 and the image acquisition component 10 includes: 021: Control the light source projection module 20 to project a second light beam to a second calibration plate located at a second predetermined distance; 022: Capturing an image of the second calibration plate through the image acquisition component 10 to obtain a second calibration image; The second predetermined distance is greater than the first predetermined distance.
[0040] Specifically, the second calibration plate can adopt any calibration plate, which is not limited here. For example, the first calibration plate can adopt a checkerboard calibration plate, a circular grid calibration plate, etc. The first calibration plate can be the same as the first calibration plate or different. The distance between the second calibration plate and the image acquisition component 10 is a second predetermined distance, and the second predetermined distance is greater than the first predetermined distance. In an example, the second predetermined distance is greater than 600mm, and the second predetermined distance can be 650mm, 700mm, 750mm, 800mm or any value greater than 600mm. The second predetermined distance can be specifically determined according to the wavelength of the second light to ensure the clarity of the second calibration image.
[0041] The light source projection module 20 is controlled to project the second light to the second calibration plate at the second predetermined distance, and the image acquisition component 10 is used to acquire the image of the second calibration plate to obtain a second calibration image. There are multiple second calibration images.
[0042] It should be noted that the wavelength of the first light is greater than that of the second light. For the same image acquisition component 10, the longer the wavelength, the farther the focus. The first light is more suitable for scanning conditions at a shorter distance, and the second light is more suitable for scanning conditions at a longer distance.
[0043] It can be understood that the calibration of the image acquisition component 10 should coincide with the distance range during actual use to ensure that the image acquisition component 10 accurately captures and records image information within a certain distance range. In other words, when the image acquisition component 10 scans under the first light condition, it is necessary to perform a short-distance calibration, and when the image acquisition component 10 scans under the second light condition, it is necessary to perform a long-distance calibration. The above-mentioned first calibration is also a short-distance calibration, and the second calibration is also a long-distance calibration.
[0044] Therefore, the image acquisition component 10 and the light source projection module 20 are used to acquire an image of the first calibration plate at the first predetermined distance, and the image acquisition component 10 and the light source projection module 20 are used to acquire an image of the second calibration plate at the second predetermined distance, and the second predetermined distance is greater than the first predetermined distance. The value range of the first predetermined distance is also the range of short-distance calibration, and the value range of the second predetermined distance is also the range of long-distance calibration.
[0045] See also Figure 2 and Figure 6In some embodiments, performing a second calibration on the image acquisition component 10 based on the first intrinsic parameter matrix, the first distortion parameter, and the second calibration image to determine the second intrinsic parameter matrix and the second distortion parameter (ie, 040) of the image acquisition component 10 includes: 041: Calculate an iterative intrinsic parameter matrix according to the first intrinsic parameter matrix, the first distortion parameter and the second calibration image; 042: Calculate iterative distortion parameters according to the iterative intrinsic parameter matrix and the second calibration image; 043: Iteratively calculate the iterative internal parameter matrix and the iterative distortion parameter to obtain a second internal parameter matrix and a second distortion parameter.
[0046] Specifically, when the image acquisition component 10 performs the second calibration, it acquires an image of the second calibration plate located at the second predetermined distance to obtain a second calibration image. At this time, the second calibration plate has a large noise in the second calibration image, and the multiple second calibration images acquired have poor repeatability, that is, the same second calibration plate has different features in the multiple second calibration images, resulting in poor calibration accuracy.
[0047] Therefore, the second calibration of the image acquisition component 10 is performed based on the first calibration result of the image acquisition component 10. , , , Indicates the internal parameters to be solved in the first internal parameter matrix, , , , represents the internal parameters to be solved in the second internal parameter matrix. Since the first calibration and the second calibration are both performed on the same lens 11 of the same image acquisition component 10, the internal parameters in the first internal parameter matrix are , and the internal parameters in the second internal parameter matrix , Satisfies the following relationship:
[0048] When calculating the second intrinsic parameter matrix and the second distortion parameter, the first distortion parameter is used as the initial value of the second distortion parameter, and the second intrinsic parameter matrix is calculated based on the first distortion parameter and the second calibration image. , The proportional constraint internal parameter , , so that the calculated internal parameter , satisfy , calculate the internal reference , , , The corresponding iterative internal parameter matrix can be determined. At this time, the iterative internal parameter matrix has a large error, and it is necessary to iterate to determine the second internal parameter matrix.
[0049] After determining the iterative intrinsic parameter matrix, the iterative distortion parameters are calculated based on the iterative intrinsic parameter matrix and the second calibration image. At this time, the iterative distortion parameters also have large errors, and iteration is also required to determine the second distortion parameters. The iterative intrinsic parameter matrix and the iterative distortion parameters are iteratively calculated to obtain the second intrinsic parameter matrix and the second distortion parameters. Compared with directly calculating the second intrinsic parameter matrix and the second distortion parameters based on the second calibration image, a more accurate second intrinsic parameter matrix and the second distortion parameters can be calculated through the guidance and constraints of the first intrinsic parameter matrix and the first distortion parameters.
[0050] In the related art, the calibration plate is imaged at close range by the lens 11 under the long wavelength laser to obtain a calibration image, and the close range calibration is performed. The intrinsic parameter matrix and distortion parameters obtained by the close range calibration are used as the constraints and initial values for the long range calibration when the lens 11 is combined with the long wavelength laser. Since the image acquisition component 10 focuses far away, the calibration image obtained by close range acquisition is relatively blurred, and the close range calibration accuracy is poor, resulting in poor long range calibration accuracy.
[0051] In the embodiment of the present application, the image acquisition component 10 and the light source projection module 20 are used to acquire an image of the first calibration plate at a first predetermined distance to obtain a first calibration image with high precision, and the first calibration is performed to obtain a first internal parameter matrix and a first distortion parameter with high precision, and then the second calibration of the image acquisition component 10 is performed based on the first internal parameter matrix and the first distortion parameter to guide and constrain the calculation process of the second internal parameter matrix and the second distortion parameter. In this way, the second internal parameter matrix and the second distortion parameter can be stably calculated to obtain the second internal parameter matrix and the second distortion parameter, thereby improving the second calibration accuracy of the image acquisition component 10.
[0052] See also Figure 2 and Figure 7 In some implementations, iterative calculations are performed on the iterative internal parameter matrix and the iterative distortion parameter to obtain a second internal parameter matrix and a second distortion parameter (ie, 043), including: 0431: Iteratively update the iterative internal parameter matrix according to the iterative distortion parameter, the first internal parameter matrix and the second calibration image; 0432: iteratively updating the iterative distortion parameters according to the iterative intrinsic parameter matrix and the second calibration image, and returning to the step of iteratively updating the iterative intrinsic parameter matrix according to the iterative distortion parameters, the first intrinsic parameter matrix and the second calibration image; 0433: When the preset conditions are met, the iterative update of the iterative internal parameter matrix and iterative distortion parameters is stopped; 0434: Determine a second internal parameter matrix according to the iterative internal parameter matrix of the last iteration, and determine a second distortion parameter according to the iterative distortion parameter of the last iteration.
[0053] Specifically, after determining the iterative distortion parameters, calculation is performed based on the iterative distortion parameters and the second calibration image. , The ratio constraint of the second internal parameter matrix , , obtain a new iterative internal parameter matrix, and replace the previously calculated iterative parameter matrix with the new iterative parameter matrix.
[0054] Afterwards, based on the latest iterative intrinsic parameter matrix and the second calibration image, new iterative distortion parameters are calculated, and the iterative distortion parameters calculated previously are replaced by the new iterative distortion parameters; then the step of iteratively updating the iterative intrinsic parameter matrix according to the iterative distortion parameters, the first intrinsic parameter matrix and the second calibration image is returned, and the iterative intrinsic parameter matrix and the iterative distortion parameters are continuously iteratively updated until the preset conditions are met.
[0055] The preset condition is that the errors of the iterative intrinsic parameter matrix and the iterative distortion parameters converge. The specific conditions can be determined according to the calibration method used. For example, in some calibration methods, the reprojection error is calculated, so the convergence of the reprojection error can be used as a preset condition. The reprojection error refers to the difference between the 3D world coordinates when projected onto the image plane through the camera model (including the intrinsic parameter matrix and distortion parameters) and the actual observed pixel coordinates.
[0056] When the preset conditions are met, the iterative update of the iterative internal parameter matrix and the iterative distortion parameter is stopped, and the iterative internal parameter matrix of the last iteration is used as the second internal parameter matrix, and the iterative distortion parameter of the last iteration is used as the second distortion parameter. In this way, the accurate second internal parameter matrix and the second distortion parameter are stably calculated.
[0057] See also Figure 2 and Figure 8 In some embodiments, the scanning control method further includes: 050: Scanning a first object to be scanned located at a first scanning distance based on the light source projection module 20 and the image acquisition component 10 after the first calibration, and detecting a target area corresponding to the first object to be scanned in each frame of the image; 060: Scanning a second object to be scanned located at a second scanning distance based on the light source projection module 20 and the image acquisition component 10 after the second calibration, and detecting a target area corresponding to the second object to be scanned in each frame of the image; The second scanning distance is greater than the first scanning distance.
[0058] Specifically, after the calibration of the image acquisition component 10 is completed, the object to be scanned can be scanned based on the three-dimensional scanning device 100. When the image acquisition component 10 is scanning under the first light condition, the first object to be scanned is located at the first scanning distance, and the first object to be scanned is scanned based on the light source projection module 20 and the image acquisition component 10. During the scanning process, the first object to be scanned can be kept still, and the three-dimensional scanning device 100 can be controlled to rotate around the first object to be scanned; or, the three-dimensional scanning device 100 can be kept still, and the first object to be scanned can be controlled to rotate around its own central axis.
[0059] During the above rotation process, the distance between the first scanned object and the three-dimensional scanning device 100 is controlled to be maintained at the first scanning distance. Through scanning, multiple frames of images can be obtained, and the multiple frames of images are detected to determine the target area corresponding to the first object to be scanned in each frame of the image. Based on the target area and calibration, the first internal parameter matrix and the first distortion parameter are obtained, and the first object to be scanned can be three-dimensionally reconstructed.
[0060] When the image acquisition component 10 performs scanning under the second light condition, the second object to be scanned is located at the second scanning distance, and the second object to be scanned is scanned based on the light source projection module 20 and the image acquisition component 10. During the scanning process, the second object to be scanned can be kept still, and the three-dimensional scanning device 100 can be controlled to rotate around the second object to be scanned; or, the three-dimensional scanning device 100 can be kept still, and the second object to be scanned can be controlled to rotate around its own central axis.
[0061] During the above rotation process, the distance between the second scanned object and the three-dimensional scanning device 100 is controlled to be maintained at the second scanning distance. Through scanning, multiple frames of images can be obtained, and the multiple frames of images are detected to determine the target area corresponding to the second object to be scanned in each frame of the image. Based on the target area and calibration, the second intrinsic parameter matrix and the second distortion parameter are obtained, and the second object to be scanned can be three-dimensionally reconstructed.
[0062] The second scanning distance is greater than the first scanning distance, and the first scanning distance may be the same as the first predetermined distance in the aforementioned embodiment, for example, the first scanning distance may be set to be less than 400 mm, and the second scanning distance may be the same as the second predetermined distance in the aforementioned embodiment, for example, the second scanning distance may be set to be greater than 600 mm. The first object to be scanned may be the same as or different from the second object to be scanned.
[0063] In the related art, the scanning device only scans through blue light laser. The wavelength of blue light is shorter and the focus is closer. When the object to be scanned is far away from the scanning device, the scanning clarity is lower.
[0064] In the embodiment of the present application, the light source projection module 20 can project a first light and a second light, and the wavelength of the first light is smaller than the wavelength of the second light; the image acquisition component 10 after the first calibration can be used for close-range three-dimensional scanning under the first light condition, and the image acquisition component 10 after the second calibration can be used for long-range three-dimensional scanning under the second light condition. In this way, the three-dimensional scanning device 100 can realize long-range three-dimensional scanning, and the scanning clarity and scanning accuracy are high, so that the three-dimensional scanning device 100 can be applied to different scanning conditions.
[0065] See also Figure 2 , Figure 3 and Fig. 9 In some embodiments, the image acquisition component 10 includes an image sensor 12. The scanning control method further includes: In the process of scanning the first object to be scanned at the first scanning distance based on the light source projection module 20 and the image acquisition component 10 after the first calibration, and detecting the target area (i.e., 050) corresponding to the first object to be scanned in each frame of the image, 051: Control the brightness of the first light projected by the light source projection module 20 to be the first brightness, and control the photosensitivity time of the image sensor 12 to be the first photosensitivity time; In the process of scanning the second object to be scanned at the second scanning distance based on the light source projection module 20 and the image acquisition component 10 after the second calibration, and detecting the target area (i.e., 060) corresponding to the second object to be scanned in each frame image, 061: Control the brightness of the second light projected by the light source projection module 20 to be the second brightness, and control the photosensitivity time of the image sensor 12 to be the second photosensitivity time; The second brightness is greater than the first brightness, and the second photosensitivity time is less than the first photosensitivity time.
[0066] Specifically, the image acquisition component 10 includes an image sensor 12, and the image sensor 12 is used to convert the light signal captured by the lens 11 into an electrical signal to form an image. In the process of scanning the first object to be scanned located at the first scanning distance based on the light source projection module 20 and the image acquisition component 10 after the first calibration, and detecting the target area corresponding to the first object to be scanned in each frame of the image, the light source projection module 20 projects the first light with the first brightness, and the photosensitivity time of the image sensor 12 is set to the first photosensitivity time.
[0067] In the process of scanning the second object to be scanned at the second scanning distance based on the light source projection module 20 and the image acquisition component 10 after the second calibration, and detecting the target area corresponding to the second object to be scanned in each frame image, the light source projection module 20 projects the second light with the second brightness, and the photosensitivity time of the image sensor 12 is set to the second photosensitivity time.
[0068] The second brightness is greater than the first brightness, and the second photosensitivity time is less than the first photosensitivity time. That is to say, compared with short-distance scanning based on the light source projection module 20 and the image acquisition component 10, when long-distance scanning is performed based on the light source projection module 20 and the image acquisition component 10, the brightness of the light projected by the light source projection module 20 can be appropriately increased, and the photosensitivity time of the image sensor 12 can be reduced.
[0069] Since the wavelength of the second light projected by the light source projection module 20 is greater than that of the first light, the energy of the second light is less concentrated and is easily disturbed by the natural environment. By increasing the brightness of the second light, the image sensor 12 can receive more light signals in the same time; by reducing the photosensitivity time of the image sensor 12, the image sensor 12 can collect light signals in a shorter time, reducing the influence of ambient light on imaging. In this way, the background brightness can be reduced, the foreground brightness can be increased, and the imaging of the second light in the image can be highlighted, which is conducive to reducing the interference of background and ambient light.
[0070] See also Figure 2 and Fig.10 In some embodiments, based on the light source projection module 20 and the image acquisition component 10 after the second calibration, a second object to be scanned located at a second scanning distance is scanned, and a target area (i.e., 060) corresponding to the second object to be scanned in each frame of the image is detected, including: 062: Control the light source projection module 20 to project a second light beam to a second object to be scanned at a second scanning distance; 063: Capturing an image of a second object to be scanned by the image acquisition component 10 after the second calibration, and obtaining a plurality of frames of images to be processed; 064: Extract and match the target area of the multiple frames of images to be processed to obtain the target area corresponding to the second object to be scanned.
[0071] Specifically, when scanning the second object to be scanned at the second scanning distance, the light source projection module 20 is controlled to project the second light to the second object to be scanned. The second object to be scanned is imaged by the image acquisition component 10 after the second calibration to obtain multiple frames of continuous images to be processed. The target areas are extracted and matched for the multiple frames of images to be processed respectively, and the target area corresponding to the second object to be scanned in each frame of the image to be processed is determined, so as to perform three-dimensional reconstruction of the second object to be scanned based on the target area.
[0072] See also Figure 2 and Fig.11 In some embodiments, extracting and matching target regions of multiple frames of images to be processed to obtain a target region (ie, 064) corresponding to the second object to be scanned includes: 0641: setting a first mask area according to the target area extracted and matched in the previous frame of the image to be processed; 0642: Determine a second mask area of the image to be processed in the current frame according to the first mask area; 0643: Setting the judgment threshold of the current frame to be processed image according to the second mask area; 0644: Extract and match the target area of the current frame image to be processed according to the judgment threshold to obtain the target area corresponding to the second object to be scanned.
[0073] Specifically, taking the second light as an infrared laser as an example, the second light is projected onto the second object to be scanned, and a light spot or light strip with obvious brightness difference is formed on the surface of the second object to be scanned. The brightness difference is manifested as a change in grayscale value on the image to be processed. For the first frame of the image to be processed, the gradient is calculated, and the area where the grayscale value changes significantly in the image to be processed is determined according to the judgment threshold. For example, when the gradient is greater than the judgment threshold, it means that the grayscale changes significantly. When the gradient is less than or equal to the judgment threshold, it means that the grayscale change is not obvious. The area with obvious grayscale changes is extracted and marked as the initial area. For the extracted initial area, a preliminary three-dimensional reconstruction is performed and matched with the laser plane to determine whether the initial area is the target area. The initial area located on the laser plane is the target area.
[0074] After the target area is determined in the first frame of the image to be processed, the first mask area can be set according to the target area, and the second mask area can be determined in the second frame of the image to be processed according to the first mask area as prior information. In the second frame of the image to be processed, the judgment threshold is set according to the second mask area, and different judgment thresholds can be set for the area corresponding to the second mask area and the area outside the second mask area.
[0075] The gradient of the second frame of the image to be processed is calculated. For the area corresponding to the second mask area and the area outside the second mask area, according to different judgment thresholds set, the target area is extracted and matched respectively to obtain the target area corresponding to the second object to be scanned. For the target area in the second frame of the image to be processed, a new first mask area can be determined. According to the new first mask area, the second mask area in the third frame of the image to be processed is determined, and the judgment threshold of the third frame of the image to be processed is set according to the second mask area, so as to extract and match the target area of the third frame of the image to be processed.
[0076] By analogy, the first mask area is set according to the target area extracted and matched in the N-1 frame of the image to be processed, and the second mask area of the N frame of the image to be processed is determined according to the first mask area. The judgment threshold of the N frame of the image to be processed is set according to the second mask area, and the target area of the N frame of the image to be processed is extracted and matched according to the judgment threshold to obtain the target area corresponding to the second object to be scanned, thereby completing the detection of multiple frames of images to be processed and determining the target area corresponding to the second object to be scanned in each frame of the image.
[0077] In the related art, the infrared scanning process is very susceptible to interference from the external environment. There is a large amount of infrared band energy in the natural ambient light. Even if a filter is used to only allow infrared lasers of a fixed band to pass, the influence of ambient light cannot be avoided.
[0078] In the implementation manner of the present application, the target area obtained by extracting and matching the previous frame of the image to be processed provides prior information for the current frame of the image to be processed, and the target area of the current frame of the image to be processed is extracted and matched using the prior information. In this way, the use of the prior information can further reduce the interference of background and ambient light, improve the accuracy of the acquired target area, and thereby improve the accuracy of three-dimensional reconstruction.
[0079] See also Figure 2 and Fig.12 In some embodiments, determining a second mask area (ie, 0642) of the current frame to be processed image according to the first mask area includes: 06421: Determine the diffusion ratio of the first mask area according to the acquisition frame rate of the image acquisition component 10; 06422: Perform diffusion processing on the first mask area according to the diffusion ratio to obtain a diffusion area; 06423: Determine a second mask area in the current frame image to be processed according to the diffusion area.
[0080] Specifically, the acquisition frame rate indicates the number of image frames acquired by the image acquisition component 10 per second. According to the acquisition frame rate of the image acquisition component 10, the diffusion ratio of the first mask area is determined. The larger the acquisition frame rate, the larger the diffusion ratio, and the smaller the acquisition frame rate, the smaller the diffusion ratio. The first mask area is diffused according to the diffusion ratio. For example, if the diffusion ratio is 10%, the area of the first mask area is increased by 10%. After obtaining the diffusion area, according to the position of the first mask area in the previous frame of the image to be processed, the diffusion area is set at the corresponding position in the current frame of the image to be processed to obtain the second mask area.
[0081] It can be understood that the multiple frames of images to be processed are continuous, the position of the second object to be scanned in two consecutive frames of images to be processed changes little, and the target area in the previous frame of the image to be processed overlaps at least partially with the target area in the current frame of the image to be processed; therefore, the second mask area can be determined in the current frame of the image to be processed based on the first mask area. In order to ensure that the second mask area can better cover the target area, the first mask area can be diffused to a certain extent, and then the second mask area can be determined in the current frame of the image to be processed. In this way, better prior information can be provided for the extraction and matching of the target area of the current frame of the image to be processed.
[0082] See also Figure 2 and Fig.13 In some embodiments, setting the judgment threshold (i.e., 0643) of the current frame to be processed image according to the second mask area includes: 06431: For the area corresponding to the second mask area in the current frame image to be processed, the judgment threshold is set to the first judgment threshold; 06432: For the area outside the second mask area in the current frame image to be processed, the judgment threshold is set to the second judgment threshold; The second judgment threshold is greater than the first judgment threshold.
[0083] Specifically, in the current frame image to be processed, for the area corresponding to the second mask area and the area outside the second mask area, a first judgment threshold and a second judgment threshold are set respectively, and the second judgment threshold is greater than the first judgment threshold.
[0084] For the area corresponding to the second mask area in the current frame image to be processed, it is highly likely that the area is the target area, and a relatively subtle gradient change may be the target area, so the judgment threshold is set to a smaller first judgment threshold.
[0085] For the area outside the second mask area in the current frame image to be processed, the possibility that the area is the target area is small, and only the area with more obvious gradient changes may be the target area. Therefore, the judgment threshold is set to a larger second judgment threshold.
[0086] This is helpful to remove the background in the current frame image to be processed and reduce the interference of background and ambient light.
[0087] See also Figure 2 and Fig.14The embodiment of the present application also provides a scanning control device 200, which is applied to the three-dimensional scanning device 100. The three-dimensional scanning device 100 includes an image acquisition component 10 and a light source projection module 20. The light source projection module 20 is used to project a first light and a second light, and the wavelength of the first light is smaller than the wavelength of the second light. The scanning control device 200 includes a first acquisition module 210, a second acquisition module 220, a first calibration module 230 and a second calibration module 240. The first acquisition module 210 is used to acquire a first calibration image corresponding to the first light based on the light source projection module 20 and the image acquisition component 10. The second acquisition module 220 is used to acquire a second calibration image corresponding to the second light based on the light source projection module 20 and the image acquisition component 10. The first calibration module 230 is used to perform a first calibration on the image acquisition component 10 based on the first calibration image, and determine a first intrinsic parameter matrix and a first distortion parameter of the image acquisition component 10. The second calibration module 240 is used to perform a second calibration on the image acquisition component 10 based on the first intrinsic parameter matrix, the first distortion parameter and the second calibration image, and determine the second intrinsic parameter matrix and the second distortion parameter of the image acquisition component 10.
[0088] In some embodiments, the first acquisition module 210 is specifically used to control the light source projection module 20 to project the first light to the first calibration plate located at a first predetermined distance; the image of the first calibration plate is acquired through the image acquisition component 10 to obtain a first calibration image.
[0089] In some embodiments, the second acquisition module 220 is specifically used to control the light source projection module 20 to project the second light to a second calibration plate located at a second predetermined distance; the second calibration plate is imaged by the image acquisition component 10 to obtain a second calibration image; wherein the second predetermined distance is greater than the first predetermined distance.
[0090] In some embodiments, the second calibration module 240 is specifically used to calculate an iterative internal parameter matrix based on the first internal parameter matrix, the first distortion parameter and the second calibration image; calculate an iterative distortion parameter based on the iterative internal parameter matrix and the second calibration image; and iteratively calculate the iterative internal parameter matrix and the iterative distortion parameter to obtain a second internal parameter matrix and a second distortion parameter.
[0091] In some embodiments, the second calibration module 240 is specifically used to iteratively update the iterative internal parameter matrix according to the iterative distortion parameters, the first internal parameter matrix and the second calibration image; iteratively update the iterative distortion parameters according to the iterative internal parameter matrix and the second calibration image, and return to the step of iteratively updating the iterative internal parameter matrix according to the iterative distortion parameters, the first internal parameter matrix and the second calibration image; when a preset condition is met, stop the iterative update of the iterative internal parameter matrix and the iterative distortion parameters; determine the second internal parameter matrix according to the iterative internal parameter matrix of the last iteration, and determine the second distortion parameters according to the iterative distortion parameters of the last iteration.
[0092] See also Figure 2 and Fig.15 In some embodiments, the scanning control device 200 also includes a scanning detection module 250, which is used to scan a first object to be scanned located at a first scanning distance based on the light source projection module 20 and the image acquisition component 10 after the first calibration, and detect the target area corresponding to the first object to be scanned in each frame image; scan a second object to be scanned located at a second scanning distance based on the light source projection module 20 and the image acquisition component 10 after the second calibration, and detect the target area corresponding to the second object to be scanned in each frame image; wherein the second scanning distance is greater than the first scanning distance.
[0093] In some embodiments, the image acquisition component 10 includes an image sensor 12. In the process of scanning a first object to be scanned at a first scanning distance based on the light source projection module 20 and the calibrated image acquisition component 10, and detecting the target area corresponding to the first object to be scanned in each frame of the image, the scanning detection module 250 is also used to control the brightness of the first light projected by the light source projection module 20 to be the first brightness, and control the photosensitivity time of the image sensor 12 to be the first photosensitivity time. In the process of scanning a second object to be scanned at a second scanning distance based on the light source projection module 20 and the calibrated image acquisition component 10, and detecting the target area corresponding to the second object to be scanned in each frame of the image, the scanning detection module 250 is also used to control the brightness of the second light projected by the light source projection module 20 to be the second brightness, and control the photosensitivity time of the image sensor 12 to be the second photosensitivity time; wherein the second brightness is greater than the first brightness, and the second photosensitivity time is less than the first photosensitivity time.
[0094] In some embodiments, the scanning detection module 250 is specifically used to control the light source projection module 20 to project a second light to a second object to be scanned at a second scanning distance; to acquire an image of the second object to be scanned by the image acquisition component 10 after the second calibration, and to obtain multiple frames of images to be processed; to extract and match the target area of the multiple frames of images to be processed, and to obtain a target area corresponding to the second object to be scanned.
[0095] In some embodiments, the scanning detection module 250 is specifically used to set a first mask area based on the target area extracted and matched in the previous frame of the image to be processed; determine the second mask area of the current frame of the image to be processed based on the first mask area; set a judgment threshold of the current frame of the image to be processed based on the second mask area; extract and match the target area of the current frame of the image to be processed based on the judgment threshold, and obtain a target area corresponding to the second object to be scanned.
[0096] In some embodiments, the scanning detection module 250 is specifically used to determine the diffusion ratio of the first mask area according to the acquisition frame rate of the image acquisition component 10; diffuse the first mask area according to the diffusion ratio to obtain a diffusion area; and determine the second mask area in the current frame image to be processed according to the diffusion area.
[0097] In some embodiments, the scanning detection module 250 is specifically used to set the judgment threshold to the first judgment threshold for the area corresponding to the second mask area in the current frame image to be processed; for the area outside the second mask area in the current frame image to be processed, set the judgment threshold to the second judgment threshold; wherein the second judgment threshold is greater than the first judgment threshold.
[0098] It should be noted that the explanation of the scanning control method in the aforementioned embodiment is also applicable to the scanning control device 200 in the embodiment of the present application, and will not be elaborated here.
[0099] See also Fig.16 The embodiment of the present application also provides a scanning control system 300, which includes one or more processors 310 and a memory 320. The memory 320 stores a computer program. When the computer program is executed by the processor 310, the scanning control method of any of the above embodiments is implemented.
[0100] For example, when the computer program is executed by the processor 310, the following scanning control method is implemented: 010: Acquire a first calibration image corresponding to the first light based on the light source projection module 20 and the image acquisition component 10; 020: Acquire a second calibration image corresponding to the second light based on the light source projection module 20 and the image acquisition component 10; 030: Performing a first calibration on the image acquisition component 10 based on the first calibration image to determine a first intrinsic parameter matrix and a first distortion parameter of the image acquisition component 10; 040: Perform a second calibration on the image acquisition component 10 based on the first intrinsic parameter matrix, the first distortion parameter and the second calibration image to determine the second intrinsic parameter matrix and the second distortion parameter of the image acquisition component 10.
[0101] For another example, when the computer program is executed by the processor 310, the following scanning control method is implemented: 011: Control the light source projection module 20 to project a first light beam to a first calibration plate located at a first predetermined distance; 012: Capture an image of the first calibration plate through the image acquisition component 10 to obtain a first calibration image.
[0102] It should be noted that the explanations of the scanning control method and the scanning control device 200 in the aforementioned embodiments are also applicable to the scanning control system 300 in the embodiments of the present application, and will not be elaborated here.
[0103] See also Fig.17 The present application also provides a computer-readable storage medium 400 on which a computer program 410 is stored. When the program is executed by the processor 420, the scanning control method of any of the above embodiments is implemented.
[0104] For example, when the computer program 410 is executed by the processor 420, the following scanning control method is implemented: 010: Acquire a first calibration image corresponding to the first light based on the light source projection module 20 and the image acquisition component 10; 020: Acquire a second calibration image corresponding to the second light based on the light source projection module 20 and the image acquisition component 10; 030: Performing a first calibration on the image acquisition component 10 based on the first calibration image to determine a first intrinsic parameter matrix and a first distortion parameter of the image acquisition component 10; 040: Perform a second calibration on the image acquisition component 10 based on the first intrinsic parameter matrix, the first distortion parameter and the second calibration image to determine the second intrinsic parameter matrix and the second distortion parameter of the image acquisition component 10.
[0105] For another example, when the computer program 410 is executed by the processor 420, the following scanning control method is implemented: 011: Control the light source projection module 20 to project a first light beam to a first calibration plate located at a first predetermined distance; 012: Capture an image of the first calibration plate through the image acquisition component 10 to obtain a first calibration image.
[0106] It should be noted that the explanations of the scanning control method and the scanning control device 200 in the aforementioned embodiments are also applicable to the computer-readable storage medium 400 in the embodiments of the present application, and will not be elaborated here.
[0107] In summary, in the scanning control method, scanning control device 200, scanning control system 300 and computer-readable storage medium 400 of the embodiment of the present application, the image acquisition component 10 is first calibrated based on the first calibration image to obtain a first internal parameter matrix and a first distortion parameter with high accuracy, and then the image acquisition component 10 is second calibrated with reference to the first internal parameter matrix and the first distortion parameter to determine the second internal parameter matrix and the second distortion parameter corresponding to the image acquisition component 10 and the second light. In this way, the calibration accuracy of the image acquisition component 10 under long-wavelength light conditions is improved, and the three-dimensional reconstruction accuracy of the three-dimensional scanning device 100 is guaranteed.
[0108] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0109] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0110] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a computer-readable storage medium can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable storage media include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0111] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0112] A person of ordinary skill in the art will appreciate that all or part of the steps carried by the method for implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment. In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.
[0113] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application. The scope of the present application is defined by the claims and their equivalents.
Claims
1. A scanning control method, characterized in that: Applied to a three-dimensional scanning device, the three-dimensional scanning device includes an image acquisition component and a light source projection module, the light source projection module is used to project a first light and a second light, the wavelength of the first light is smaller than the wavelength of the second light, and the scanning control method includes: Acquire a first calibration image corresponding to the first light based on the light source projection module and the image acquisition component; Acquire a second calibration image corresponding to the second light based on the light source projection module and the image acquisition component; Performing a first calibration on the image acquisition component based on the first calibration image to determine a first intrinsic parameter matrix and a first distortion parameter of the image acquisition component; Based on the first intrinsic parameter matrix, the first distortion parameter and the second calibration image, a second calibration is performed on the image acquisition component to determine a second intrinsic parameter matrix and a second distortion parameter of the image acquisition component.
2. The scanning control method according to claim 1, characterized in that: The acquiring a first calibration image corresponding to the first light based on the light source projection module and the image acquisition component includes: Controlling the light source projection module to project the first light to a first calibration plate located at a first predetermined distance; The image acquisition component is used to acquire an image of the first calibration plate to obtain the first calibration image.
3. The scanning control method according to claim 2, characterized in that: The acquiring a second calibration image corresponding to the second light based on the light source projection module and the image acquisition component includes: Controlling the light source projection module to project the second light to a second calibration plate located at a second predetermined distance; Capturing the image of the second calibration plate by the image acquisition component to obtain the second calibration image; Wherein, the second predetermined distance is greater than the first predetermined distance.
4. The scanning control method according to claim 1, characterized in that: The performing a second calibration on the image acquisition component based on the first intrinsic parameter matrix, the first distortion parameter and the second calibration image to determine a second intrinsic parameter matrix and a second distortion parameter of the image acquisition component includes: Calculating an iterative intrinsic parameter matrix according to the first intrinsic parameter matrix, the first distortion parameter and the second calibration image; Calculating iterative distortion parameters according to the iterative intrinsic parameter matrix and the second calibration image; The iterative internal parameter matrix and the iterative distortion parameter are iteratively calculated to obtain a second internal parameter matrix and a second distortion parameter.
5. The scanning control method according to claim 4, characterized in that: The iterative calculation of the iterative internal parameter matrix and the iterative distortion parameter to obtain a second internal parameter matrix and a second distortion parameter includes: Iteratively updating the iterative intrinsic parameter matrix according to the iterative distortion parameter, the first intrinsic parameter matrix and the second calibration image; Iteratively updating the iterative distortion parameters according to the iterative intrinsic parameter matrix and the second calibration image, and returning to the step of iteratively updating the iterative intrinsic parameter matrix according to the iterative distortion parameters, the first intrinsic parameter matrix and the second calibration image; When a preset condition is reached, stopping the iterative update of the iterative internal parameter matrix and the iterative distortion parameter; A second internal parameter matrix is determined according to the iterative internal parameter matrix of the last iteration, and a second distortion parameter is determined according to the iterative distortion parameter of the last iteration.
6. The scanning control method according to claim 1, characterized in that: The scanning control method further includes: Scanning a first object to be scanned located at a first scanning distance based on the light source projection module and the image acquisition component after the first calibration, and detecting a target area corresponding to the first object to be scanned in each frame of the image; Scanning a second object to be scanned located at a second scanning distance based on the light source projection module and the image acquisition component after the second calibration, and detecting a target area corresponding to the second object to be scanned in each frame of the image; Wherein, the second scanning distance is greater than the first scanning distance.
7. The scanning control method according to claim 6, characterized in that: The image acquisition component includes an image sensor, and the scanning control method further includes: In the process of scanning the first object to be scanned at the first scanning distance based on the light source projection module and the image acquisition component after the first calibration, and detecting the target area corresponding to the first object to be scanned in each frame of the image, the brightness of the first light projected by the light source projection module is controlled to be the first brightness, and the photosensitivity time of the image sensor is controlled to be the first photosensitivity time; In the process of scanning the second object to be scanned at the second scanning distance based on the light source projection module and the image acquisition component after the second calibration, and detecting the target area corresponding to the second object to be scanned in each frame of the image, the brightness of the second light projected by the light source projection module is controlled to be the second brightness, and the photosensitivity time of the image sensor is controlled to be the second photosensitivity time; Among them, the second brightness is greater than the first brightness, and the second photosensitivity time is shorter than the first photosensitivity time.
8. The scanning control method according to claim 6, characterized in that: The method of scanning a second object to be scanned located at a second scanning distance based on the light source projection module and the image acquisition component after the second calibration, and detecting a target area corresponding to the second object to be scanned in each frame of the image, includes: Controlling the light source projection module to project the second light to the second object to be scanned at the second scanning distance; Capturing images of the second object to be scanned by the image acquisition component after the second calibration to obtain a plurality of frames of images to be processed; The target area is extracted and matched on multiple frames of the to-be-processed images to obtain the target area corresponding to the second to-be-scanned object.
9. The scanning control method according to claim 8, characterized in that: The step of extracting and matching the target area from the plurality of frames of the images to be processed to obtain the target area corresponding to the second object to be scanned includes: Setting a first mask area according to the target area extracted and matched in the image to be processed in the previous frame; Determining a second mask area of the image to be processed in the current frame according to the first mask area; Setting a judgment threshold of the image to be processed in the current frame according to the second mask area; The target area is extracted and matched for the image to be processed in the current frame according to the judgment threshold to obtain the target area corresponding to the second object to be scanned.
10. The scanning control method according to claim 9, characterized in that: The step of determining a second mask area of the image to be processed in the current frame according to the first mask area includes: Determining a diffusion ratio of the first mask area according to an acquisition frame rate of the image acquisition component; Performing diffusion processing on the first mask area according to the diffusion ratio to obtain a diffusion area; According to the diffusion area, the second mask area is determined in the image to be processed in the current frame.
11. The scanning control method according to claim 9, characterized in that: The step of setting a judgment threshold of the image to be processed in the current frame according to the second mask area includes: For an area corresponding to the second mask area in the image to be processed in the current frame, setting the judgment threshold to a first judgment threshold; For an area outside the second mask area in the image to be processed in the current frame, setting the judgment threshold to a second judgment threshold; The second judgment threshold is greater than the first judgment threshold.
12. A scanning control device, characterized in that: Applied to a three-dimensional scanning device, the three-dimensional scanning device includes an image acquisition component and a light source projection module, the light source projection module is used to project a first light and a second light, the wavelength of the first light is smaller than the wavelength of the second light, and the scanning control device includes: A first acquisition module, used for acquiring a first calibration image corresponding to the first light based on the light source projection module and the image acquisition component; A second acquisition module, used for acquiring a second calibration image corresponding to the second light based on the light source projection module and the image acquisition component; A first calibration module, configured to perform a first calibration on the image acquisition component based on the first calibration image, and determine a first intrinsic parameter matrix and a first distortion parameter of the image acquisition component; A second calibration module is used to perform a second calibration on the image acquisition component based on the first intrinsic parameter matrix, the first distortion parameter and the second calibration image to determine a second intrinsic parameter matrix and a second distortion parameter of the image acquisition component.
13. A scanning control system, characterized in that: The scanning control system includes one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the scanning control method according to any one of claims 1 to 11 is implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the scanning control method described in any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Equipment calibration method for multi-source data fusion and related device
CN113034615A
Distortion calibration method and device, electronic equipment and medium
CN115564822A
Infrared light image and visible light image alignment method and device and electronic equipment
CN115953325A
Sammer camera calibration method, device and system
CN117911541A
Calibration method and endoscope system
WO2015064436A1