Three-dimensional scanning method and device, equipment, storage medium, program product and chip

By dynamically switching the scanning mode, image recognition and three-dimensional reconstruction processing are optimized according to the scanning distance and motion direction, the problem of poor recognition and positioning stability of handheld scanning devices under different depth of field ranges is solved, and scanning accuracy and equipment adaptability are improved.

CN120194628APending Publication Date: 2025-06-24SCANTECH (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510309856.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

In existing handheld scanning devices, the imaging characteristics of marking points differ in the range of different depths of field, resulting in a reduced scanning accuracy.

Method used

By collecting the scanning data of the target object, determining the scanning distance and motion direction, and dynamically switching the scanning mode. Specifically, when scanning from near to far or from far to near, when the distal or proximal threshold is reached, the first or second scanning mode is switched to the first or second scanning mode, and the image recognition and three-dimensional reconstruction processing methods are optimized, respectively.

Benefits of technology

Ensure that marking points are stably identified within different depths of field, improve the stability and continuity of handheld scanning devices, and enhance the adaptability to dynamic scanning environments and the versatility of scanning devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120194628A_ABST
    Figure CN120194628A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional scanning method and device, equipment, a storage medium, a program product and a chip, and belongs to the field of three-dimensional scanning. The method comprises the following steps: acquiring scanning data of a target object; determining a scanning distance and a scanning motion direction with the target object based on the scanning data; under the condition that the scanning motion direction indicates scanning from near to far, when the scanning distance reaches a far-end threshold value, switching to a first scanning mode for scanning; under the condition that the scanning motion direction indicates scanning from far to near, when the scanning distance reaches a near-end threshold value, switching to a second scanning mode for scanning; wherein in the first scanning mode and the second scanning mode, the recognition modes of the collected images are different, and / or in the first scanning mode and the second scanning mode, the processing modes of performing three-dimensional reconstruction on the collected images are different. The scanning modes are dynamically switched in combination with the scanning distance and the scanning motion direction, and the scanning precision and stability can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of 3D scanning, and particularly relates to a 3D scanning method, device, equipment, storage medium, program product, and chip. Background Art

[0002] In 3D scanning technology, handheld scanning devices usually need to collect data at different positions and angles of the target object, and perform 3D reconstruction based on the marking points set on the target object to construct a complete 3D model.

[0003] In different depth-of-field ranges, the imaging characteristics of the marking points are significantly different, which affects the stability of recognition and positioning. Existing handheld scanning devices are usually optimized for a specific depth-of-field range to ensure high scanning quality within that range. However, during the actual scanning process, due to the unstable spatial position of the handheld scanning device, the depth-of-field range may change dynamically, and not only may phenomena such as scanning jams and tracking interruptions occur, resulting in a decrease in scanning accuracy. Summary of the Invention

[0004] This application aims to solve at least one of the technical problems existing in the related art. For this purpose, this application provides a 3D scanning method, device, equipment, storage medium, program product, and chip to improve scanning accuracy and stability.

[0005] In a first aspect, this application provides a 3D scanning method, and the method includes:

[0006] Collect scanning data of the target object;

[0007] Based on the scanning data, determine the scanning distance and scanning movement direction between the target object;

[0008] When the scanning movement direction indicates scanning from near to far, when the scanning distance reaches the far-end threshold, switch to the first scanning mode for scanning;

[0009] When the scanning movement direction indicates scanning from far to near, when the scanning distance reaches the near-end threshold, switch to the second scanning mode for scanning;

[0010] Wherein, the recognition methods for the collected images in the first scanning mode and the second scanning mode are different, and / or, the processing methods for performing 3D reconstruction on the collected images in the first scanning mode and the second scanning mode are different.

[0011] The 3D scanning method provided by the embodiments of the present application collects the scanning data of the target object, determines the scanning distance and the scanning movement direction between the scanning device and the target object based on the scanning data, and dynamically switches the scanning mode in combination with the judgment of the scanning distance and the movement direction. Specifically, in the case where the scanning movement direction indicates scanning from near to far, when the scanning distance reaches the distal threshold, it switches to the first scanning mode for scanning; in the case where the scanning movement direction indicates scanning from far to near, when the scanning distance reaches the proximal threshold, it switches to the second scanning mode for scanning; wherein, in the first scanning mode and the second scanning mode, the processing methods for 3D reconstruction of the images collected by the scanning device are different, so that the same scanning device can simultaneously take into account the working methods with different far and near depths of field, ensure that the marking points can be stably recognized within different depth of field ranges, improve the stability and continuity of the handheld scanning device, and enhance the adaptability to the dynamic scanning environment and the versatility of the scanning device.

[0012] According to an embodiment of the present application, at least one of the distal threshold and the proximal threshold is updated with the scanning movement direction; wherein, in the case where the scanning movement direction indicates scanning from near to far, the distal threshold is a preset distal threshold plus a preset offset; in the case where the scanning movement direction indicates scanning from far to near, the proximal threshold is a preset proximal threshold minus a preset offset.

[0013] In the above embodiment, by introducing a hysteresis switching mechanism for the scanning mode, and dynamically adjusting the threshold in different scanning directions to reasonably adjust the mode switching timing, the switching between the first scanning mode and the second scanning mode is smoother, without causing an obvious mutation of the scanning mode that can be perceived by the user, and it not only ensures the data consistency, but also can ensure the application of the optimal strategy within the best range, improving the integrity and accuracy of the collected data.

[0014] In a second aspect, the present application provides a 3D scanning device, the device includes:

[0015] An acquisition module, configured to acquire the scanning data of the target object;

[0016] A determination module, configured to determine the scanning distance and the scanning movement direction between the target object based on the scanning data;

[0017] A switching module, configured to, in the case where the scanning movement direction indicates scanning from near to far, when the scanning distance reaches the distal threshold, switch to the first scanning mode for scanning;

[0018] The switching module is further configured to, when the scanning movement direction indicates scanning from far to near and the scanning distance reaches the proximal threshold, switch to the second scanning mode for scanning; wherein, the recognition methods for the acquired images in the first scanning mode and the second scanning mode are different, and / or, the processing methods for performing three-dimensional reconstruction on the acquired images in the first scanning mode and the second scanning mode are different.

[0019] The three-dimensional scanning device provided by the embodiments of the present application acquires scanning data of a target object, determines the scanning distance and the scanning movement direction between the scanning device and the target object based on the scanning data, and dynamically switches the scanning mode in combination with the judgment of the scanning distance and the movement direction. Specifically, when the scanning movement direction indicates scanning from near to far and the scanning distance reaches the distal threshold, it switches to the first scanning mode for scanning; when the scanning movement direction indicates scanning from far to near and the scanning distance reaches the proximal threshold, it switches to the second scanning mode for scanning; wherein, in the first scanning mode and the second scanning mode, the processing methods for performing three-dimensional reconstruction on the acquired images by the scanning device are different, so that the same scanning device can simultaneously take into account working methods with different far and near depths of field, ensure that the marker points can be stably recognized within different depth-of-field ranges, improve the stability and continuity of the handheld scanning device, and enhance the adaptability to the dynamic scanning environment and the versatility of the scanning device.

[0020] In a third aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the three-dimensional scanning method as described in the first aspect above.

[0021] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the three-dimensional scanning method as described in the first aspect above.

[0022] In a fifth aspect, the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the three-dimensional scanning method as described in the first aspect above.

[0023] In a sixth aspect, the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the three-dimensional scanning method as described in the first aspect above.

[0024] The additional aspects and advantages of the present application will be partially given in the following description, partially become apparent from the following description, or be understood through the practice of the present application. Description of the Drawings

[0025] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the description of the embodiments in conjunction with the following drawings, where:

[0026] Figure 1 is a schematic diagram of an application scenario of a three-dimensional scanning method provided in some embodiments of the present application;

[0027] Figure 2 is a schematic flowchart of a three-dimensional scanning method provided in some embodiments of the present application;

[0028] Figure 3 is a schematic flowchart of a first scanning mode provided in some embodiments of the present application;

[0029] Figure 4 is a schematic flowchart of a second scanning mode provided in some embodiments of the present application;

[0030] Figure 5 is a schematic flowchart of a three-dimensional scanning method provided in some other embodiments of the present application;

[0031] Figure 6 is a schematic flowchart of a three-dimensional scanning method provided in some further embodiments of the present application;

[0032] Figure 7 is a schematic structural diagram of a three-dimensional scanning device provided in some embodiments of the present application;

[0033] Figure 8 is a schematic structural diagram of a computer device provided in some embodiments of the present application. Detailed Description of the Embodiments

[0034] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.

[0035] Unless otherwise defined, all technical and scientific terms used in the present application have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs; the terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above drawings are intended to cover non-exclusive inclusion. The terms "first", "second", etc. in the specification and claims of the present application or the above drawings are used to distinguish different objects and are not used to describe a specific order or primary-secondary relationship.

[0036] Reference to "embodiment" in this application means that the specific features, structures or characteristics described in connection with the embodiment may be included in at least one embodiment of this application. The phrase appearing at various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0037] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected to", and "attached" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be directly connected, or indirectly connected through an intermediate medium, and it may be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0038] The term "and / or" in this application is merely a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this application generally represents an "or" relationship between the associated objects before and after.

[0039] The term "a plurality of" appearing in this application refers to two or more (including two). Similarly, "a plurality of groups" refers to two or more groups (including two groups), and "a plurality of pieces" refers to two or more pieces (including two pieces).

[0040] Current handheld laser scanning devices are usually optimized for a specific depth-of-field range to ensure high scanning quality within that range. For example, for devices suitable for close-range scanning, their optimal scanning range is usually between 400 mm and 700 mm, while for devices suitable for long-range scanning, their scanning range is usually between 800 mm and 2000 mm. However, it is still a technical challenge to simultaneously take into account both close-range and long-range scanning on a single device and ensure stable scanning quality throughout the range.

[0041] At different scanning distances, there are obvious differences in the imaging characteristics of the marker points, which affect the stability of recognition and positioning. When scanning at close range, the pixel proportion of the marker points in the image is relatively large. To improve the frame rate of the system operation, a downsampling method can be used to accelerate the recognition and processing of the marker points. However, when scanning at long range, the pixel proportion of the marker points in the image is significantly reduced. If the same downsampling strategy is continued to be used, it may lead to a significant increase in the marker point missed detection rate, thereby affecting the stable positioning of the handheld scanning device.

[0042] Therefore, a single close-range scanning strategy cannot be directly applied to long-range scanning scenarios, and vice versa. They each face different technical challenges. This is why current handheld scanning devices are usually only applicable to a specific depth of field.

[0043] In view of this, embodiments of the present application provide a three-dimensional scanning method. By dynamically switching the scanning mode in combination with the judgment of the scanning distance and the movement direction, the same scanning device can take into account working methods with different depths of field, ensuring that the fiducial points can be stably recognized within different depth-of-field ranges, improving the stability and continuity of the handheld scanning device, and enhancing the adaptability to the dynamic scanning environment and the versatility of the scanning device. Moreover, by automatically adjusting the fiducial point recognition strategy for different scanning distances and optimizing the data acquisition and processing methods for close-range and long-range scanning respectively, unnecessary data redundancy and computational overhead are reduced, thereby improving the operating efficiency of the device while ensuring the scanning quality.

[0044] The three-dimensional scanning method provided by the embodiments of the present application can improve the overall accuracy of three-dimensional reconstruction through adaptive switching of the scanning mode. It is applicable not only to high-precision measurement scenarios such as industrial component inspection but also to medium- and large-sized target measurement scenarios such as the human body, vehicles, and buildings.

[0045] The scanning device mentioned in the embodiments of the present application includes, but is not limited to, a handheld scanning device, such as a handheld laser scanner or a tracking scanner, etc. It is easy to understand that when the scanning device is held, the depth-of-field range is more likely to change, but this does not limit the scanning device. The scanning device can also be non-handheld. For example, when the target object is a large target or has an irregular shape, the non-handheld scanning device will also face the situation of changing depth-of-field range. Therefore, the present application does not make a specific limitation on the scanning device.

[0046] Next, in conjunction with the accompanying drawings, the three-dimensional scanning method provided by the embodiments of the present application and the like will be described in detail through specific embodiments and their application scenarios.

[0047] The three-dimensional scanning method provided by the embodiments of the present application can be applied to an application environment as Figure 1 shown. Among them, the user can hold the scanning device 10 to perform non-contact scanning on a target object 20. The target object 20 includes, but is not limited to, one or more of industrial components, vehicles, the human body, animals, or buildings, etc. A plurality of fiducial points are provided on the surface of the target object 20. The fiducial points are usually markers covered with special reflective materials on the surface. The fiducial points can be circular fiducial points or a combination of circular fiducial points and other patterns.

[0048] The 3D scanning method provided by the embodiments of the present application may be executed by a scanning device or a functional module or entity in the scanning device that can implement the functions of this method.

[0049] Taking the scanning device as the execution entity as an example, the 3D scanning method provided by the embodiments of the present application will be described below.

[0050] As Figure 2 shown, the 3D scanning method includes: step 210 to step 240.

[0051] Step 210, collect scanning data of the target object.

[0052] The scanning device obtains its own scanning data of the target object. The scanning data includes, but is not limited to, one or more of image data, depth data (such as depth information collected by a structured light or ToF sensor), or point cloud data, etc.

[0053] For example, the scanning device projects a specific grating and analyzes its deformation to obtain the depth information of the target object, and combines the color image collected by the camera to form color point cloud data. Another example is that the scanning device obtains the point cloud data of the target object through a lidar and records its own pose information, etc.

[0054] Step 220, based on the scanning data, determine the scanning distance and the scanning movement direction between the scanning device and the target object.

[0055] Among them, the scanning distance refers to the distance between the scanning device and the target object. The scanning movement direction refers to the movement direction of the scanning device towards the target object, including approaching or moving away. The scanning device analyzes the scanning data to calculate the scanning distance between itself and the target object, and judges its own movement direction, that is, whether it moves from near to far or from far to near relative to the surface of the target object. For example, the scanning device can analyze consecutive frames of depth images, calculate the depth change between adjacent frames, and then determine the scanning movement direction.

[0056] Step 230, when the scanning movement direction indicates scanning from near to far, when the scanning distance reaches the distal threshold, switch to the first scanning mode for scanning.

[0057] According to the indication of the scanning movement direction, the scanning device switches the scanning mode within different scanning distance ranges to optimize reconstruction processing methods such as marker point recognition and marker point stitching. Among them, when the scanning movement direction indicates scanning from near to far, if the scanning distance reaches the distal threshold, switch to the first scanning mode.

[0058] Among them, the distal threshold can be a fixed distance threshold or can be dynamically updated along with the scanning movement direction.

[0059] Step 240: When the scanning motion direction indicates scanning from far to near, when the scanning distance reaches the proximal threshold, switch to the second scanning mode for scanning; wherein, the recognition methods for the acquired images in the first scanning mode and the second scanning mode are different, and / or, the processing methods for three-dimensional reconstruction of the acquired images in the first scanning mode and the second scanning mode are different.

[0060] When the scanning motion direction indicates scanning from far to near, if the scanning distance reaches the proximal threshold, switch to the second scanning mode. Among them, the proximal threshold can be a fixed threshold or can be dynamically updated along with the scanning motion direction.

[0061] On the one hand, in the first scanning mode and the second scanning mode, the scanning device can adopt different image recognition methods. In the first scanning mode, the scanning device scans the target object from a distance. At this time, the distance from the target object is relatively far, and stable scanning can be the main focus while taking into account the high frame rate experience. For example, in the first scanning mode, the scanning device optimizes the marker point recognition through methods such as image enhancement and edge detection to prevent missed detections caused by insufficient resolution.

[0062] In the second scanning mode, the scanning device scans the target object from a close distance. At this time, the distance from the target object is relatively close. Since the marker points occupy more pixels and the image resolution is high, the recognition of the marker points is usually more accurate, so high frame rate can be the main focus while taking into account the computational load. For example, in the second scanning mode, the scanning device can reduce the computational overhead and improve the scanning efficiency through downsampling.

[0063] On the other hand, in the first scanning mode and the second scanning mode, the scanning device can also adopt different three-dimensional reconstruction strategies to adapt to different scanning distances and motion directions, improve the data quality and reconstruction accuracy, and take into account the scanning efficiency and user experience. Among them, three-dimensional reconstruction refers to reconstructing a three-dimensional model of the target object by performing computational processing on the acquired scanning data. Three-dimensional reconstruction usually involves steps such as marker point recognition and marker point stitching. Marker point stitching refers to stitching the local regions obtained from each scan to finally generate a global three-dimensional model.

[0064] For example, in the first scanning mode, the scanning device cannot directly perform three-dimensional reconstruction through marker point stitching and can perform marker point stitching through an indirect method, such as pose registration or point cloud registration, etc., to determine the same marker points and perform stitching. While in the second scanning mode, the scanning device can directly use threshold conditions to screen the same marker points and perform stitching.

[0065] The three-dimensional scanning method provided in the embodiment of the present application collects scanning data of the target object, determines the scanning distance and scanning movement direction between the scanning device and the target object based on the scanning data, and dynamically switches the scanning mode in combination with the judgment of the scanning distance and the movement direction. Specifically, when the scanning movement direction indicates scanning from near to far, when the scanning distance reaches the far-end threshold, it switches to the first scanning mode for scanning; when the scanning movement direction indicates scanning from far to near, when the scanning distance reaches the near-end threshold, it switches to the second scanning mode for scanning; wherein, in the first scanning mode and the second scanning mode, the scanning device has different processing methods for three-dimensional reconstruction of the collected image, so that the same scanning device can take into account the working methods of different depths of field at near and far, ensure that the marking points can be stably identified within different depths of field, improve the stability and continuity of the handheld scanning device, and enhance the adaptability to the dynamic scanning environment and the versatility of the scanning device.

[0066] The three-dimensional scanning method provided in the embodiment of the present application does not require changes to the hardware configuration of the scanning device, thereby reducing the application cost of the method. The entire process does not require manual adjustments by the user, thereby avoiding the user's learning cost for using the device and effectively preventing the user from making unreasonable manual adjustments. The user is unaware of the process of adaptively switching the scanning mode, thereby greatly improving the user experience.

[0067] As mentioned above, in the actual operation of the handheld scanning device, the relative distance between the scanning device and the target object will continue to change, and different scanning distances require different scanning modes to optimize data collection quality and computing efficiency. For example, when scanning at close range, the markers are clearer and the point cloud density is higher, so it is suitable to use a high-precision reconstruction mode. When scanning at long distances, the markers are smaller and the resolution is limited, so it is necessary to adjust the recognition strategy to prevent the loss of markers caused by the close-range scanning strategy.

[0068] In order to ensure that the scanning mode can be switched reasonably under different scanning motion directions, the present application introduces a far-end threshold and a near-end threshold as the basis for switching the scanning mode.

[0069] In some embodiments, the switching mode between the first scanning mode and the second scanning mode is a fixed value.

[0070] Exemplarily, the scanning range of the scanning device is 400mm to 2000mm, wherein the optimal short-distance scanning range is 400mm to 700mm, and the long-distance scanning range is 800mm to 2000mm. Then the scanning device can be configured to: switch to the first scanning mode when the distance is greater than or equal to 800mm; switch to the second scanning mode when the distance is less than or equal to 700mm, etc.

[0071] In some other embodiments, the switching manner between the first scanning mode and the second scanning mode is a fixed-value hysteresis switching. In other words, there is a transition zone or transition mechanism between the first scanning mode and the second scanning mode. Specifically, when the scanning movement direction indicates scanning from near to far, the distal threshold is set closer to the distal end; when the scanning movement direction indicates scanning from far to near, the proximal threshold is set closer to the proximal end. Thereby, the situation of obvious data stratification or sudden change in the scanning experience during scanning at the near-far junction is avoided.

[0072] Exemplarily, the scanning device can be configured such that the distal threshold is closer to 2000 mm than 800 mm, for example, 1500 mm, etc.; the proximal threshold is closer to 400 mm than 700 mm, for example, 500 mm, etc.

[0073] In still some other embodiments, the distal threshold and the proximal threshold can be dynamically adjusted according to the scanning movement direction, that is, dynamic hysteresis switching, to improve scanning stability and provide a smoother mode switching mechanism. Specifically, when scanning from near to far, as the scanning device moves away from the target object, the distal threshold can be appropriately increased by a preset offset amount, thereby delaying the switching of the scanning mode and ensuring that the device can still maintain a certain stability at a long distance. When scanning from far to near, the proximal threshold is reduced by a preset offset amount and the mode switching is delayed, so as to optimize the data acquisition strategy before entering the close-range scanning range and ensure a high-quality three-dimensional reconstruction effect. The preset offset amount of the distal threshold and the preset offset amount of the proximal threshold can be the same or different.

[0074] Exemplarily, when the scanning device scans from near to far, the distal threshold is increased by a preset offset amount of 100 mm from the preset distal threshold of 800 mm, that is, it switches to the first scanning mode when it reaches 900 mm; when the scanning device scans from far to near, the proximal threshold is reduced by a preset offset amount of 50 mm from the preset proximal threshold of 700 mm, that is, it switches to the second scanning mode when it reaches 650 mm, so as to delay the mode switching and reduce the scanning discontinuity caused by the mode switching.

[0075] In summary, the present application introduces a hysteresis switching mechanism for the scanning mode, dynamically adjusts the threshold under different scanning directions to reasonably adjust the mode switching timing, makes the switching between the first scanning mode and the second scanning mode smoother, does not cause the user to perceive an obvious scanning mode mutation, and not only ensures the consistency of the data, but also can ensure the application of the optimal strategy within the best range, improving the integrity and accuracy of the acquired data.

[0076] In the 3D scanning process, the identification and splicing of markers are key links to ensure the correct positioning of the scanning device and the accuracy of 3D reconstruction. In the first scanning mode, due to the relatively long distance between the scanning device and the target object, the scanning accuracy will inevitably decrease, so the close-range scanning strategy cannot be used. Figure 3 As shown, in some embodiments, the first scanning mode includes steps 310 to 340:

[0077] Step 310: Identify the acquired current image to obtain a plurality of marking points; the plurality of marking points form a plurality of marking point groups;

[0078] Step 320: determining an initial position and posture of the scanning device based on a stitching result corresponding to a previous frame of the current image;

[0079] Step 330: determine candidate poses corresponding to the multiple groups of marker points, and select a candidate pose that matches the initial pose from the candidate poses as the target pose;

[0080] Step 340: perform marker point splicing based on the marker point group corresponding to the target posture.

[0081] The scanning device collects the current image and identifies the marker points in the current image by at least one of edge detection, morphological processing, etc., to obtain a plurality of marker points. A certain number of marker points may form a marker point group, and marker points in different marker point groups may overlap.

[0082] Exemplarily, every three marking points form a marking point group. For example, if the scanning device detects 15 marking points in the current image, the scanning device can obtain at least 5 groups of marking points, each group of marking points includes 3 marking points, such as the marking point group (a1, b1, c1) includes marking points a1, b1 and c1, the marking point group (a2, b2, c2) includes marking points a2, b2 and c2, ..., and so on.

[0083] Since the distance between the scanning device and the target object is relatively far, the reconstruction accuracy of the marker points is not high, and there may be some incorrectly identified marker points. If the splicing is performed directly based on the marker points, it may lead to large reconstruction errors and confusion between similar areas. During the scanning process, the movement of the device is continuous and smooth, and the pose of the current frame is likely to be close to the previous frame. Therefore, splicing can be performed based on the motion continuity of the previous and next frames. For example, after the 0th frame is successfully spliced, the coordinates of the successfully spliced ​​marker points are used to calculate the pose of the 1st frame; after the 1st frame is successfully spliced, the coordinates of the successfully spliced ​​marker points are used to calculate the pose of the 2nd frame... and so on.

[0084] That is, the scanning device can determine the pose of the scanning device in the global coordinate system when scanning the previous frame based on the stitching result of the previous frame image, and use it as the initial pose of the scanning device. This initial pose is the reference benchmark for the pose estimation of the current image.

[0085] For multiple groups of marker point groups in the current image, the scanning device can calculate the candidate poses corresponding to the multiple groups of marker point groups respectively, and screen the candidate poses that match the initial pose from the candidate poses as the target pose. For example, the scanning device can calculate the error of the marker point coordinates of each marker point group and select the candidate pose with the smallest error as the candidate pose that matches the initial pose, that is, the target pose.

[0086] In three-dimensional space, the pose usually includes rotation and translation, and the pose change between different frames can usually be described by a pose transformation matrix. For example, the scanning device can perform marker point matching through the pose transformation matrix to obtain the difference between the stitching results of multiple candidate stitching results and the stitching result of the previous frame image, and screen the candidate pose closest to the initial pose as the target pose of the current image. Exemplarily, when the scanning device detects a new marker point group (a1, b1, c1), it compares the side lengths and angles of the triangle formed by the three points of the marker point (a1, b1, c1) with the side lengths and angles of the triangle formed by the previously known marker point group (a0, b0, c0). If the side lengths and angles of both are equal or within the allowable range, it is determined that the new marker point group (a1, b1, c1) and the known marker point group (a0, b0, c0) are the same three points. Thus, based on the coordinate changes of the same points in adjacent frames, the scanning device can calculate the pose transformation matrix.

[0087] Furthermore, the scanning device can perform marker point stitching based on the marker point group corresponding to the target pose to ensure the continuity of the marker point data and provide reliable input data for subsequent 3D reconstruction.

[0088] The scanning device performs marker point stitching based on the target marker points, specifically referring to establishing a one-to-one correspondence between each marker point group in the current image and the known marker point group to ensure that they are in the same coordinate system, and then based on this correspondence, stitching the point cloud data corresponding to the current image with the previous point cloud data to form a larger 3D model.

[0089] In the above embodiments, the stitching result is determined by the pose, thereby reducing the problem of unstable pose estimation caused by recognition errors, and improving the continuity of the stitching process and the accuracy of marker point tracking.

[0090] To improve the accuracy of marker point recognition, different from the downsampling strategy that can be adopted in the second scanning mode, the first scanning mode processes the original image to locate the marker points. In some embodiments, the scanning device locates the marker points by searching for bright pixels row by row and determining them based on connected regions. By setting the first determination condition, the reliability of the marker points is ensured, thereby improving the stability of pose estimation. As a result, a high success rate of marker point recognition can be maintained under different distances and lighting environments, providing more stable data input for subsequent 3D reconstruction.

[0091] To this end, in some embodiments, the currently acquired image is recognized to obtain multiple marker points, including: searching for multiple bright pixels in the current image row by row, and determining the connected bright pixels among the multiple bright pixels as bright patches; for any bright patch, when the targeted bright patch meets the first determination condition, determining the targeted bright patch as a marker point.

[0092] Specifically, after the scanning device acquires the current image, it traverses the pixels in the image row by row to detect the bright pixels. The determination of bright pixels can be based on the pixel brightness threshold, that is: if the pixel brightness value is greater than the set threshold, then the pixel is considered a bright pixel. Traverse the entire image row by row and mark all bright pixels that meet this condition. Then, the scanning device can merge the connected bright pixels into a bright patch column by column. Connectivity can be determined based on four-neighborhood or eight-neighborhood. Exemplarily, the scanning device can use methods such as depth-first search or breadth-first search to mark connected regions and generate multiple bright patches.

[0093] Furthermore, the scanning device screens each bright patch to determine whether it meets the first determination condition to determine whether it is a marker point. The first determination condition includes but is not limited to: determining that the size data of the bright patch meets the preset size and determining that the shape of the bright patch meets the preset shape, etc., one or more of them. For example, the scanning device can detect the length and width of the minimum bounding rectangle of the bright patch, the patch area, and the ratio of the circumscribed rectangle, and when these size data all meet the preset values, it is regarded as a marker point. Or, when the scanning device performs elliptical fitting on the bright patch, it calculates the fitting error to determine whether its shape is close to a circle or an ellipse.

[0094] In the above embodiments, through row-by-row search and connected region analysis, marker points can be effectively recognized in a complex lighting environment, and combined with the first determination condition for screening, misrecognition is reduced, and the stability of the scanning device is improved.

[0095] In the second scanning mode, the marker points occupy more pixels in the image, and the accuracy is guaranteed to a certain extent. Therefore, the processing efficiency and frame rate can be further improved. To this end, in some embodiments, such as Figure 4As shown, the second scanning mode includes steps 410 to 420:

[0096] Step 410: Downsample the currently acquired image to obtain a downsampled image;

[0097] Step 420: Identify the target marker points from the downsampled image, and perform marker point stitching based on the target marker points.

[0098] In the second scanning mode, after the scanning device acquires the current image, it downsamples it to obtain a downsampled image to reduce the data volume and improve the calculation efficiency. The downsampling method can include but is not limited to at least one of equal-proportion scaling, downsampling, regional average downsampling, etc. Exemplarily, assuming the original image size is 2048×1536, then the image size after downsampling by 1 / 2 is 1024×768. The search space is reduced to 1 / 4 of the original, and the calculation amount is also reduced by 75%.

[0099] Furthermore, the scanning device can identify the target marker points from the downsampled image, and perform marker point stitching based on the target marker points. Exemplarily, the method of marker point identification can be the same as or different from the first scanning mode.

[0100] In the above embodiments, through downsampling, the calculation amount of marker point identification is reduced, effectively balancing the marker point identification rate and the scanning efficiency, and being able to provide a high-frame-rate scanning experience.

[0101] Since the marker point accuracy is relatively high during close-range scanning in the second scanning mode, in order to promptly eliminate incorrect marker points, a strict threshold determination method can be adopted for marker point reconstruction compared to the first scanning mode.

[0102] For this reason, in some embodiments, identifying the target marker points from the downsampled image includes: identifying multiple candidate marker points from the downsampled image; determining the marker point parameters of each of the multiple candidate marker points; and screening out the marker points that meet the second determination condition from the multiple candidate marker points as the target marker points based on the marker point parameters.

[0103] Specifically, multiple candidate marker points are identified on the downsampled image. The method of marker point identification can be the same as the first scanning mode, except that a line-by-line search is performed on the downsampled image instead of the original image to identify multiple candidate marker points.

[0104] The scanning device calculates the marker point parameters of each candidate marker point. The marker point parameters include but are not limited to one or more of brightness value, roundness, radius, minimum circumscribed circle radius, common perpendicular distance of binocular reconstruction, or ellipse fitting error, etc.

[0105] Accordingly, based on the marker point parameters, the scanning device screens each candidate marker point and selects the candidate marker points that meet the second determination condition as the target marker points to avoid reconstructing mis-identified marker points.

[0106] Among them, the first determination condition includes, but is not limited to, one or more of the following: the brightness value exceeds the brightness threshold, the radius of the minimum circumscribed circle is within a reasonable range, and the marker point is approximately circular.

[0107] In the above embodiments, through downsampling processing, the computational amount of marker point recognition can be reduced, effectively taking into account both the marker point recognition rate and the scanning efficiency, and providing a high-frame-rate scanning experience. Moreover, by screening through marker point parameters, marker points that do not conform to the rules can be filtered out, effectively reducing false detections and missed detections, and improving the recognition accuracy and stability.

[0108] In some embodiments, the marker point parameters further include roundness, common perpendicular distance, and radius. The second determination condition includes that the roundness exceeds the roundness threshold, the common perpendicular distance of binocular reconstruction is less than the common perpendicular distance threshold, and the difference between the radius and the preset radius does not exceed the preset percentage. Among them, by calculating the roundness of each candidate marker point to determine whether it is close to a circle or an ellipse, marker points can be screened from the morphology, effectively removing irregular noise points and improving the recognition accuracy. By calculating the common perpendicular distance, it is possible to evaluate whether the center of the marker point deviates from the ideal reference line, eliminate points with excessive deviation, ensure the reasonable distribution of marker points, reduce the impact brought by incorrect pose calculation, and reduce the marker point recognition error. By calculating the radius, it is possible to evaluate whether the size of the marker point meets the expectation, and screen out marker points with abnormal sizes, ensuring that the marker point size meets the preset standard and improving the stitching accuracy.

[0109] During the three-dimensional scanning process, the relative relationship between the movement trajectory of the scanning device and the scanned object determines the scanning quality and reconstruction accuracy. Especially in the scenarios of handheld scanning or dynamic scanning, due to the movement of the device, the scanning data will change between different frames. Therefore, it is necessary to deduce the motion state of the scanning device through the rigid body transformation parameters between adjacent frames, and determine the scanning distance and scanning motion direction based on this.

[0110] The rigid body transformation parameters usually include a rotation matrix and a translation vector, which can be used to describe the movement of the scanning device between two consecutive frames, provide information on the pose change of the scanning device, and thus deduce the scanning direction and its relative position relationship with the target object.

[0111] Therefore, in some embodiments, determining the scanning distance and scanning motion direction with respect to the target object based on the scanning data includes: determining the rigid body transformation parameters between adjacent frames based on the scanning data; determining the scanning distance and scanning motion direction between the scanning device and the target object based on the rigid body transformation parameters.

[0112] Specifically, the scanning device can calculate the rigid body transformation parameters between two adjacent frames through point cloud registration or image feature matching methods. The rigid body transformation parameters include, but are not limited to, the rotation matrix and the translation vector, which are used to represent the pose change of the scanning device. Through these parameters, the movement direction of the scanning device and its relative position to the target object can be deduced.

[0113] Based on the rigid body transformation parameters, the scanning device can calculate the scanning distance and deduce the movement direction of the scanning device, that is, the scanning movement direction.

[0114] Exemplarily, the scanning device can calculate the distance from the target object by the magnitude of the translation vector and estimate the forward or backward movement of the scanning device. If the magnitude increases, it means that the scanning device is moving away from the target object; if the magnitude decreases, it means that the scanning device is approaching the target object.

[0115] If the device rotates, it means that the scanning direction of the scanning device may have changed. Therefore, the scanning device can analyze the orientation change of the scanning device through the rotation matrix and further accurately determine whether the device is approaching or moving away from the target object in combination with the magnitude of the translation vector. For example, the scanning device extracts the scanning direction of the current frame, that is, the unit vector of the device optical axis direction vector (i.e., the forward direction of the scanning device) in the previous frame, and calculates the angle between the scanning direction and the translation vector. If the angle > 0, it means that the forward direction of the scanning device is consistent with the translation direction and it is moving away from the target object; if the angle < 0, it means that the forward direction of the scanning device is opposite to the translation direction and it is approaching the target object.

[0116] In the above embodiments, by calculating the rigid body transformation between adjacent frames, the motion state of the scanning device can be tracked, so that the scanning mode can be dynamically adjusted under different scanning distances and motion directions, improving the accuracy and stability of marker point tracking and three-dimensional reconstruction.

[0117] During the three-dimensional scanning process, the scanning frame rate is affected by the scanning distance, resulting in significant differences in the scanning effects at different distances. For this reason, the embodiments of the present application can also use the frame rate as a trigger condition. When the frame rate of the scanning device drops to a certain level during long-distance scanning, it automatically switches to the first scanning mode suitable for long-distance scanning; conversely, during short-distance scanning, when the frame rate increases to a certain threshold, it switches to the second scanning mode suitable for short-distance scanning. This can dynamically adapt to different scanning environments and improve the stability and quality of the scanning data.

[0118] For this reason, in some embodiments, as Figure 5 shown, the three-dimensional scanning method provided by the present application further includes steps 510 to 530:

[0119] Step 510: Determine the scanning parameters between the scanning device and the target object based on the scanning data; the scanning parameters include at least the frame rate.

[0120] Step 520: When the scanning motion direction indicates scanning from near to far, and when the frame rate drops to the far-end frame rate threshold, switch to the first scanning mode for scanning.

[0121] Step 530: When the scanning motion direction indicates scanning from far to near, and when the frame rate increases to the near-end frame rate threshold, switch to the second scanning mode for scanning.

[0122] Specifically, the scanning device acquires the scanning data of the target object, and based on the scanning data, calculates the scanning parameters between the scanning device and the target object, including the frame rate or image resolution, etc.

[0123] If the scanning direction is from near to far, the scanning device continuously monitors the frame rate. When the frame rate drops to the far-end frame rate threshold, switch to the first scanning mode to improve the adaptability of long-distance scanning.

[0124] If the scanning direction is from far to near, the scanning device continuously monitors the frame rate. When the frame rate increases to the near-end frame rate threshold, switch to the second scanning mode to optimize the accuracy and smoothness of close-range scanning.

[0125] The far-end frame rate threshold and the near-end frame rate threshold can be fixed thresholds or can be dynamically updated according to the scanning environmental conditions. The scanning environmental conditions include, but are not limited to, one or more of the illumination conditions, the device movement speed, or the background complexity, etc.

[0126] Exemplarily, in a low-light environment, the camera may need to increase the exposure time or increase the gain, resulting in a drop in the frame rate. Therefore, the far-end frame rate threshold and the near-end frame rate threshold can be adjusted relatively lower.

[0127] Another example is that if the scanning device moves too fast, the pose change between adjacent frames is relatively large, which may lead to failure of feature point matching or increase the computational complexity, thereby reducing the frame rate. Therefore, the far-end frame rate threshold and the near-end frame rate threshold can be adjusted relatively lower.

[0128] Another example is that in the case of an overly complex background, the frame rate is affected. Therefore, the far-end frame rate threshold and the near-end frame rate threshold can be adjusted relatively lower.

[0129] In the above embodiments, by monitoring the frame rate in real time, the scanning mode can be switched more flexibly, ensuring that the device can maintain an appropriate scanning rhythm at different distances and improving the user experience. When scanning at a long distance, since the marked points occupy fewer pixels, directly using the close-range mode may lead to misidentification or missed identification. Therefore, when the frame rate decreases, it automatically switches to the first scanning mode to improve the stability of long-distance scanning. When scanning at a close range, since the marked points are clear and the frame rate is high, when the frame rate increases, it can automatically switch to the second scanning mode, thereby reducing the calculation amount and improving the processing efficiency. Thus, based on the dynamic mode switching of the frame rate, the data stratification phenomenon caused by the change of the scanning distance is avoided, the smooth transition between different modes is ensured, and the consistency of the three-dimensional scanning results is improved.

[0130] In some other embodiments, as Figure 6 shown, the scanning parameter further includes the recognition rate; the three-dimensional scanning method provided by the present application further includes steps 610 to 620:

[0131] Step 610, when the scanning movement direction indicates scanning from near to far, when the recognition rate decreases to the distal recognition rate threshold, switch to the first scanning mode for scanning;

[0132] Step 620, when the scanning movement direction indicates scanning from far to near, when the recognition rate increases to the proximal recognition rate threshold, switch to the second scanning mode for scanning.

[0133] Specifically, the scanning device can collect the current image and perform preprocessing (such as denoising, enhancing contrast, etc.), detect candidate marked points in the current image, and calculate the recognition rate of the marked points, that is, the ratio of the number of successfully recognized marked points to the total number of marked points.

[0134] If the current scanning direction is from near to far, the scanning device determines whether the recognition rate decreases to the distal recognition rate threshold. When the recognition rate is lower than the distal recognition rate threshold, switch to the first scanning mode to improve the detection ability of long-distance marked points to meet the recognition requirements of long-distance marked points.

[0135] If the current scanning direction is from far to near, the scanning device determines whether the recognition rate increases to the proximal recognition rate threshold. When the recognition rate is higher than the proximal recognition rate threshold, switch to the second scanning mode to optimize the frame rate and calculation efficiency of close-range scanning. In this way, the scanning strategy can be adaptively adjusted within different distance ranges, ensuring the stability of marked point detection and improving the scanning quality.

[0136] In the above embodiments, by using the recognition rate as the switching condition, the smoothness of mode switching is ensured, the problem of discontinuous scanning data or sudden change in quality caused by fixed-distance switching is avoided, and the accuracy and stability of the three-dimensional scanning results are improved.

[0137] In the three-dimensional scanning method provided by the embodiment of the present application, the execution subject may be a three-dimensional scanning device. In the embodiment of the present application, taking the three-dimensional scanning device executing the three-dimensional scanning method as an example, the three-dimensional scanning device provided by the embodiment of the present application is described.

[0138] The embodiment of the present application also provides a three-dimensional scanning device, which is applied to a scanning device. As Figure 7 shown, the three-dimensional scanning device includes an acquisition module 701, a determination module 702, and a switching module 703. Among them:

[0139] The acquisition module 701 is used to acquire the scanning data of the target object.

[0140] The determination module 702 is used to determine the scanning distance and the scanning movement direction between the scanning device and the target object based on the scanning data.

[0141] The switching module 703 is used to switch to the first scanning mode for scanning when the scanning distance reaches the distal threshold in the case where the scanning movement direction indicates scanning from near to far.

[0142] The switching module 703 is further used to switch to the second scanning mode for scanning when the scanning distance reaches the proximal threshold in the case where the scanning movement direction indicates scanning from far to near; wherein, the recognition methods of the acquired images in the first scanning mode and the second scanning mode are different, and / or, the processing methods of performing three-dimensional reconstruction on the acquired images in the first scanning mode and the second scanning mode are different.

[0143] According to the three-dimensional scanning device provided by the embodiment of the present application, by acquiring the scanning data of the target object, and determining the scanning distance and the scanning movement direction between the scanning device and the target object based on the scanning data, the scanning mode is dynamically switched in combination with the judgment of the scanning distance and the movement direction. Specifically, in the case where the scanning movement direction indicates scanning from near to far, when the scanning distance reaches the distal threshold, switch to the first scanning mode for scanning; in the case where the scanning movement direction indicates scanning from far to near, when the scanning distance reaches the proximal threshold, switch to the second scanning mode for scanning; wherein, in the first scanning mode and the second scanning mode, the processing methods of performing three-dimensional reconstruction on the acquired images by the scanning device are different, so that the same scanning device can simultaneously take into account the working methods with different far and near depths of field, ensure that the marker points can be stably recognized within different depth of field ranges, improve the stability and continuity of the handheld scanning device, and enhance the adaptability to the dynamic scanning environment and the versatility of the scanning device.

[0144] In some embodiments, at least one of the distal threshold and the proximal threshold is updated according to the scanning movement direction; wherein, when the scanning movement direction indicates scanning from near to far, the distal threshold is the preset distal threshold increased by a preset offset; when the scanning movement direction indicates scanning from far to near, the proximal threshold is the preset proximal threshold decreased by a preset offset.

[0145] In some embodiments, the above device includes a first scanning module, configured to identify the currently acquired image to obtain a plurality of marked points; the plurality of marked points form a plurality of groups of marked point groups; determine the initial pose of the scanning device based on the stitching result corresponding to the previous frame image of the current image; determine candidate poses corresponding to the plurality of groups of marked point groups respectively, and screen out the candidate poses that match the initial pose from the candidate poses as the target pose; perform marked point stitching based on the marked point group corresponding to the target pose.

[0146] In some embodiments, the first scanning module is further configured to search for a plurality of bright pixel points in the current image row by row, and determine the connected bright pixel points among the plurality of bright pixel points as bright patches; for any bright patch, when the targeted bright patch meets the first determination condition, determine the targeted bright patch as a marked point.

[0147] In some embodiments, the above device includes a second scanning module, configured to perform downsampling processing on the currently acquired image to obtain a downsampled image; perform marked point recognition on the downsampled image to obtain target marked points, and perform marked point stitching based on the target marked points.

[0148] In some embodiments, the second scanning module is further configured to perform marked point recognition on the downsampled image to obtain a plurality of candidate marked points; determine the marked point parameters of each of the plurality of candidate marked points; based on the marked point parameters, screen out the marked points that meet the second determination condition from the plurality of candidate marked points as the target marked points.

[0149] In some embodiments, the marked point parameters include roundness, common perpendicular distance, and radius; the second determination condition includes that the roundness exceeds the roundness threshold, the common perpendicular distance is less than the common perpendicular distance threshold, and the difference between the radius and the preset radius does not exceed the preset percentage.

[0150] In some embodiments, the determination module is further configured to determine the rigid body transformation parameters between adjacent frames based on the scanning data; determine the scanning distance and the scanning movement direction between the scanning device and the target object based on the rigid body transformation parameters.

[0151] In some embodiments, the determination module is further configured to determine scanning parameters between the scanning device and the target object based on the scanning data; the scanning parameters at least include the frame rate; the switching module is further configured to, when the frame rate decreases to the distal frame rate threshold in the case where the scanning movement direction indicates scanning from near to far, switch to the first scanning mode for scanning; and in the case where the scanning movement direction indicates scanning from far to near, when the frame rate increases to the proximal frame rate threshold, switch to the second scanning mode for scanning.

[0152] In some embodiments, the scanning parameters further include the recognition rate; the switching module is further configured to, when the recognition rate decreases to the distal recognition rate threshold in the case where the scanning movement direction indicates scanning from near to far, switch to the first scanning mode for scanning; and in the case where the scanning movement direction indicates scanning from far to near, when the recognition rate increases to the proximal recognition rate threshold, switch to the second scanning mode for scanning.

[0153] The three-dimensional scanning device in the embodiments of the present application may be a scanning device or a component in the scanning device, such as an integrated circuit or a chip.

[0154] The scanning device in the embodiments of the present application may be a device with an operating system. The operating system may be the Microsoft (Windows) operating system, the Android operating system, the IOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.

[0155] The scanning device provided in the embodiments of the present application can implement each process implemented in the method embodiments. To avoid repetition, it will not be described in detail here.

[0156] In some embodiments, as Figure 8 shown, the embodiments of the present application further provide a scanning device 800, including a processor 801, a memory 802, and a computer program stored on the memory 802 and executable on the processor 801. When the program is executed by the processor 801, it implements each process of the above method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described in detail here.

[0157] The embodiments of the present application further provide a non-transitory computer-readable storage medium. A computer program is stored on the non-transitory computer-readable storage medium. When the computer program is executed by a processor, it implements each process of the above three-dimensional scanning method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described in detail here.

[0158] Wherein, the processor is the processor in the computer device in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disk, or optical disc, etc.

[0159] The embodiment of the present application further provides a computer program product, including a computer program, which implements the above three-dimensional scanning method when executed by a processor.

[0160] The processor is the processor in the computer device in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk, or an optical disc, etc.

[0161] The embodiment of the present application further provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above embodiment of the three-dimensional scanning method and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0162] It should be understood that the chip mentioned in the embodiment of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.

[0163] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including one..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the methods and devices in the embodiments of the present application are not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0164] Through the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.

[0165] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them fall within the protection scope of the present application.

[0166] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.

[0167] If there is no special instruction, all the embodiments and optional embodiments of the present application can be combined with each other to form new technical solutions.

[0168] If there is no special instruction, all the technical features and optional technical features of the present application can be combined with each other to form new technical solutions.

[0169] If there is no special instruction, all the steps of the present application can be carried out in sequence or randomly, and preferably in sequence. For example, the method includes steps (a) and (b), which means that the method can include steps (a) and (b) carried out in sequence, or can also include steps (b) and (a) carried out in sequence. For example, it is mentioned that the method may further include step (c), which means that step (c) can be added to the method in any order. For example, the method can include steps (a), (b) and (c), or can also include steps (a), (c) and (b), or can also include steps (c), (a) and (b), etc.

[0170] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A three-dimensional scanning method, characterized in that: The method comprises: Collecting scan data of the target object; Based on the scanning data, determining a scanning distance and a scanning motion direction from the target object; In the case where the scanning motion direction indicates scanning from near to far, when the scanning distance reaches the far-end threshold, switching to the first scanning mode for scanning; In the case where the scanning movement direction indicates scanning from far to near, when the scanning distance reaches the near-end threshold, switching to the second scanning mode for scanning; wherein, the first scanning mode and the second scanning mode have different recognition methods for the captured images, and / or, the first scanning mode and the second scanning mode have different processing methods for performing three-dimensional reconstruction on the captured images.

2. The method according to claim 1, characterized in that At least one of the far-end threshold and the near-end threshold is updated with the scanning motion direction; wherein, when the scanning motion direction indicates scanning from near to far, the far-end threshold is the preset far-end threshold plus a preset offset; and when the scanning motion direction indicates scanning from far to near, the near-end threshold is the preset near-end threshold minus a preset offset.

3. The method according to claim 1 or 2, characterized in that: The first scanning mode includes: Identify the collected current image to obtain a plurality of marking points; the plurality of marking points form a plurality of marking point groups; Determining an initial position and posture of the scanning device based on a stitching result corresponding to a previous frame image of the current image; Determine candidate poses corresponding to the multiple groups of marker points respectively, and select a candidate pose matching the initial pose from among the candidate poses as a target pose; Mark point splicing is performed based on the mark point group corresponding to the target posture.

4. The method according to claim 3, characterized in that The current image acquired by the recognition is obtained to obtain a plurality of marking points, including: Searching for a plurality of bright spot pixels in the current image row by row, and determining connected bright spot pixels among the plurality of bright spot pixels as bright spot patches; For any bright spot patch, when the bright spot patch satisfies the first determination condition, the bright spot patch is determined to be a marking point.

5. The method according to claim 1 or 2, characterized in that: The second scanning mode includes: Downsampling the acquired current image to obtain a downsampled image; Mark point recognition is performed on the downsampled image to obtain target mark points, and mark point splicing is performed based on the target mark points.

6. The method according to claim 5, characterized in that The step of performing marker point recognition on the downsampled image to obtain target marker points includes: Performing marker point recognition on the downsampled image to obtain a plurality of candidate marker points; Determining a marking point parameter of each of the plurality of candidate marking points; Based on the marking point parameters, a marking point satisfying a second determination condition is selected from the plurality of candidate marking points as a target marking point.

7. The method according to claim 6, characterized in that The marking point parameters include roundness, common perpendicular distance and radius; the second judgment condition includes that the roundness exceeds the roundness threshold, the common perpendicular distance is less than the common perpendicular distance threshold, and the difference between the radius and the preset radius does not exceed the preset percentage.

8. The method according to claim 1, characterized in that The step of determining a scanning distance and a scanning motion direction from the target object based on the scanning data includes: Based on the scan data, determining rigid body transformation parameters between adjacent frames; Based on the rigid body transformation parameters, a scanning distance and a scanning motion direction between the scanning device and the target object are determined.

9. The method according to claim 1, characterized in that: The method further comprises: Based on the scan data, determining a scan parameter between the scanning device and the target object; the scan parameter includes at least a frame rate; In the case where the scanning motion direction indicates scanning from near to far, when the frame rate decreases to a far-end frame rate threshold, switching to the first scanning mode for scanning; In the case where the scanning motion direction indicates scanning from far to near, when the frame rate increases to a near-end frame rate threshold, the scanning is switched to the second scanning mode.

10. The method according to claim 1 or 9, characterized in that: The scanning parameters also include a recognition rate; the method also includes: In the case where the scanning motion direction indicates scanning from near to far, when the recognition rate decreases to a far-end recognition rate threshold, switching to the first scanning mode for scanning; In the case where the scanning motion direction indicates scanning from far to near, when the recognition rate increases to a near-end recognition rate threshold, the scanning is switched to the second scanning mode.

11. A three-dimensional scanning device, characterized in that: The device comprises: An acquisition module, used for acquiring scanning data of a target object; A determination module, configured to determine a scanning distance and a scanning motion direction from the target object based on the scanning data; A switching module, configured to switch to a first scanning mode for scanning when the scanning distance reaches a far-end threshold, in the case where the scanning motion direction indicates scanning from near to far; The switching module is also used to switch to the second scanning mode for scanning when the scanning distance reaches a near-end threshold when the scanning movement direction indicates scanning from far to near; wherein the first scanning mode and the second scanning mode have different recognition methods for the captured images, and / or the first scanning mode and the second scanning mode have different processing methods for performing three-dimensional reconstruction of the captured images.

12. A scanning device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the three-dimensional scanning method according to any one of claims 1 to 10 is implemented.

13. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the three-dimensional scanning method according to any one of claims 1 to 10 is implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the three-dimensional scanning method according to any one of claims 1 to 10 is implemented.

15. A chip, characterized in that: The chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the three-dimensional scanning method according to any one of claims 1-10.