A structured light-based focus three-dimensional reconstruction method and a three-dimensional reconstruction system
Patent Information
- Application Number
- CN202310764285.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-26
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-06-26
AI Technical Summary
[0004]目前,传统的三维重建方法存在的问题是,由于更多的是从侧面拍摄图片,出现遮挡的区域重建后必然会出现死点,没有办法完整的还原物体的三维结构,且镜面反射越强的物体成像效果也会越差
[0050] This invention provides a structured light-based focused 3D reconstruction method and system, which uses a frontal image acquisition method to more comprehensively restore the 3D structure of the object being measured. Moreover, the smoother the surface, the stronger the diffuse reflection, and the better the imaging effect. In addition, the sharpness measurement based on the four-step phase-shifting method can reduce the dependence on the surrounding features of the detection point, greatly reducing the limitations and improving the accuracy of 3D reconstruction.
Smart Images

Figure CN116958415B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a focusing 3D reconstruction method and 3D reconstruction system based on structured light. Background Technology
[0002] 3D reconstruction is a technique that reconstructs a 3D virtual model of a real object from a 2D image in a computer and displays it on a computer screen. 3D reconstruction has always been a research hotspot in the field of computer vision technology.
[0003] Traditional 3D reconstruction methods can be categorized into active and passive methods based on whether the sensor actively illuminates the object. Active methods involve actively illuminating the object with a signal and then retrieving the returned signal to obtain the object's 3D information. Common examples include structured light methods, Time-of-Flight (TOF) methods, and triangulation. Passive methods, on the other hand, rely directly on ambient light sources to acquire RGB images and then analyze these images using multi-view geometry principles to obtain the object's 3D information. Common examples include monocular vision, binocular / multi-view vision, and methods based on consumer-grade RGB-D cameras. Each method has its own advantages and disadvantages, and each has its own applicable scope.
[0004] Currently, traditional 3D reconstruction methods suffer from several problems. Since images are often taken from the side, occluded areas inevitably result in dead pixels after reconstruction, failing to fully reconstruct the object's 3D structure. Furthermore, objects with stronger specular reflections exhibit poorer imaging results. While existing focusing-based 3D reconstruction methods, whether employing pixel-level sharpness functions or contour extraction from single-frame images, rely on surrounding pixels to determine the sharpness of a location, leading to significant limitations and hindering widespread adoption.
[0005] Therefore, improvements to existing technologies are necessary.
[0006] The above information is provided as background information only to aid in understanding this disclosure and does not constitute an assertion or admission that any of the above content can be used as prior art relative to this disclosure. Summary of the Invention
[0007] This invention provides a structured light-based focused 3D reconstruction method and 3D reconstruction system to address the shortcomings of existing technologies.
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] In a first aspect, the present invention provides a focusing three-dimensional reconstruction method based on structured light, the method comprising:
[0010] The control platform moves along the Z-axis to the initial height position, and the projector is turned on;
[0011] A four-step phase fringe pattern of the object under test is acquired on the detection platform, and a modulation pattern and a sharpness pattern of the background corresponding to the four-step phase fringe pattern are calculated; the modulation pattern includes the modulation amplitude B of each position point (x,y), and the sharpness pattern includes the sharpness value Q of each position point;
[0012] The detection platform is controlled to move along the Z-axis in steps of a set size, and it is determined whether the detection platform exceeds the set maximum height after the movement.
[0013] If not, return to the steps of acquiring the four-step phase fringe pattern of the object under test on the detection platform and calculating the modulation pattern and the sharpness pattern of the background corresponding to the four-step phase fringe pattern;
[0014] If so, then n sets of modulation maps and sharpness maps corresponding one-to-one with the height position of the detection platform are obtained;
[0015] In each set of modulation plots and sharpness plots, the modulation amplitude B and sharpness value Q of each location point (x,y) are weighted and calculated to obtain the sharpness evaluation parameter P corresponding to each location point (x,y);
[0016] By traversing each set of modulation maps and sharpness maps, the maximum value among the n sharpness evaluation parameters P corresponding to each location point (x,y) is obtained to perform three-dimensional reconstruction of the object under test.
[0017] Furthermore, in the structured light-based focused 3D reconstruction method, the light intensity function of the sinusoidal grating projected by the projector is:
[0018]
[0019] Where I is the light intensity function, A is the background light intensity, and B is the modulation amplitude of the stripes. Let δ be the phase corresponding to point (x,y), and let δ be the shift phase value.
[0020] Furthermore, in the structured light-based focused 3D reconstruction method, the formula for calculating the modulation amplitude B at each location point (x, y) in the modulation graph is:
[0021]
[0022]
[0023] Furthermore, in the structured light-based focused 3D reconstruction method, the formula for calculating the sharpness value Q at each location point in the sharpness map is as follows:
[0024] Q(x,y)=|A(x,y)-A(x+1,y)|*|A(x,y)-A(x,y+1)|.
[0025] Furthermore, in the structured light-based focused 3D reconstruction method, the step of weighting the modulation amplitude B and sharpness value Q of each location point (x,y) in each set of modulation maps and sharpness maps to obtain the sharpness evaluation parameter P corresponding to each location point (x,y) includes:
[0026] In each set of modulation plots and sharpness plots, the modulation amplitude B and sharpness value Q at each location point (x,y) are weighted and calculated using the following formula to obtain the sharpness evaluation parameter P corresponding to each location point (x,y):
[0027] P(x, y)=a*B(x, y)+b*Q(x, y);
[0028] Where a and b are weighting coefficients, and a+b=1.
[0029] Secondly, the present invention provides a structured light-based focusing 3D reconstruction system, the system comprising:
[0030] The motion control module is used to control the detection platform to move along the Z-axis to the initial height position and to control the projector to turn on;
[0031] The acquisition and calculation module is used to acquire the four-step phase fringe pattern of the object under test on the detection platform, and calculate the modulation pattern and the sharpness pattern of the background corresponding to the four-step phase fringe pattern; the modulation pattern includes the modulation amplitude B of each position point (x,y), and the sharpness pattern includes the sharpness value Q of each position point;
[0032] The movement judgment module is used to control the detection platform to move its height along the Z-axis in a set step size, and to determine whether the detection platform exceeds the set maximum height after the movement; if not, it returns to the step of collecting the four-step phase fringe pattern of the object under test on the detection platform and calculating the modulation pattern and the sharpness pattern of the background corresponding to the four-step phase fringe pattern; if yes, it obtains n sets of the modulation pattern and the sharpness pattern that correspond one-to-one with the height position of the detection platform.
[0033] The weighted calculation module is used to perform weighted calculations on the modulation amplitude B and sharpness value Q of each location point (x,y) in each set of modulation maps and sharpness maps to obtain the sharpness evaluation parameter P corresponding to each location point (x,y);
[0034] The 3D reconstruction module is used to traverse each set of modulation maps and sharpness maps, and to obtain the height position value corresponding to the maximum value among the n sharpness evaluation parameters P corresponding to each position point (x,y) in order to perform 3D reconstruction of the object under test.
[0035] Furthermore, in the structured light-based focused 3D reconstruction system, the light intensity function of the sinusoidal grating projected by the projector is:
[0036]
[0037] Where I is the light intensity function, A is the background light intensity, and B is the modulation amplitude of the stripes. Let δ be the phase corresponding to the point (x,y), and let δ be the shift phase value.
[0038] Furthermore, in the structured light-based focused 3D reconstruction system, the formula for calculating the modulation amplitude B at each location point (x, y) in the modulation graph is:
[0039]
[0040]
[0041] Furthermore, in the structured light-based focused 3D reconstruction system, the formula for calculating the sharpness value Q at each location point in the sharpness map is:
[0042] Q(x,y)=|A(x,y)-A(x+1,y)|*|A(x,y)-A(x,y+1)|.
[0043] Furthermore, in the structured light-based focused 3D reconstruction system, the weighted calculation module is specifically used for:
[0044] In each set of modulation plots and sharpness plots, the modulation amplitude B and sharpness value Q at each location point (x,y) are weighted and calculated using the following formula to obtain the sharpness evaluation parameter P corresponding to each location point (x,y):
[0045] P(x, y)=a*B(x, y)+b*Q(x, y);
[0046] Where a and b are weighting coefficients, and a+b=1.
[0047] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the structured light-based focused three-dimensional reconstruction method as described in the first aspect above.
[0048] Fourthly, the present invention provides a storage medium containing computer-executable instructions, which are executed by a computer processor to implement the structured light-based focused 3D reconstruction method as described in the first aspect above.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] This invention provides a structured light-based focused 3D reconstruction method and system, which uses a frontal image acquisition method to more comprehensively restore the 3D structure of the object being measured. Moreover, the smoother the surface, the stronger the diffuse reflection, and the better the imaging effect. In addition, the sharpness measurement based on the four-step phase-shifting method can reduce the dependence on the surrounding features of the detection point, greatly reducing the limitations and improving the accuracy of 3D reconstruction. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 This is a flowchart illustrating a structured light-based focused 3D reconstruction method provided in Embodiment 1 of the present invention.
[0053] Figure 2 This is a schematic diagram of the optical path diagram mentioned in Embodiment 1 of the present invention;
[0054] Figure 3 This is a schematic diagram of the four-step phase fringe pattern mentioned in Embodiment 1 of the present invention;
[0055] Figure 4 This is a schematic diagram of the modulation diagram mentioned in Embodiment 1 of the present invention;
[0056] Figure 5 This is a schematic diagram of the background clarity diagram mentioned in Embodiment 1 of the present invention;
[0057] Figure 6 This is a schematic diagram of obtaining the height position value corresponding to the maximum sharpness evaluation parameter P mentioned in Embodiment 1 of the present invention;
[0058] Figure 7 This is a functional module diagram of a structured light-based focused 3D reconstruction system provided in Embodiment 2 of the present invention;
[0059] Figure 8 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Furthermore, those skilled in the art will understand that with technological development and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0061] In the description of this application, it should be understood that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. Furthermore, any terminology used is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0062] Furthermore, to better illustrate this application, numerous specific details are provided in the following detailed embodiments. Those skilled in the art should understand that this application can be implemented without certain specific details. In some instances, methods, means, components, and circuits well-known to those skilled in the art have not been described in detail in order to highlight the main points of this application.
[0063] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0064] Example 1
[0065] In view of the shortcomings of existing 3D reconstruction technologies, the applicant, based on years of practical experience and professional knowledge in this field, and combined with theoretical application, has actively researched and innovated to create a technology that can overcome the shortcomings of existing technologies, making 3D reconstruction technology more practical. After continuous research, design, and repeated trials and improvements, this invention with real practical value has finally been created.
[0066] Please refer to Figure 1 This invention provides a structured light-based focusing 3D reconstruction method. This method is suitable for reconstructing the 3D appearance of a test object, excelling at detecting and reconstructing small, densely packed objects in 3D. It overcomes the shortcomings of most current imaging methods. The method is executed by a structured light-based focusing 3D reconstruction system, which can be implemented in software and / or hardware. The method specifically includes the following steps:
[0067] S101. Control the detection platform to move along the Z-axis to the initial height position and control the projector to turn on.
[0068] It should be noted that the object being tested is placed on the detection platform, and the detection platform needs to be able to achieve precise positioning. The initial height position of the detection platform is set to Z0.
[0069] The projector projects from the front of the object being measured, ensuring that the reconstructed 3D model does not have dead spots due to occlusion.
[0070] The light intensity function of the sinusoidal grating projected by the projector is:
[0071]
[0072] Where I is the light intensity function, A is the background light intensity, and B is the modulation amplitude of the stripes. Let δ be the phase corresponding to point (x,y), and let δ be the shift phase value.
[0073] S102. Acquire the four-step phase fringe pattern of the object under test on the detection platform, and calculate the modulation pattern and the sharpness pattern of the background corresponding to the four-step phase fringe pattern; the modulation pattern includes the modulation amplitude B of each position point (x,y), and the sharpness pattern includes the sharpness value Q of each position point.
[0074] It should be noted that the projector first generates four raster images on the surface of the object being measured, and the optical path diagram is as follows: Figure 2 As shown, a four-step phase fringe pattern generated by surface reflection of the object under test can then be acquired by a camera. The four grating images are standard sinusoidal fringe gratings with a phase step difference of π / 2, meaning the phase shifts of the four grating images are 0, π / 2, π, and 3π / 2, respectively, and the corresponding light intensities are:
[0075]
[0076] It is understandable that after acquiring the four-step phase fringe pattern of the object under test, the modulation pattern and the sharpness pattern of the background corresponding to the four-step phase fringe pattern can be obtained through algorithm processing. Since this content has been implemented in many existing technologies and is not the focus of this solution design, it will not be elaborated in detail here.
[0077] For example, the four-step phase fringe pattern of the object under test is collected as follows: Figure 3 As shown; the modulation plot corresponding to the four-step phase fringe pattern is calculated as follows. Figure 4 As shown; the background sharpness map corresponding to the four-step phase fringe map is calculated as follows. Figure 5 As shown.
[0078] In this embodiment, the formula for calculating the modulation amplitude B at each position point (x, y) in the modulation graph is as follows:
[0079]
[0080]
[0081] The formula for calculating the sharpness value Q at each location point in the sharpness map is as follows:
[0082] Q(x,y)=|A(x,y)-A(x+1,y)|*|A(x,y)-A(x,y+1)|.
[0083] S103. Control the detection platform to move its height along the Z-axis in a set step size, and determine whether the detection platform exceeds the set maximum height after the movement; if not, return to step S102; if yes, execute step S104.
[0084] It should be noted that the set step size is set as step, which can be arbitrarily set by technicians based on experience and actual application scenarios. This embodiment does not impose specific limitations here.
[0085] It is understood that when the detection platform is controlled to move its height from the initial height position Z0 along the Z-axis with a set step size, the height position of the detection platform is Z = Z0 + step; when the detection platform is controlled to move its height again along the Z-axis with a set step size, the height position of the detection platform is Z = Z0 + step + step, and so on.
[0086] The maximum height is set to Zmax, which can be arbitrarily set by technicians based on experience and actual application scenarios. This embodiment does not impose specific limitations here.
[0087] In this embodiment, the movement of the detection platform along the Z-axis is not continuous, but ends when the height position Z of the detection platform is greater than Zmax. Besides acquiring a four-step phase fringe map of the object under test when the detection platform is at the initial height position Z0, and calculating the corresponding modulation map and background sharpness map, the detection platform also needs to acquire a four-step phase fringe map of the object under test and calculate the corresponding modulation map and background sharpness map for each subsequent movement (Z less than or equal to Zmax).
[0088] S104. Obtain n sets of modulation maps and sharpness maps that correspond one-to-one with the height position of the detection platform.
[0089] It should be noted that n is a natural number greater than 1. If the detection platform moves 3 times, then the height position of the detection platform, including the initial height position Z0, is 3 times. Correspondingly, 3 four-step phase fringe patterns of the object under test are collected, and 3 sets of modulation patterns and background sharpness patterns corresponding to the four-step phase fringe patterns are calculated.
[0090] S105. In each set of modulation charts and sharpness charts, the modulation amplitude B and sharpness value Q of each location point (x,y) are weighted and calculated to obtain the sharpness evaluation parameter P corresponding to each location point (x,y).
[0091] In this embodiment, step S105 can be further refined to include the following steps:
[0092] In each set of modulation plots and sharpness plots, the modulation amplitude B and sharpness value Q at each location point (x,y) are weighted and calculated using the following formula to obtain the sharpness evaluation parameter P corresponding to each location point (x,y):
[0093] P(x, y)=a*B(x, y)+b*Q(x, y);
[0094] Where a and b are weighting coefficients, and a+b=1.
[0095] It should be noted that the sharpness measurement based on the four-step phase-shifting method in this embodiment obtains a new sharpness evaluation parameter P by weighting the surrounding features and the self-feature. This method has less dependence on the surrounding features of the detection point, stronger independence, stronger anti-interference ability, and greatly reduced limitations.
[0096] S106. Traverse each set of modulation maps and sharpness maps, and obtain the height position value corresponding to the maximum value among the n sharpness evaluation parameters P corresponding to each position point (x,y) to perform three-dimensional reconstruction of the object under test.
[0097] It should be noted that the position points (x, y) in each set of modulation and sharpness maps are the same. This means that there are multiple sharpness evaluation parameters P corresponding to each position point (x, y). Specifically, the number of sharpness evaluation parameters P corresponding to each position point (x, y) is equal to the number of sets of modulation and sharpness maps. For example, when there are 3 sets of modulation and sharpness maps, there are 3 calculated sharpness evaluation parameters P corresponding to each position point (x, y).
[0098] For each location point (x, y), one of the n sharpness evaluation parameters P is always the largest. In this embodiment, we need to extract this largest value, denoted as Pmax. Figure 6As shown, then determine the height position value corresponding to the maximum value Pmax (i.e. Figure 6 Zi) is used as the actual height position value of the location point (x,y). After the actual height position values of all location points (x,y) are determined, the three-dimensional reconstruction of the measured object can be performed.
[0099] Although this application frequently uses terms such as three-dimensional, phase, modulation, sharpness, and weighting, the possibility of using other terms is not excluded. These terms are used merely for the convenience of describing and explaining the essence of the invention; interpreting them as any additional limitation would contradict the spirit of the invention.
[0100] The present invention provides a focused 3D reconstruction method based on structured light, which adopts a frontal image acquisition method, which can more comprehensively restore the 3D structure of the measured object. Moreover, the smoother the surface, the stronger the diffuse reflection, and the better the imaging effect. In addition, the sharpness measurement based on the four-step phase-shifting method can reduce the dependence on the surrounding features of the detection point, greatly reducing the limitations and improving the accuracy of 3D reconstruction.
[0101] Example 2
[0102] Please refer to Figure 7 This is a functional module diagram of a structured light-based focused 3D reconstruction system provided in Embodiment 2 of the present invention. This system is suitable for executing the structured light-based focused 3D reconstruction method provided in this embodiment of the invention. Specifically, the system includes the following modules:
[0103] The motion control module 201 is used to control the detection platform to move along the Z-axis to the initial height position and to control the projector to turn on;
[0104] The acquisition and calculation module 202 is used to acquire the four-step phase fringe pattern of the object under test on the detection platform, and calculate the modulation pattern and the sharpness pattern of the background corresponding to the four-step phase fringe pattern; the modulation pattern includes the modulation amplitude B of each position point (x,y), and the sharpness pattern includes the sharpness value Q of each position point;
[0105] The movement judgment module 203 is used to control the detection platform to move its height along the Z-axis in a set step size, and to determine whether the detection platform exceeds the set maximum height after the movement; if not, it returns to the step of collecting the four-step phase fringe pattern of the object under test on the detection platform and calculating the modulation pattern and the sharpness pattern of the background corresponding to the four-step phase fringe pattern; if yes, it obtains n sets of modulation patterns and sharpness patterns that correspond one-to-one with the height position of the detection platform.
[0106] The weighted calculation module 204 is used to perform weighted calculation on the modulation amplitude B and sharpness value Q of each position point (x,y) in each group of modulation maps and sharpness maps to obtain the sharpness evaluation parameter P corresponding to each position point (x,y);
[0107] The 3D reconstruction module 205 is used to traverse each set of modulation maps and sharpness maps, and obtain the height position value corresponding to the maximum value among the n sharpness evaluation parameters P corresponding to each position point (x,y) in order to perform 3D reconstruction of the object under test.
[0108] Preferably, in the structured light-based focused 3D reconstruction system, the light intensity function of the sinusoidal grating projected by the projector is:
[0109]
[0110] Where I is the light intensity function, A is the background light intensity, and B is the modulation amplitude of the stripes. Let δ be the phase corresponding to the point (x,y), and let δ be the shift phase value.
[0111] Preferably, in the structured light-based focused 3D reconstruction system, the formula for calculating the modulation amplitude B at each location point (x, y) in the modulation graph is:
[0112]
[0113]
[0114] Preferably, in the structured light-based focused 3D reconstruction system, the formula for calculating the sharpness value Q at each location point in the sharpness map is:
[0115] Q(x,y)=|A(x,y)-A(x+1,y)|*|A(x,y)-A(x,y+1)|.
[0116] Preferably, in the structured light-based focused 3D reconstruction system, the weighted calculation module 204 is specifically used for:
[0117] In each set of modulation plots and sharpness plots, the modulation amplitude B and sharpness value Q at each location point (x,y) are weighted and calculated using the following formula to obtain the sharpness evaluation parameter P corresponding to each location point (x,y):
[0118] P(x, y)=a*B(x, y)+b*Q(x, y);
[0119] Where a and b are weighting coefficients, and a+b=1.
[0120] The present invention provides a structured light-based focused 3D reconstruction system that uses a frontal image acquisition method, which can more comprehensively restore the 3D structure of the object being measured. Moreover, the smoother the surface, the stronger the diffuse reflection, and the better the imaging effect. In addition, the sharpness measurement based on the four-step phase-shifting method can reduce the dependence on the surrounding features of the detection point, greatly reducing the limitations and improving the accuracy of 3D reconstruction.
[0121] The above system can execute the methods provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the methods.
[0122] Example 3
[0123] Figure 8 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Figure 8 A block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention is shown. Figure 8 The computer device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0124] like Figure 8 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0125] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0126] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0127] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 8Not shown; usually referred to as a "hard drive"). Although Figure 8 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0128] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0129] Computer device 12 can also communicate with one or more external devices 15 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 8 As not shown, it can be combined with computer device 12 to use other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0130] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the structured light-based focused 3D reconstruction method provided in the embodiments of the present invention.
[0131] Example 4
[0132] Embodiment 4 of the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the structured light-based focused 3D reconstruction method provided in all embodiments of the present application.
[0133] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0134] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0135] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0136] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0137] In summary, after reading this detailed disclosure, those skilled in the art will understand that the foregoing detailed disclosure is presented by way of example only and is not restrictive. Although not explicitly stated herein, those skilled in the art will understand that this application is intended to encompass various reasonable changes, improvements, and modifications to the embodiments. These changes, improvements, and modifications are intended to be made by this application and are within the spirit and scope of the exemplary embodiments of this application.
[0138] Furthermore, certain terms used in this application have been used to describe embodiments of this application. For example, "an embodiment," "an embodiment," and / or "some embodiments" mean that a particular feature, structure, or characteristic described in connection with that embodiment may be included in at least one embodiment of this application. Therefore, it is to be emphasized and understood that two or more references to "an embodiment" or "an embodiment" or "an alternative embodiment" in various parts of this specification do not necessarily refer to the same embodiment. Moreover, specific features, structures, or characteristics may be appropriately combined in one or more embodiments of this application.
[0139] It should be understood that in the foregoing description of the embodiments of this application, various features are combined in a single embodiment, drawing, or description for the purpose of simplifying the understanding of a feature. However, this does not mean that the combination of these features is necessary, and those skilled in the art may extract some features as separate embodiments when reading this application. That is, the embodiments in this application can also be understood as an integration of multiple sub-embodiments. It is also valid when the content of each sub-embodiment contains fewer than all the features of a single foregoing disclosed embodiment.
[0140] Each patent, patent application, publication of the patent application, and other materials such as articles, books, specifications, publications, documents, articles, etc., cited herein may be incorporated by reference. The entire contents used for all purposes, except for any history of prosecution documents associated with it, that may be inconsistent with or conflict with this document, or that may have a limiting effect on the widest extent of the claims, are now or hereafter associated with this document. For example, in the event of any inconsistency or conflict between the description, definition, and / or use of terms associated with any of the included materials and the terms, description, definition, and / or used in connection with this document, the terms used herein shall prevail.
[0141] Finally, it should be understood that the embodiments disclosed herein are illustrative of the principles of the embodiments of this application. Other modified embodiments are also within the scope of this application. Therefore, the embodiments disclosed herein are merely examples and not limitations. Those skilled in the art can adopt alternative configurations to implement the applications in this application based on the embodiments in this application. Therefore, the embodiments of this application are not limited to the embodiments precisely described in the application.
Claims
1. A structured light based focused three-dimensional reconstruction method, characterized in that, The method includes: The control platform moves along the Z-axis to the initial height position, and the projector is turned on; A four-step phase fringe pattern of the object under test is acquired on the detection platform, and a modulation pattern and a sharpness pattern of the background corresponding to the four-step phase fringe pattern are calculated; the modulation pattern includes the modulation amplitude B of each position point (x,y), and the sharpness pattern includes the sharpness value Q of each position point; The detection platform is controlled to move along the Z-axis in steps of a set size, and it is determined whether the detection platform exceeds the set maximum height after the movement. If not, return to the steps of acquiring the four-step phase fringe pattern of the object under test on the detection platform and calculating the modulation pattern and the sharpness pattern of the background corresponding to the four-step phase fringe pattern; If so, then n sets of modulation maps and sharpness maps corresponding one-to-one with the height position of the detection platform are obtained; In each set of modulation plots and sharpness plots, the modulation amplitude B and sharpness value Q of each location point (x,y) are weighted and calculated to obtain the sharpness evaluation parameter P corresponding to each location point (x,y); By traversing each set of modulation maps and sharpness maps, the maximum value among the n sharpness evaluation parameters P corresponding to each location point (x,y) is obtained to perform three-dimensional reconstruction of the object under test.
2. The structured light based focused three-dimensional reconstruction method of claim 1, wherein, The light intensity function of the sinusoidal grating projected by the projector is: Where I is the light intensity function, A is the background light intensity, B is the modulation amplitude of the fringe, is the phase corresponding to the point (x, y), and δ is the moving phase value.
3. The structured light-based focusing 3D reconstruction method according to claim 1, characterized in that, The formula for calculating the modulation amplitude B at each position point (x, y) in the modulation diagram is as follows:
4. The structured light-based focusing 3D reconstruction method according to claim 1, characterized in that, The formula for calculating the sharpness value Q at each location point in the sharpness map is as follows: Q(x,y)=|A(x,y)-A(x+1,y)|*|A(x,y)-A(x,y+1)|.
5. The structured light-based focusing 3D reconstruction method according to claim 1, characterized in that, The step of weighting the modulation amplitude B and sharpness value Q at each location point (x,y) in each set of modulation plots and sharpness plots to obtain the sharpness evaluation parameter P corresponding to each location point (x,y) includes: In each set of modulation plots and sharpness plots, the modulation amplitude B and sharpness value Q at each location point (x,y) are weighted and calculated using the following formula to obtain the sharpness evaluation parameter P corresponding to each location point (x,y): P(x, y)=a*B(x, y)+b*Q(x, y); Where a and b are weighting coefficients, and a+b=1.
6. A focused 3D reconstruction system based on structured light, characterized in that, The system includes: The motion control module is used to control the detection platform to move along the Z-axis to the initial height position and to control the projector to turn on; The acquisition and calculation module is used to acquire the four-step phase fringe pattern of the object under test on the detection platform, and calculate the modulation pattern and the sharpness pattern of the background corresponding to the four-step phase fringe pattern; the modulation pattern includes the modulation amplitude B of each position point (x,y), and the sharpness pattern includes the sharpness value Q of each position point; The movement judgment module is used to control the detection platform to move its height along the Z-axis in a set step size, and to determine whether the detection platform exceeds the set maximum height after the movement; if not, it returns to the step of collecting the four-step phase fringe pattern of the object under test on the detection platform and calculating the modulation pattern and the sharpness pattern of the background corresponding to the four-step phase fringe pattern; if yes, it obtains n sets of the modulation pattern and the sharpness pattern that correspond one-to-one with the height position of the detection platform. The weighted calculation module is used to perform weighted calculations on the modulation amplitude B and sharpness value Q of each location point (x,y) in each set of modulation maps and sharpness maps to obtain the sharpness evaluation parameter P corresponding to each location point (x,y); The 3D reconstruction module is used to traverse each set of modulation maps and sharpness maps, and to obtain the height position value corresponding to the maximum value among the n sharpness evaluation parameters P corresponding to each position point (x,y) in order to perform 3D reconstruction of the object under test.
7. The structured light-based focusing 3D reconstruction system according to claim 6, characterized in that, The light intensity function of the sinusoidal grating projected by the projector is: Where I is the light intensity function, A is the background light intensity, and B is the modulation amplitude of the stripes. Let δ be the phase corresponding to the point (x,y), and let δ be the shift phase value. The formula for calculating the modulation amplitude B at each position point (x, y) in the modulation diagram is as follows: The formula for calculating the sharpness value Q at each location point in the sharpness map is as follows: Q(x,y)=|A(x,y)-A(x+1,y)|*|A(x,y)-A(x,y+1)|.
8. The structured light-based focusing 3D reconstruction system according to claim 6, characterized in that, The weighted calculation module is specifically used for: In each set of modulation plots and sharpness plots, the modulation amplitude B and sharpness value Q at each location point (x,y) are weighted and calculated using the following formula to obtain the sharpness evaluation parameter P corresponding to each location point (x,y): P(x, y)=a*B(x, y)+b*Q(x, y); Where a and b are weighting coefficients, and a+b=1.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the structured light-based focused 3D reconstruction method as described in any one of claims 1-5.
10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions are executed by a computer processor to implement the structured light-based focused 3D reconstruction method as described in any one of claims 1-5.
Citation Information
Patent Citations
Three-dimensional reconstruction method based on four-step phase shift coding type surface structured light
CN110174079A
Structured light online dense three-dimensional reconstruction method based on machine learning
CN111383234A