Three-dimensional reconstruction method and apparatus

By using a pre-calibrated binocular camera to acquire and match line segment and stripe images in structured light 3D reconstruction, the problem of low scanning efficiency caused by small encoding capacity is solved, and more efficient 3D reconstruction is achieved.

WO2025223567A1PCT designated stage Publication Date: 2025-10-30SHINING 3D TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/091406
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-26
Filing Date
2025-04-27
Publication Date
2025-10-30

AI Technical Summary

Technical Problem

In existing technologies, the small encoding capacity of symbols in structured light 3D reconstruction leads to low scanning efficiency.

Method used

A first and second image are acquired using a pre-calibrated binocular camera. Three-dimensional reconstruction is performed by matching the line segments and stripes projected onto the surface of the object being measured. The line segments and stripes are arranged according to a predetermined distribution rule, including colored stripes and binarized stripes, with random lengths. The matching parameters of the line segments and stripes are used to obtain encoded information.

Benefits of technology

It improves scanning efficiency by recording more encoded information through line segments and stripes, thus solving the problem of low scanning efficiency caused by small encoding capacity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025091406_30102025_PF_FP_ABST
    Figure CN2025091406_30102025_PF_FP_ABST
Patent Text Reader

Abstract

A three-dimensional reconstruction method and apparatus. The method comprises: acquiring a first image and a second image, the first image and the second image being obtained by a pre-calibrated binocular camera separately acquiring images of a projection pattern, the images of the projection pattern being formed by a projection pattern projected onto a surface of a measured object, the projection pattern being formed by arranging line segment stripes according to a predetermined distribution rule, and the line segment stripes at least comprising: colored stripes or binarized stripes, the lengths of the line segment stripes being random (S202); sequentially matching the line segment stripes in the first image and the second image (S204); and performing three-dimensional reconstruction of the measured object on the basis of line segment stripes successfully matched in the first image and the second image (S206).
Need to check novelty before this filing date? Find Prior Art

Description

Three-dimensional reconstruction method and device

[0001] Cross-reference

[0002] This application claims priority to Chinese Patent Application No. 202410515673.4, filed on April 26, 2024, entitled “Three-dimensional reconstruction method and apparatus”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of computer technology, and more specifically, to a three-dimensional reconstruction method and apparatus. Background Technology

[0004] Structured light 3D reconstruction technology is a 3D reconstruction technique that projects an optically encoded pattern onto the surface of a measured object and recovers the object's 3D surface data through the acquired deformed pattern. It features high efficiency and anti-interference capabilities, and is widely used in various 3D reconstruction scenarios. Currently, related technologies employ two methods: one uses circular symbol encoding, utilizing the relative displacement relationship of neighboring symbols for decoding; the other uses matching between image blocks to obtain 3D data. The former method has a small symbol encoding capacity, can only reconstruct sparse symbol points, has limited data per frame, and low scanning efficiency; the latter method uses image block matching, resulting in lower accuracy.

[0005] There is currently no effective solution to the above problems. Summary of the Invention

[0006] This application provides a three-dimensional reconstruction method and apparatus to at least solve the technical problem of low scanning efficiency caused by the small encoding capacity of code elements in related technologies.

[0007] According to one aspect of the embodiments of this application, a three-dimensional reconstruction method is provided, comprising: acquiring a first image and a second image, wherein the first image and the second image are obtained by acquiring images of a projection pattern respectively by a pre-calibrated binocular camera, the image of the projection pattern is formed by a projection pattern projected onto the surface of a measured object, the projection pattern is composed of line segments and stripes arranged according to a predetermined distribution rule, the line segments and stripes include at least: colored stripes or binarized stripes, and the length of the line segments and stripes is random; sequentially matching the line segments and stripes in the first image and the second image; and performing three-dimensional reconstruction of the measured object based on the successfully matched line segments and stripes in the first image and the second image.

[0008] Optionally, the projection pattern is determined by: determining the type of line segment stripes, wherein the colored stripes include at least one of the following: colored straight line stripes, colored curved stripes, and colored polygonal line stripes, and the binarized stripes include at least one of the following: binarized straight line stripes, binarized curved stripes, and binarized polygonal line stripes; arranging the line segment stripes according to a predetermined distribution rule to form the projection pattern, wherein the length of the line segment stripes is random.

[0009] Optionally, the projected pattern is composed of line segments arranged according to a predetermined distribution rule, including: determining a first distribution rule for the line segments from the predetermined distribution rule, wherein the first distribution rule includes at least one of the following: the horizontal spacing between adjacent horizontal line segments is equal, the horizontal spacing between adjacent horizontal line segments increases sequentially at equal intervals, and the horizontal spacing between adjacent horizontal line segments is randomly selected from a predetermined distance range; determining a second distribution rule and a third distribution rule for the line segments from the predetermined distribution rule, wherein the second distribution rule includes at least one of the following: the vertical distance between adjacent vertical line segments is equal, the vertical distance between adjacent vertical line segments increases sequentially at equal intervals, and the horizontal spacing between adjacent vertical line segments is randomly selected from a predetermined distance range; and determining a second distribution rule and a third distribution rule for the line segments from the predetermined distribution rule, wherein the second distribution rule includes at least one of the following: the vertical distance between adjacent vertical line segments is equal, the vertical distance between adjacent vertical line segments increases sequentially at equal intervals, and the vertical distance between adjacent vertical line segments increases sequentially at equal intervals. The equidistant increasing and the vertical distance between adjacent longitudinal line segments are randomly selected within a preset distance range. The third distribution rule includes: adjacent transverse line segments are arranged periodically in a preset order, wherein the number of adjacent transverse line segments in each period is a preset number, and each period contains line segments of multiple colors. The preset order is determined according to the color of the line segments. When the line segments are colored straight line segments, the line segments are arranged according to the first, second, and third distribution rules to form a projection pattern. When the line segments are binary straight line segments, the line segments are arranged according to the first and second distribution rules to form a projection pattern.

[0010] Optionally, arranging the line segments into a projection pattern according to a predetermined distribution rule includes: when the line segments are colored polygonal line segments, determining a fourth distribution rule for the line segments from the predetermined distribution rules, wherein the fourth distribution rule includes at least one of the following: the polygonal line segments are distributed longitudinally from left to right, or the polygonal line segments are distributed at a predetermined angle, wherein the included angle of the polygonal line segments is randomly selected within a predetermined angle range or the included angle of all polygonal line segments is equal; arranging the line segments into a projection pattern according to the first, second, third, and fourth distribution rules; and when the line segments are binary polygonal line segments, arranging the line segments into a projection pattern according to the first, second, and fourth distribution rules.

[0011] Optionally, arranging the line segment stripes according to a predetermined distribution rule to form a projection pattern includes: when the line segment stripes are colored curved line segment stripes, determining a fifth distribution rule for the line segment stripes from the predetermined distribution rules, wherein the fifth distribution rule includes at least one of the following: the curved line segments are distributed longitudinally from left to right, or the curved line segments are distributed at a predetermined angle, wherein the radii of the curved line segments are randomly selected within a predetermined radii range or all curved line segments have equal radii; arranging the line segment stripes according to the first, second, third, and fifth distribution rules to form a projection pattern; and when the line segment stripes are binary curved line segment stripes, arranging the line segment stripes according to the first, second, and fifth distribution rules to form a projection pattern.

[0012] Optionally, matching the line segments and stripes in the first image and the second image sequentially includes: when the line segments and stripes are colored straight line segments, matching the line segments and stripes in the first image and the second image sequentially according to a preset first matching method, wherein the preset first matching method includes: matching the line segments and stripes in the first image and the second image sequentially according to the arrangement order of the colored straight line segments; when the line segments and stripes are colored curved line segments or colored polyline segments, matching the line segments and stripes in the first image and the second image sequentially using a preset first matching method or a preset second matching method, wherein the preset second matching method includes: obtaining the center point of the line segments and stripes, and matching the line segments and stripes in the first image and the second image sequentially according to the center point of the line segments and stripes; when the line segments and stripes are binarized curved line segments or binarized polyline segments, matching the line segments and stripes in the first image and the second image sequentially using a preset second matching method.

[0013] Optionally, the line segments and stripes in the first image and the second image are matched sequentially using either a preset first matching method or a preset second matching method, including: randomly selecting one preset matching method from the two preset matching methods to perform a first matching of the line segments and stripes in the first image and the second image sequentially to obtain a first matching result; selecting another preset matching method from the two preset matching methods to perform a second matching of the line segments and stripes in the first image and the second image sequentially to obtain a second matching result; selecting the matching result that passes verification from the first matching result and the second matching result as the final matching result; if both the first matching result and the second matching result pass verification, determining whether the first matching result and the second matching result are consistent, and if both are consistent, determining the first matching result as the final matching result.

[0014] Optionally, obtaining the center point of the line segment stripes includes: when the line segment stripes in the first image and the second image are matched sequentially using a preset second matching method, detecting the edges of the line segment stripes in the first image and the second image to obtain a binarized edge image or center line, wherein the edge pixels in the edge image are white and the background in the edge image is black or the opposite, and the edge pixels are used to represent the edge trajectory of the line segment stripes; obtaining the target matrix of each edge pixel, wherein the target matrix is ​​used to characterize the curvature information of the edge pixels; and determining the edge line or center line of the line segment stripes based on the target matrix.

[0015] Optionally, determining the center point of the line segment stripe based on the target matrix includes: obtaining the feature values ​​of the target matrix corresponding to all edge pixels in each line segment stripe; determining the smallest feature value among all feature values ​​corresponding to the line segment stripe as the target feature value, and obtaining the target feature vector corresponding to the target feature value; obtaining the edge pixel coordinates in the direction of the target feature vector, and determining them as the target edge pixel coordinates; and determining the center point of the line segment stripe based on the target edge pixel coordinates.

[0016] Optionally, obtaining the center point of the line segment stripe includes: obtaining the gradient of all edge pixels in each line segment stripe; selecting the edge pixel with the largest gradient from all edge pixels as the target pixel; and determining the sub-pixel center of the target pixel as the center point of the line segment stripe.

[0017] Optionally, the method further includes: after determining the center point of the line segment stripe, removing line segment stripes whose curvature is not within a preset curvature range.

[0018] According to another aspect of the embodiments of this application, a three-dimensional reconstruction apparatus is also provided, comprising: an acquisition module configured to acquire a first image and a second image, wherein the first image and the second image are obtained by acquiring target images respectively by a pre-calibrated binocular camera, the target image being formed by a projection pattern projected onto the surface of the object being measured, the projection pattern being composed of line segments and stripes arranged according to a predetermined distribution rule, the line segments and stripes including at least one of the following: colored stripes or binarized stripes, the length of the line segments and stripes being random; a matching module configured to sequentially match the line segments and stripes in the first image and the second image; and a reconstruction module configured to complete the three-dimensional reconstruction of the object being measured based on the mutually matched line segments and stripes in the first image and the second image.

[0019] According to another aspect of the embodiments of this application, a three-dimensional reconstruction system is also provided, comprising: at least two image acquisition devices, a projection device, and a first processor; the projection device is configured to project a projection pattern onto the surface of a measured object, wherein the projection pattern is composed of line segments arranged according to a predetermined distribution rule, and the line segments include at least one of the following: colored stripes or binarized stripes, and the length of the line segments is random; at least two image acquisition modules are configured to acquire images of the projection pattern from the surface of the measured object to obtain a first image and a second image; the first processor is configured to sequentially match the line segments in the first image and the second image; and to perform three-dimensional reconstruction of the measured object based on the successfully matched line segments in the first image and the second image.

[0020] According to another aspect of the embodiments of this application, a projection device is also provided, configured to project a projection pattern onto the surface of a measured object. The projection pattern is composed of line segments arranged according to a predetermined distribution rule, and the line segments include at least one of the following: colored stripes or binarized stripes.

[0021] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory configured to store program instructions; and a processor connected to the memory, configured to perform the program instructions that perform the following functions: acquiring a first image and a second image, wherein the first image and the second image are obtained by acquiring target images respectively by a pre-calibrated binocular camera, the target image is formed by a projection pattern projected onto the surface of the object being measured, the projection pattern is composed of line segments and stripes arranged according to a predetermined distribution rule, the line segments and stripes include at least one of the following: colored stripes or binarized stripes, the length of the line segments and stripes is random; sequentially matching the line segments and stripes in the first image and the second image; and completing the three-dimensional reconstruction of the object being measured based on the mutually matched line segments and stripes in the first image and the second image.

[0022] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-described three-dimensional reconstruction method by running the computer program.

[0023] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the above-described method.

[0024] In this embodiment, a first image and a second image are acquired. The first image and the second image are obtained by acquiring images of a projection pattern from a pre-calibrated binocular camera. The projection pattern is formed by a projection pattern projected onto the surface of the object being measured. The projection pattern is composed of line segments and stripes arranged according to a predetermined distribution rule. The line segments and stripes include at least colored stripes or binarized stripes, and the length of the line segments and stripes is random. The line segments and stripes in the first image and the second image are matched sequentially. The object being measured is reconstructed in three dimensions based on the successfully matched line segments and stripes in the first image and the second image. By obtaining matching parameters through the projection pattern composed of line segments and stripes, the purpose of recording more encoded information through line segments and stripes is achieved, thereby improving the scanning efficiency and solving the technical problem of low scanning efficiency caused by the small encoding capacity of code elements in related technologies. Attached Figure Description

[0025] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0026] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a three-dimensional reconstruction method according to an embodiment of this application;

[0027] Figure 2 is a flowchart of a three-dimensional reconstruction method according to an embodiment of this application;

[0028] Figure 3 is a schematic diagram of a projection pattern according to an embodiment of this application;

[0029] Figure 4 is a schematic diagram of a color stripe encoding sequence according to an embodiment of this application;

[0030] Figure 5 is a schematic diagram of another projection pattern according to an embodiment of this application;

[0031] Figure 6 is a schematic diagram of another projection pattern according to an embodiment of this application;

[0032] Figure 7 is a structural diagram of a three-dimensional reconstruction device according to an embodiment of this application. Detailed Implementation

[0033] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0035] The three-dimensional reconstruction method embodiments provided in this application can be executed in mobile terminals, computer terminals, or similar computing devices. Figure 1 shows a hardware structure block diagram of a computer terminal for implementing the three-dimensional reconstruction method. As shown in Figure 1, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 configured to store data, and a transmission module 106 configured for communication functions. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that the structure shown in Figure 1 is only illustrative and does not limit the structure of the above-described electronic device. For example, the computer terminal 10 may also include more or fewer components than shown in Figure 1, or have a different configuration than shown in Figure 1.

[0036] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be implemented wholly or partially as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be wholly or partially integrated into any other element in the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0037] The memory 104 can be configured to store software programs and modules for application software, such as the program instructions / data storage device corresponding to the 3D reconstruction method in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned 3D reconstruction method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0038] The transmission module 106 is configured to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a Radio Frequency (RF) module, configured to communicate with the Internet wirelessly.

[0039] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.

[0040] It should be noted that, in some alternative embodiments, the computer device shown in FIG1 may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be pointed out that FIG1 is merely one example of a specific embodiment and is intended to illustrate the types of components that may be present in the aforementioned computer device.

[0041] In the above operating environment, this application provides an embodiment of a three-dimensional reconstruction method. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than that shown here.

[0042] Figure 2 is a flowchart of a three-dimensional reconstruction method according to an embodiment of this application. As shown in Figure 2, the method includes the following steps:

[0043] Step S202: Acquire the first image and the second image, wherein the first image and the second image are obtained by acquiring images of the projection pattern by a pre-calibrated binocular camera respectively. The image of the projection pattern is formed by the projection pattern projected onto the surface of the object being measured. The projection pattern is composed of line segments and stripes arranged according to a pre-determined distribution rule. The line segments and stripes include at least: colored stripes or binarized stripes, and the length of the line segments and stripes is random.

[0044] In step S202 above, a binocular camera refers to a camera set on both sides of the object being measured, for example: a left camera set on the left side and a right camera set on the right side.

[0045] Step S204: Match the line segments and stripes in the first image and the second image sequentially;

[0046] In step S204 above, there are multiple ways to match line segments and stripes, such as matching by using feature points on the line segments and stripes.

[0047] Step S206: Perform three-dimensional reconstruction of the object under test based on the successfully matched line segments and stripes in the first and second images.

[0048] The three-dimensional reconstruction method in steps S202 to S206 above employs the acquisition of a first image and a second image. The first and second images are obtained by pre-calibrated binocular cameras acquiring images of a projection pattern. The projection pattern is formed by a projection pattern projected onto the surface of the object being measured. The projection pattern consists of line segments arranged according to a predetermined distribution rule. The line segments include at least colored or binarized stripes, and the length of the line segments is random. The line segments in the first and second images are matched sequentially. Based on the successfully matched line segments in the first and second images, the object being measured is reconstructed in three dimensions. By obtaining matching parameters through the projection pattern composed of line segments, the method achieves the goal of recording more encoded information through the line segments, thereby improving scanning efficiency and solving the technical problem of low scanning efficiency due to the small encoding capacity of code elements in related technologies. The following is a detailed explanation.

[0049] In one alternative approach, the line type in the projected pattern includes at least one of the following: colored stripes, binarized stripes, such as a projected pattern composed of colored stripes, or a projected pattern composed of binarized stripes.

[0050] It is understandable that the length of the line segments and stripes is random, and all the line segments and stripes in the projected pattern have the same length, or as shown in Figure 3, the lengths of the line segments and stripes in the projected pattern are different and randomly distributed.

[0051] It should be noted that the process of determining the projection pattern consists of two steps. The first step is to determine the type of line segment stripes. Among them, colored stripes include at least one of the following: colored straight line stripes, colored curved stripes, and colored polygonal line stripes. Binarized stripes include at least one of the following: binarized straight line stripes, binarized curved stripes, and binarized polygonal line stripes. The second step is to arrange the line segment stripes according to a predetermined distribution rule to form the projection pattern.

[0052] Specifically, a first distribution rule for line segment stripes is determined from a predetermined distribution rule. This first distribution rule includes at least one of the following: equal horizontal spacing between adjacent horizontal line segment stripes; sequentially increasing horizontal spacing between adjacent horizontal line segment stripes; and randomly selecting the horizontal spacing between adjacent horizontal line segment stripes from a predetermined distance range. A second and third distribution rule for line segment stripes are determined from the predetermined distribution rule. The second distribution rule includes at least one of the following: equal vertical distance between adjacent vertical line segment stripes; sequentially increasing vertical distance between adjacent vertical line segment stripes; and randomly selecting the vertical distance between adjacent vertical line segment stripes from a predetermined distance range. The third distribution rule includes: adjacent horizontal line segment stripes are arranged periodically in a predetermined order. The number of adjacent horizontal line segment stripes in each period is a predetermined number, and each period contains line segment stripes of multiple colors. The predetermined order is determined based on the color of the line segment stripes. When the line segment stripes are colored straight line segment stripes, the line segment stripes are arranged according to the first, second, and third distribution rules to form a projection pattern. When the line segment stripes are binary straight line segment stripes, the line segment stripes are arranged according to the first and second distribution rules to form a projection pattern.

[0053] When the line segments are colored stripes, color signals are used as encoding information to help improve the accuracy of stripe decoding. This solves the problem of missing 3D data due to optical blind spots caused by the angle between the two cameras, resulting in the loss of some single-camera code value information. For example, decoding can be performed using color information from the neighborhood. Colored stripes can be composed of multiple different colors, including RGB colors such as red, blue, and green, or blue and green, or other colors. They can also be combinations of colors like RB, RG, and BG to create orange, yellow, cyan, white, and black.

[0054] In one embodiment, taking an example of 8 horizontally arranged line segments within a cycle, the 8 line segments within that cycle are color-coded, as shown in Figure 4. The preset order is RGBRBGGB (red, green, blue, red, blue, green, green, blue). Corresponding encoding values ​​can be generated in the computer, for example: red is 100, green is 010, and blue is 001.

[0055] When acquiring stripe codes before 3D reconstruction, stripes can be identified regardless of various adverse environmental conditions such as object boundaries, occlusion, and reflections, thus avoiding encoding ambiguity. Designing this encoded image as a cycle allows decoding and reconstruction to be completed with just one simple color space image. This shortens the image sequence acquisition time required for a single frame of 3D data during dynamic scanning, reduces the complexity and computational cost of encoding and decoding, and avoids problems such as algorithm complexity, time consumption, and decoding errors caused by too many color types.

[0056] To improve scanning efficiency during 3D reconstruction, as shown in Figures 5 and 6, the projection pattern can be composed of either broken line segments or curved line segments.

[0057] When the line segment stripes are colored broken line segment stripes, a fourth distribution rule for the line segment stripes is determined from a predetermined distribution rule. The fourth distribution rule includes at least one of the following: the broken line segments are distributed longitudinally from left to right, or the broken line segments are distributed at a predetermined angle. The included angle of the broken line segments is randomly selected within the predetermined angle range or the included angle of all broken line segments is equal.

[0058] The line segments are arranged according to the first, second, third, and fourth distribution rules to form a projection pattern; when the line segments are binary broken line segments, the line segments are arranged according to the first, second, and fourth distribution rules to form a projection pattern.

[0059] When the line segment stripes are colored curved line segment stripes, a fifth distribution rule for the line segment stripes is determined from a predetermined distribution rule. The fifth distribution rule includes at least one of the following: the curved line segments are distributed longitudinally from left to right; the curved line segments are distributed at a predetermined angle; the radii of the zigzag curve segments are randomly selected within a predetermined radii range or all the curved line segments have equal radii. The line segment stripes are arranged according to the first, second, third, and fifth distribution rules to form a projection pattern. When the line segment stripes are binary curved line segment stripes, the line segment stripes are arranged according to the first, second, and fifth distribution rules to form a projection pattern.

[0060] After a predetermined projection pattern is projected onto the surface of the object being measured, an image of the projection pattern is formed. A binocular camera captures the image of the projection pattern to obtain a first image and a second image. Then, the line segments and stripes in the first and second images are matched. If the line segments and stripes are colored straight lines, the line segments and stripes in the first and second images are matched sequentially according to a preset first matching method. The preset first matching method includes: matching the line segments and stripes in the first and second images sequentially according to the arrangement order of the colored straight lines and stripes; if the line segments and stripes are colored curved lines or colored polygonal lines, the line segments and stripes in the first and second images are matched sequentially using either a preset first matching method or a preset second matching method. The preset second matching method includes: obtaining the center point of the line segments and stripes, and matching the line segments and stripes in the first and second images sequentially based on the center point of the line segments and stripes; if the line segments and stripes are binarized curved lines or binarized polygonal lines, the line segments and stripes in the first and second images are matched sequentially using a preset second matching method.

[0061] During the matching process, one preset matching method can be randomly selected from two preset matching methods to perform a first matching of the line segments and stripes in the first image and the second image in sequence, resulting in a first matching result; another preset matching method can be selected from the two preset matching methods to perform a second matching of the line segments and stripes in the first image and the second image in sequence, resulting in a second matching result; the matching result that passes verification is selected from the first matching result and the second matching result and determined as the final matching result; if both the first matching result and the second matching result pass verification, it is determined whether the first matching result and the second matching result are consistent; if both are consistent, the first matching result is determined as the final matching result.

[0062] For example, the first match uses the first preset matching method, and the second match uses the second preset matching method. In an optional method, if the first match result fails verification, the second match result is used as the final match result.

[0063] When the line segments and stripes in the first and second images are matched sequentially using a preset second matching method, the center point of the line segments and stripes can be obtained in the following way: detect the edges of the line segments and stripes in the first and second images to obtain a binarized edge image or center line. The edge pixels in the edge image are white, and the background in the edge image is black or the opposite. The edge pixels are set to represent the edge trajectory of the line segments and stripes; obtain the target matrix for each edge pixel. The target matrix is ​​set to represent the curvature information of the edge pixels; determine the edge line or center line of the line segments and stripes based on the target matrix.

[0064] It should be noted that edge detection algorithms, such as edge detectors, can be used to detect the edges of curved and polyline segments in an image. This generates a binary edge image, where edge pixels are white and the background is black. The target matrix can be a Hessian matrix, a 2x2 matrix used to describe the second-order gradient information of the line segments in the image.

[0065] The process of determining the center point of a line segment stripe using the target matrix is ​​as follows: obtain the feature values ​​of the target matrix corresponding to all edge pixels in each line segment stripe; determine the smallest feature value among all feature values ​​corresponding to the line segment stripe as the target feature value, and obtain the target feature vector corresponding to the target feature value; obtain the edge pixel coordinates in the direction of the target feature vector, and determine them as the target edge pixel coordinates; determine the center point of the line segment stripe based on the target edge pixel coordinates.

[0066] Specifically, for each edge pixel, its eigenvalues ​​are used to determine whether it is part of a curve or polyline segment. Typically, a curve or polyline segment has at least one very small eigenvalue, while another larger eigenvalue is close to zero. The eigenvector corresponding to the very small eigenvalue is found; this vector represents the normal direction of the curve or polyline segment. The position of the stripe centerline can be determined based on the edge pixel location and the eigenvector along the normal direction. This can be achieved by calculating the pixel coordinates along the eigenvector direction.

[0067] In another alternative approach, the center point of the line segment stripe can be obtained by: obtaining the gradient of all edge pixels in each line segment stripe; selecting the edge pixel with the largest gradient from all edge pixels as the target pixel; and determining the sub-pixel center of the target pixel as the center point of the line segment stripe.

[0068] Determine whether the eigenvalues ​​satisfy the conditions for a curve or a broken line segment. Generally, the eigenvalues ​​of a curve should be close to zero, and one of them should be greater than zero, while the eigenvalues ​​of a broken line segment should have one that is much larger than the other.

[0069] After determining the center points of all line segments, the center lines formed by the extracted center points can be post-processed, such as removing line segments whose curvature is not within the preset curvature range, removing unnecessary branches, or smoothing the center lines to obtain more accurate and consistent results.

[0070] Figure 7 is a structural diagram of a three-dimensional reconstruction device according to an embodiment of this application. As shown in Figure 7, the device includes:

[0071] The acquisition module 70 is configured to acquire a first image and a second image, wherein the first image and the second image are obtained by acquiring target images by a pre-calibrated binocular camera respectively. The target image is formed by a projection pattern projected onto the surface of the object being measured. The projection pattern is composed of line segments and stripes arranged according to a predetermined distribution rule. The line segments and stripes include at least one of the following: colored stripes or binarized stripes, and the length of the line segments and stripes is random.

[0072] The matching module 72 is configured to match the line segments and stripes in the first image and the second image sequentially.

[0073] The reconstruction module 74 is configured to complete the three-dimensional reconstruction of the object under test based on the matching line segments and stripes in the first and second images.

[0074] The acquisition module 70 of the above-mentioned three-dimensional reconstruction device includes: a determination submodule, configured to determine the type of line segment stripes, wherein the colored stripes include at least one of the following: colored straight line stripes, colored curved stripes, and colored polyline stripes, and the binarized stripes include at least one of the following: binarized straight line stripes, binarized curved stripes, and binarized polyline stripes; and the line segment stripes are arranged according to a predetermined distribution rule to form a projection pattern.

[0075] The determination submodule includes: a first determination unit, configured to determine a first distribution rule for line segment stripes from a predetermined distribution rule, wherein the first distribution rule includes at least one of the following: the horizontal spacing between adjacent horizontal line segment stripes is equal, the horizontal spacing between adjacent horizontal line segment stripes increases sequentially at equal intervals, and the horizontal spacing between adjacent horizontal line segment stripes is randomly selected from a preset distance range; and a second distribution rule and a third distribution rule for line segment stripes are determined from the predetermined distribution rule, wherein the second distribution rule includes at least one of the following: the vertical distance between adjacent vertical line segment stripes is equal, the vertical distance between adjacent vertical line segment stripes increases sequentially at equal intervals, and the vertical distance between adjacent vertical line segment stripes increases sequentially at equal intervals. The vertical distance between adjacent line segments is randomly selected within a preset distance range. The third distribution rule includes: horizontally adjacent line segments are arranged periodically in a preset order, wherein the number of horizontally adjacent line segments in each period is a preset number, and each period contains line segments of multiple colors. The preset order is determined according to the color of the line segments. When the line segments are colored straight line segments, the line segments are arranged according to the first, second, and third distribution rules to form a projection pattern. When the line segments are binary straight line segments, the line segments are arranged according to the first and second distribution rules to form a projection pattern.

[0076] The first determining unit includes a first determining subunit and a second determining subunit. The first determining subunit is configured to determine a fourth distribution rule for the line segment stripes from a predetermined distribution rule when the line segment stripes are colored broken line segment stripes. The fourth distribution rule includes at least one of the following: the broken line segments are distributed longitudinally from left to right; the broken line segments are distributed at a predetermined angle, wherein the included angle of the broken line segments is randomly selected within a predetermined angle range or the included angle of all broken line segments is equal; the line segment stripes are arranged according to the first distribution rule, the second distribution rule, the third distribution rule, and the fourth distribution rule to form a projection pattern; when the line segment stripes are binary broken line segment stripes, the line segment stripes are arranged according to the first distribution rule, the second distribution rule, and the fourth distribution rule to form a projection pattern.

[0077] The second determining subunit is configured to, when the line segment stripes are colored curved line segment stripes, determine the fifth distribution rule of the line segment stripes from a predetermined distribution rule, wherein the fifth distribution rule includes at least one of the following: the curved segments are distributed longitudinally from left to right, or the curved segments are distributed at a predetermined angle, wherein the radii of the zigzag curve segments are randomly selected within a predetermined radii range or the radii of all curve segments are equal; the line segment stripes are arranged according to the first distribution rule, the second distribution rule, the third distribution rule, and the fifth distribution rule to form a projection pattern; when the line segment stripes are binary curved line segment stripes, the line segment stripes are arranged according to the first distribution rule, the second distribution rule, and the fifth distribution rule to form a projection pattern.

[0078] The matching module 72 includes a matching submodule configured to, when the line segment stripes are colored straight line stripes, sequentially match the line segment stripes in the first image and the second image according to a preset first matching method. The preset first matching method includes: sequentially matching the line segment stripes in the first image and the second image according to the arrangement order of the colored straight line stripes; and, when the line segment stripes are colored curved line stripes or colored polyline stripes, sequentially matching the line segment stripes in the first image and the second image using either the preset first matching method or the preset second matching method. The preset second matching method includes: obtaining the center point of the line segment stripes and sequentially matching the line segment stripes in the first image and the second image according to the center point of the line segment stripes; and, when the line segment stripes are binarized curved line stripes or binarized polyline stripes, sequentially matching the line segment stripes in the first image and the second image using the preset second matching method.

[0079] The matching submodule includes a matching unit, a first acquisition unit, and a second acquisition unit. The matching unit is configured to randomly select one of two preset matching methods to perform a first matching of the line segments and stripes in the first image and the second image sequentially to obtain a first matching result; select another preset matching method to perform a second matching of the line segments and stripes in the first image and the second image sequentially to obtain a second matching result; select the matching result that passes verification from the first matching result and the second matching result to determine the final matching result; if both the first matching result and the second matching result pass verification, determine whether the first matching result and the second matching result are consistent; if both the first matching result and the second matching result are consistent, determine the first matching result as the final matching result.

[0080] The first acquisition unit is configured to detect the edges of the line segments and stripes in the first image and the second image by sequentially matching the line segments and stripes in the first image and the second image using a preset second matching method, and obtain a binarized edge image or center line. The edge pixels in the edge image are white, and the background in the edge image is black or the opposite. The edge pixels are set to represent the edge trajectory of the line segments and stripes. The unit acquires a target matrix for each edge pixel, and the target matrix is ​​set to represent the curvature information of the edge pixels. The unit determines the edge line or center line of the line segments and stripes based on the target matrix.

[0081] The first acquisition unit includes a center point subunit and a removal subunit. The center point subunit is configured to acquire the feature values ​​of the target matrix corresponding to all edge pixels in each line segment stripe; determine the smallest feature value among all feature values ​​corresponding to the line segment stripe as the target feature value, and acquire the target feature vector corresponding to the target feature value; acquire the edge pixel coordinates in the direction of the target feature vector, and determine them as the target edge pixel coordinates; and determine the center point of the line segment stripe based on the target edge pixel coordinates.

[0082] The second acquisition unit is configured to acquire the gradient of all edge pixels in each line segment stripe; select the edge pixel with the largest gradient from all edge pixels and determine it as the target pixel; and determine the sub-pixel center of the target pixel as the center point of the line segment stripe.

[0083] Remove sub-units, configured to remove line segment stripes whose curvature is not within a preset curvature range after determining the center point of the line segment stripe.

[0084] This application embodiment also provides a three-dimensional reconstruction system, including: at least two image acquisition devices, a projection device, and a first processor; the projection device is configured to project a projection pattern onto the surface of a measured object, wherein the projection pattern is composed of line segments arranged according to a predetermined distribution rule, and the line segments include at least one of the following: colored stripes or binarized stripes, and the length of the line segments is random; at least two image acquisition modules are configured to acquire images of the projection pattern from the surface of the measured object to obtain a first image and a second image; the first processor is configured to sequentially match the line segments in the first image and the second image; and to perform three-dimensional reconstruction of the measured object based on the successfully matched line segments in the first image and the second image.

[0085] It should be noted that the above-mentioned three-dimensional reconstruction system is configured to execute the three-dimensional reconstruction method shown in Figure 2. Therefore, the relevant explanations and descriptions in the above-mentioned three-dimensional reconstruction method also apply to this type of three-dimensional reconstruction device, and will not be repeated here.

[0086] The 3D reconstruction method shown in Figure 2 is applicable to various 3D scanners, including dental scanners, facial scanners, industrial scanners, professional scanners, handheld scanners, and fixed scanners. It can reconstruct 3D images of teeth, faces, bodies, industrial products, industrial equipment, cultural relics, artworks, prostheses, medical devices, and buildings. The aforementioned 3D reconstruction system can be understood as a 3D scanner and a first processor connected via wired or wireless means. At least two image acquisition devices and a projection device in the 3D reconstruction system can be understood as 3D scanners, and the first processor can be understood as a mobile phone, tablet, laptop, desktop computer, smart TV, or other similar device. Alternatively, the first processor can be built into the 3D scanner; in this case, the aforementioned 3D reconstruction system is equivalent to a 3D scanner.

[0087] It should be noted that the three-dimensional reconstruction device shown in Figure 7 is configured to perform the three-dimensional reconstruction method shown in Figure 2. Therefore, the relevant explanations and descriptions in the above three-dimensional reconstruction method also apply to this type of three-dimensional reconstruction device, and will not be repeated here.

[0088] This application embodiment also provides a projection device, configured to project a projection pattern onto the surface of a measured object. The projection pattern is composed of line segments and stripes arranged according to a predetermined distribution rule. The line segments and stripes include at least one of the following: colored stripes or binary stripes, and the length of the line segments and stripes is random.

[0089] This application also provides an electronic device, including: a memory configured to store program instructions; and a processor connected to the memory, configured to execute program instructions that perform the following functions: acquiring a first image and a second image, wherein the first image and the second image are obtained by acquiring target images respectively by a pre-calibrated binocular camera, the target image is formed by a projection pattern projected onto the surface of the object being measured, the projection pattern is composed of line segments and stripes arranged according to a predetermined distribution rule, the line segments and stripes include at least one of the following: colored stripes or binarized stripes, the length of the line segments and stripes is random; sequentially matching the line segments and stripes in the first image and the second image; and completing the three-dimensional reconstruction of the object being measured based on the mutually matched line segments and stripes in the first image and the second image.

[0090] It should be noted that the above-mentioned electronic device is configured to execute the three-dimensional reconstruction method shown in Figure 2. Therefore, the relevant explanations and descriptions in the above-mentioned three-dimensional reconstruction method are also applicable to this electronic device, and will not be repeated here.

[0091] This application embodiment also provides a non-volatile storage medium, which includes a stored computer program. The device containing the non-volatile storage medium executes the following three-dimensional reconstruction method by running the computer program: acquiring a first image and a second image, wherein the first image and the second image are obtained by acquiring target images respectively using a pre-calibrated binocular camera. The target image is formed by a projection pattern projected onto the surface of the object being measured. The projection pattern consists of line segments and stripes arranged according to a predetermined distribution rule. The line segments and stripes include at least one of the following: colored stripes or binarized stripes, and the length of the line segments and stripes is random; sequentially matching the line segments and stripes in the first image and the second image; and completing the three-dimensional reconstruction of the object being measured based on the mutually matched line segments and stripes in the first image and the second image.

[0092] It should be noted that the above-mentioned non-volatile storage medium is configured to perform the three-dimensional reconstruction method shown in Figure 2. Therefore, the relevant explanations in the above-mentioned three-dimensional reconstruction method are also applicable to this non-volatile storage medium, and will not be repeated here.

[0093] This application also provides a computer program product, including a computer program, characterized in that the computer program, when executed by a processor, implements the steps of a three-dimensional reconstruction method.

[0094] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0095] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0096] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0097] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0098] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0099] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0100] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application. Industrial applicability

[0101] The technical solution provided in this application embodiment is applicable to the field of three-dimensional reconstruction. In this application embodiment, a first image and a second image are acquired. The first image and the second image are obtained by acquiring images of a projection pattern by a pre-calibrated binocular camera. The projection pattern is formed by a projection pattern projected onto the surface of the object being measured. The projection pattern is composed of line segments and stripes arranged according to a predetermined distribution rule. The line segments and stripes include at least colored stripes or binarized stripes, and the length of the line segments and stripes is random. The line segments and stripes in the first image and the second image are matched sequentially. The object being measured is reconstructed in three dimensions based on the successfully matched line segments and stripes in the first image and the second image. By obtaining matching parameters through the projection pattern composed of line segments and stripes, the purpose of recording more encoded information through line segments and stripes is achieved, thereby improving the scanning efficiency and solving the technical problem of low scanning efficiency caused by the small encoding capacity of code elements in related technologies.

Claims

1. A three-dimensional reconstruction method, comprising: Acquire a first image and a second image, wherein the first image and the second image are obtained by acquiring images of a projection pattern by a pre-calibrated binocular camera, the image of the projection pattern is formed by the projection pattern projected onto the surface of the object being measured, the projection pattern is composed of line segments and stripes arranged according to a predetermined distribution rule, the line segments and stripes include at least: colored stripes or binarized stripes, and the length of the line segments and stripes is random; The line segments and stripes in the first image and the second image are matched sequentially; The object under test is reconstructed in three dimensions based on the line segments and stripes that are successfully matched in the first image and the second image.

2. The method according to claim 1, wherein, The projection pattern is determined in the following way: The type of the line segment stripes is determined, wherein the colored stripes include at least one of the following: colored straight line stripes, colored curved line stripes, and colored polygonal line stripes, and the binarized stripes include at least one of the following: binarized straight line stripes, binarized curved line stripes, and binarized polygonal line stripes; The line segments and stripes are arranged according to a predetermined distribution rule to form the projection pattern.

3. The method according to claim 2, wherein, The projected pattern is composed of line segments and stripes arranged according to a predetermined distribution rule, including: The first distribution rule of the line segment stripes is determined from the predetermined distribution rules, wherein the first distribution rule includes at least one of the following: the horizontal spacing between adjacent horizontal line segment stripes is equal, the horizontal spacing between adjacent horizontal line segment stripes increases sequentially at equal intervals, and the horizontal spacing between adjacent horizontal line segment stripes is randomly selected from a preset distance range; The second and third distribution rules of the line segment stripes are determined from the predetermined distribution rules. The second distribution rule includes at least one of the following: the vertical distance between adjacent vertical line segment stripes is equal; the vertical distance between adjacent vertical line segment stripes increases sequentially at equal intervals; and the vertical distance between adjacent vertical line segment stripes is randomly selected from a preset distance range. The third distribution rule includes: adjacent horizontal line segment stripes are arranged periodically in a preset order. The number of adjacent horizontal line segment stripes in each period is a preset number, and each period contains line segment stripes of multiple colors. The preset order is determined according to the color of the line segment stripes. When the line segment stripes are colored straight line segment stripes, the line segment stripes are arranged according to the first distribution rule, the second distribution rule and the third distribution rule to form the projection pattern; When the line segment stripes are binary straight line segment stripes, the line segment stripes are arranged according to the first distribution rule and the second distribution rule to form the projection pattern.

4. The method according to claim 3, wherein, Arranging the line segments and stripes according to a predetermined distribution rule to form the projection pattern includes: When the line segment stripes are the colored broken line segment stripes, a fourth distribution rule for the line segment stripes is determined from the predetermined distribution rules, wherein the fourth distribution rule includes at least one of the following: the broken line segments are distributed longitudinally from left to right, or the broken line segments are distributed at a predetermined angle, wherein the included angle of the broken line segments is randomly selected within the predetermined angle range or the included angle of all broken line segments is equal; The line segments and stripes are arranged according to the first distribution rule, the second distribution rule, the third distribution rule, and the fourth distribution rule to form the projection pattern; When the line segment stripes are binary broken line segment stripes, the line segment stripes are arranged according to the first distribution rule, the second distribution rule and the fourth distribution rule to form the projection pattern.

5. The method according to claim 3, wherein, Arranging the line segments and stripes according to a predetermined distribution rule to form the projection pattern includes: When the line segment stripes are the colored curved segment stripes, a fifth distribution rule for the line segment stripes is determined from the predetermined distribution rules, wherein the fifth distribution rule includes at least one of the following: the curved segments are distributed longitudinally from left to right, or the curved segments are distributed at a predetermined angle, wherein the radii of the curved segments are randomly selected within a predetermined radii range or the radii of all curved segments are equal. The line segments and stripes are arranged according to the first distribution rule, the second distribution rule, the third distribution rule, and the fifth distribution rule to form the projection pattern; When the line segment stripes are binary curve segment stripes, the line segment stripes are arranged according to the first distribution rule, the second distribution rule and the fifth distribution rule to form the projection pattern.

6. The method according to claim 1, wherein, The line segments and stripes in the first image and the second image are matched sequentially, including: When the line segments are colored straight line segments, the line segments in the first image and the second image are matched sequentially according to a preset first matching method. The preset first matching method includes: matching the line segments in the first image and the second image sequentially according to the arrangement order of the colored straight line segments. When the line segment stripes are colored curved line segment stripes or colored broken line segment stripes, the line segment stripes in the first image and the second image are matched sequentially using the preset first matching method or the preset second matching method. The preset second matching method includes: obtaining the center point of the line segment stripes, and matching the line segment stripes in the first image and the second image sequentially according to the center point of the line segment stripes. When the line segment stripes are binarized curve segment stripes or binarized polyline segment stripes, the preset second matching method is used to match the line segment stripes in the first image and the second image sequentially.

7. The method according to claim 6, wherein, The line segments and stripes in the first image and the second image are matched sequentially using the preset first matching method or the preset second matching method, including: Randomly select one of the two preset matching methods to perform the first matching of the line segments and stripes in the first image and the second image in sequence to obtain the first matching result; Select one preset matching method from the two preset matching methods, and perform a second matching on the line segments and stripes in the first image and the second image in sequence to obtain a second matching result; The final matching result is determined by selecting the verified matching result from the first matching result and the second matching result; If both the first matching result and the second matching result pass verification, determine whether the first matching result and the second matching result are consistent. If both the first matching result and the second matching result are consistent, determine the first matching result as the final matching result.

8. The method according to claim 6, wherein, Obtaining the center point of the line segment stripe includes: When the line segments and stripes in the first image and the second image are matched sequentially using the preset second matching method, the edges of the line segments and stripes in the first image and the second image are detected to obtain a binarized edge image or center line. The edge pixels in the edge image are white, and the background of the edge image is black or the opposite. The edge pixels are used to represent the edge trajectory of the line segments and stripes. Obtain the target matrix for each edge pixel, the target matrix being used to characterize the curvature information of the edge pixel; The edge line or center line of the line segment stripe is determined based on the target matrix.

9. The method according to claim 8, wherein, Determining the center point of the line segment stripes based on the target matrix includes: Obtain the feature values ​​of the target matrix corresponding to all edge pixels in each line segment stripe; The smallest feature value among all feature values ​​corresponding to the line segment stripes is determined as the target feature value, and the target feature vector corresponding to the target feature value is obtained; Obtain the edge pixel coordinates along the direction of the target feature vector and determine them as the target edge pixel coordinates; The center point of the line segment stripe is determined based on the target edge pixel coordinates.

10. The method according to claim 9, wherein, The method further includes: after determining the center point of the line segment stripe, removing line segment stripes whose curvature is not within a preset curvature range.

11. The method according to claim 6, wherein, Obtaining the center point of the line segment stripe includes: Obtain the gradient of all edge pixels in each line segment stripe; Select the edge pixel with the largest gradient from all edge pixels and determine it as the target pixel; The subpixel center of the target pixel is determined as the center point of the line segment stripe.

12. A three-dimensional reconstruction device, comprising: The acquisition module is configured to acquire a first image and a second image, wherein the first image and the second image are obtained by acquiring target images by a pre-calibrated binocular camera, the target image is formed by a projection pattern projected onto the surface of the object being measured, the projection pattern is composed of line segments and stripes arranged according to a predetermined distribution rule, the line segments and stripes include at least one of the following: colored stripes or binarized stripes, and the length of the line segments and stripes is random; The matching module is configured to match the line segments and stripes in the first image and the second image sequentially; The reconstruction module is configured to perform three-dimensional reconstruction of the object under test based on the matching line segments and stripes in the first image and the second image.

13. A three-dimensional reconstruction system, comprising: At least two image acquisition devices, a projection device, and a first processor; The projection device is configured to project a projection pattern onto the surface of the object being measured, wherein the projection pattern is composed of line segments arranged according to a predetermined distribution rule, and the line segments include at least one of the following: colored stripes or binary stripes, and the length of the line segments is random. The at least two image acquisition modules are configured to acquire images of the projected pattern from the surface of the object being measured, thereby obtaining a first image and a second image; The first processor is configured to sequentially match the line segments and stripes in the first image and the second image; and to perform three-dimensional reconstruction of the object under test based on the successfully matched line segments and stripes in the first image and the second image.

14. A projection device configured to project a pattern onto the surface of a measured object. The projected pattern is composed of line segments arranged according to a predetermined distribution rule. The line segments include at least one of the following: colored stripes or binarized stripes, and the length of the line segments is random.

15. An electronic device comprising: The memory is configured to store program instructions. A processor, connected to the memory, is configured to execute program instructions that perform the following functions: acquiring a first image and a second image, wherein the first image and the second image are obtained by acquiring target images respectively by a pre-calibrated binocular camera, the target image being formed by a projection pattern projected onto the surface of the object being measured, the projection pattern being composed of line segments and stripes arranged according to a predetermined distribution rule, the line segments and stripes including at least one of the following: colored stripes or binarized stripes, the length of the line segments and stripes being random; sequentially matching the line segments and stripes in the first image and the second image; and completing the three-dimensional reconstruction of the object being measured based on the mutually matching line segments and stripes in the first image and the second image.

16. A non-volatile storage medium, the non-volatile storage medium comprising a stored computer program, wherein, The device containing the non-volatile storage medium executes the three-dimensional reconstruction method according to any one of claims 1 to 8 by running the computer program.

17. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the three-dimensional reconstruction method of claim 1.

Citation Information

Patent Citations

  • Method and device of three-dimensional reconstruction based on binocular three-dimensional scanning system

    CN108267097A

  • Decoding method based on binocular vision color strip encoding

    CN108592823A

  • Method for measuring variable-frequency fringe projection structured light on basis of depth-of-field feedback

    CN108592824A

  • Three-dimensional measuring method based on colored Gray code structure light, three-dimensional measuring system based on colored Gray code structure light, and devices

    CN110686599A

  • Binocular structured light edge reconstruction method and system, and storage medium

    CN114332349A