WO2020237660A1 - Structured light-based three-dimensional reconstruction method, terminal device, and storage medium - Google Patents

Structured light-based three-dimensional reconstruction method, terminal device, and storage medium Download PDF

Info

Publication number
WO2020237660A1
WO2020237660A1 PCT/CN2019/089621 CN2019089621W WO2020237660A1 WO 2020237660 A1 WO2020237660 A1 WO 2020237660A1 CN 2019089621 W CN2019089621 W CN 2019089621W WO 2020237660 A1 WO2020237660 A1 WO 2020237660A1
Authority
WO
WIPO (PCT)
Prior art keywords
coding
main
point
image
speckle
Prior art date
Application number
PCT/CN2019/089621
Other languages
French (fr)
Chinese (zh)
Inventor
宋展
Original Assignee
中国科学院深圳先进技术研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国科学院深圳先进技术研究院 filed Critical 中国科学院深圳先进技术研究院
Priority to PCT/CN2019/089621 priority Critical patent/WO2020237660A1/en
Publication of WO2020237660A1 publication Critical patent/WO2020237660A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/25Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation

Definitions

  • This application belongs to the field of computer technology, and in particular relates to a three-dimensional reconstruction method, device, terminal device and storage medium based on structured light.
  • the coding method usually used is the spatial coding method.
  • the spatial coding method only needs to project a coding pattern, and its coding information is generated by spatial coding features or different permutations and combinations.
  • the coding and decoding processes can be completed in a single image, with fast measurement speed and real-time performance.
  • the existing spatial coding method because the density of its coding elements is much lower than that of the time-coded structured light, causes the problem of a small number of point clouds that can be reconstructed and insufficient spatial resolution.
  • a method of increasing the number of coding elements or increasing the coding window is usually adopted.
  • the embodiments of the present application provide a structured light-based three-dimensional reconstruction method, terminal equipment, and storage medium to solve the problem that in the prior art, the coding density of structured light spatial coding is low and the spatial resolution of reconstructed point clouds is not high, resulting in The problem of inaccurate 3D reconstruction based on structured light.
  • the first aspect of the embodiments of the present application provides a three-dimensional reconstruction method based on structured light, including:
  • the target coded image formed by projecting the target projection image onto the surface of the measured object and superimposed on the surface information of the measured object;
  • the target coded image includes a first preset number of main code points and a second preset Number of speckle images;
  • the first code value and the second code value perform three-dimensional image reconstruction on the measured object to obtain a three-dimensional image of the measured object.
  • a second aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and computer instructions stored in the memory and running on the processor.
  • the processor executes the computer instructions, Implement the following steps:
  • the target coded image formed by projecting the target projection image onto the surface of the measured object and superimposed on the surface information of the measured object;
  • the target coded image includes a first preset number of main code points and a second preset Number of speckle images;
  • the first code value and the second code value perform three-dimensional image reconstruction on the measured object to obtain a three-dimensional image of the measured object.
  • a third aspect of the embodiments of the present application provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the following steps are implemented:
  • the target coded image formed by projecting the target projection image onto the surface of the measured object and superimposed on the surface information of the measured object;
  • the target coded image includes a first preset number of main code points and a second preset Number of speckle images;
  • the first code value and the second code value perform three-dimensional image reconstruction on the measured object to obtain a three-dimensional image of the measured object.
  • each main code point in the target coded image is detected by a preset detection algorithm, and then all speckle images around each main code point are determined. And determine the first code value of each main code point according to all speckle images around each main code point, and then determine the code area of all speckle images around each main code point in the target projection image, and respectively Perform speckle matching and decoding on each code area to obtain the second code value of each speckle image. Finally, according to the calibration parameters of the 3D image reconstruction device, the first code value and the second code value, the measured object Perform 3D image reconstruction.
  • the problems of low coding density of existing spatial coding and low spatial resolution of reconstructed point clouds are solved, and the accuracy of 3D image reconstruction of objects is improved.
  • FIG. 1 is an implementation flowchart of a structured light-based 3D reconstruction method provided by an embodiment of the present application
  • FIG. 2 is a flow chart of the specific implementation of S102 in Figure 1;
  • FIG. 3 is a flow chart of the specific implementation of S103 in Figure 1;
  • FIG. 4 is a flowchart of the specific implementation of S1033 in Figure 3;
  • FIG. 5 is a flowchart of the specific implementation of S104 in Figure 1;
  • FIG. 6 is a schematic diagram of the structure of the structured light-based 3D reconstruction device of the present invention.
  • Fig. 7 is a schematic diagram of a terminal device provided by an embodiment of the present invention.
  • FIG. 1 it is an implementation flowchart of a structured light-based 3D reconstruction method provided by an embodiment of the present application. It can be seen from FIG. 1 that, in the structured light-based 3D reconstruction method provided by this application, the execution subject of this embodiment is a terminal device, including:
  • the target encoded image includes a first preset number of main encoding points and a second A preset number of speckle images.
  • the target projection image is an image formed by embedding different local speckle images of preset types (for example, 8 types) into a preset coding grid according to the coding principle. After the target projection image is projected onto the surface of the measured object by means of laser and DOE diffraction grating, it is superimposed with the surface information such as the color and texture of the surface of the measured object to form a target encoded image.
  • the target coded image includes a first preset number of main code points and a second preset number of speckle images. Each of the main coding points contains different local speckle images. Understandably, the target coded image is coded by using the local speckle image around each of the main coding points as coding elements.
  • S102 Detect each main coding point in the target coded image according to a preset detection algorithm.
  • the preset detection algorithm includes: determining a local symmetry detection operator for detecting each target main coding point in the target coding image according to the geometric characteristics of the coding grid in the target coding image, and The local symmetry detection operator detects each target main coding point in the target coded image.
  • the coding grid in the target coding image has geometric characteristics, and the main coding point is the intersection of grid lines of the coding grid with geometric characteristics.
  • FIG. 2 it is a flowchart of specific implementation of S102 in FIG. 1.
  • the coding grid is a grid pattern.
  • S102 includes:
  • the coding grid has significant geometric features, such as a square coding grid (a common grid) or a triangular coding grid. Based on the geometric characteristics of the coding grid, the coding grid is extracted The intersection of the grid lines of the grid, for example, the intersection of the horizontal grid lines and the vertical grid lines of a grid coding grid. It is understandable that, according to the geometric characteristics of the coding grid, each coding grid usually contains a plurality of intersections of grid lines. For example, in this embodiment, taking the grid as the coding grid as an example, each grid includes four intersections of horizontal grid lines and vertical grid lines.
  • S1022 Generate a local symmetry detection operator for detecting main coding points contained in the target coded image according to the geometric characteristics of the coding grid.
  • the coding grid is a grid
  • the main coding point is the intersection of a horizontal grid line and a vertical grid line. Then, according to the geometric characteristics of the grid, the code for detecting the target is generated.
  • the local symmetry detection operator of the main coding point contained in the image is:
  • I represents the target projection image
  • (i, j) is the pixel coordinate of the current detection point
  • w represents the length or width of the grid with (i, j) as the intersection point
  • ( ⁇ , ⁇ ) represents the intersection point (i, The offset of each pixel in all grids of j) relative to the intersection point (i, j), so ⁇ , ⁇ ⁇ [-w, w].
  • Let l w/3, Is the pixel offset of all areas outside the grid containing the intersection (i, j),
  • the above-mentioned local symmetry detection operator T may be used to detect each main coding point from the target coded image. Furthermore, the incorrectly selected main coding point can be further detected according to the local rotational symmetry characteristics of the main coding point, so as to improve the accuracy of the detection of the main coding point.
  • S103 Determine all speckle images around each main coding point, and determine a first code value of each main coding point according to the types of all speckle images around each main coding point.
  • each speckle image is different. Different speckle images are defined as different speckle images Types of. Therefore, all speckle images around each main coding point can be determined, and the first code value of each main coding point can be determined according to the types of all speckle images around each main coding point.
  • S103 may include:
  • S1031 Determine the topological coding grid of each main coding point in the target image according to the rotational symmetry of the intersection of the grid lines of the coding grid.
  • the geometric characteristics of the coding grid are determined, so the topological coding grid of each main coding point can be determined according to the rotational symmetry of the intersection of the grid lines of the coding grid, For example, according to the rotational symmetry of the intersection of the horizontal and vertical grid lines of the grid, it can be determined that each main code point contains 4 code grids (grids), that is, the topology of each main code point
  • the coding grid is 4 adjacent grids. It is understandable that, in this embodiment, the topological coding grid of each main coding point in the target image includes 4 adjacent grids. .
  • the speckle image filled in each coding grid is different and unique.
  • the topological coding grid of each main code includes 4 adjacent grids, and the speckle images in each of the adjacent 4 grids are obtained respectively.
  • S1033 Perform image type recognition on all speckle images around each main coding point, and determine the first image type of each main coding point based on the types of all speckle images around each main coding point An encoding value.
  • the types of speckle images around each main coding point are different, and the type of each speckle image is unique, it can be based on the types of all speckle images around each main coding point.
  • S1033 includes:
  • S1034 According to the pre-trained speckle image type recognition model, perform image type recognition on all speckle images around each main coding point, to obtain the types of all speckle images around each main coding point .
  • the pre-trained speckle image type recognition model is a deep neural network model
  • the training samples of the neural network model are a preset number of collected speckle image blocks of different types.
  • a preset number of 8 different speckle image blocks are collected as a training sample set, and a speckle image type recognition model used to identify the type of speckle image is trained.
  • the speckle image is subjected to image type recognition, and the types of all speckle images around each main coding point are obtained.
  • S1035 Determine the first code value of each main code point according to the preset mapping relationship between the first code value of the main code point and all speckle image types around the main code point.
  • the mapping relationship between the first code value of the main code point and all speckle image types around the main code point is preset and stored, for example, assuming that there is a first code of the main code point in the mapping relationship
  • the value is 1234
  • the corresponding speckle image types are 1-2-3-4 in the clockwise direction.
  • the speckle image type recognition model has identified 4 speckle image types around the main code point A.
  • the types of speckle images are (clockwise) 1-2-3-4, and then the encoding value of the main code point A can be determined to be 1234 according to the mapping relationship.
  • each main code can be obtained.
  • the first code value of the point is preset and stored, for example, assuming that there is a first code of the main code point in the mapping relationship
  • the value is 1234
  • the corresponding speckle image types are 1-2-3-4 in the clockwise direction.
  • the speckle image type recognition model has identified 4 speckle image types around the main code point A.
  • the types of speckle images are (clockwise)
  • S104 Determine the coding regions of all speckle images around each main coding point in the target projection image, and perform speckle matching and decoding on each of the coding regions to obtain the speckle image The second code value.
  • the projection coordinates of each main coding point in the target projection image can be determined, and the The projection coordinates of each main coding point are used as a reference to determine the coding regions of all speckle images in the target image. Further, by taking each coding region as a unit, performing speckle matching decoding on the speckle image of each coding region, to obtain the second coding value of each speckle image.
  • S104 includes:
  • S1041 Determine the position of each main coding point in the target projected image according to the first coding value of each main coding point and the coding coordinates of each main coding point in the target coded image. Projection coordinates.
  • the principle of structured light three-dimensional reconstruction there is a coding mapping relationship between the coding coordinates in the target coding image and the projection coordinates in the target projection image. Therefore, the coding value of the main coding point is determined Then, the coding coordinates corresponding to each main coding point and 4 adjacent speckle image regions around each main coding point can be determined in the target projection image.
  • S1042 Determine, based on the projection coordinates of each main coding point, the coding area of the speckle image around each main coding point in the target projection image.
  • the standard speckle corresponding to the speckle image area around each main code point can be determined in the target projection image based on the projection coordinates of each main code point Image area.
  • S1043 according to a preset local image matching and decoding algorithm, respectively perform matching and decoding on the coding region of each speckle image in the target projection image to obtain a second coding value of the coding region of each speckle image.
  • the preset local image matching and decoding algorithm is a pixel-level matching algorithm.
  • the preset speckle image decoding algorithm includes, for example, the absolute value of pixel difference (SAD, Sum of Absolute Differences), and the corresponding image sequence Matching algorithms such as the sum of squares of pixel difference (SSD, Sum of Squared Differences), and image correlation (NCC, Normalized Cross Correlation), etc., are not specifically limited here.
  • S105 Perform 3D image reconstruction on the measured object according to the pre-acquired calibration parameters of the 3D image reconstruction device, the first coded value, and the second coded value, to obtain a three-dimensional image of the measured object.
  • the calibration parameters of the 3D image reconstruction device include the internal parameters of the camera and the projection equipment in the structured light device, and the conversion relationship between the two (also referred to as external parameters).
  • the internal parameters of the camera include focal length and image
  • the ratio of element size, principal point and tilt angle, external parameters include rotation and translation matrix, distortion parameters, etc. It is understandable that in structured light reconstruction, a three-dimensional image (contour) of the object to be measured can be obtained according to the acquired calibration parameters, the first code value, and the second code value.
  • the structured light-based 3D reconstruction method proposed in this application first detects each main coding point in the target coded image through a preset detection algorithm, and then determines all speckles around each main coding point Image, and determine the first code value of each main code point according to all speckle images around each main code point, and then determine the code area of all speckle images around each main code point in the target projection image, and Perform speckle matching and decoding on each coded region to obtain the second coded value of each speckle image. Finally, according to the calibration parameters of the three-dimensional image reconstruction device, the first coded value and the second coded value, Three-dimensional image reconstruction of the measured object.
  • the problems of low coding density of existing spatial coding and low spatial resolution of reconstructed point clouds are solved, and the accuracy of 3D image reconstruction of objects is improved.
  • Fig. 6 is a schematic diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device 6 of this embodiment includes: a processor 60, a memory 61, and computer instructions 62 stored in the memory 61 and running on the processor 60, such as a three-dimensional structured light-based Rebuild the program.
  • the processor 60 executes the computer instructions 62
  • the steps in the above-mentioned structured light-based three-dimensional reconstruction method embodiments such as steps 101 to 105 shown in FIG. 1, are implemented.
  • the processor 60 executes the computer instruction 62
  • the functions of the modules/units in the foregoing device embodiments for example, the functions of the modules 601 to 605 shown in FIG. 6 are realized.
  • the computer instructions 62 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 61 and executed by the processor 60 to complete This application.
  • the one or more modules/units may be a series of computer instruction instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer instructions 62 in the terminal device 6.
  • the computer instruction 62 may be divided into an acquisition module, a detection module, a determination module, a decoding module, and a reconstruction module (a module in a virtual device), and the specific functions of each module are as follows:
  • the acquisition module is used to acquire a target coded image that is superimposed on the surface information of the tested object after the target projection image is projected onto the surface of the tested object;
  • the target coded image includes a first preset number of main code points And a second preset number of speckle images;
  • the detection module is used to detect each main coding point in the target coded image according to a preset detection algorithm
  • the decoding module is used to determine all speckle images around each main code point, and determine the first code value of each main code point according to the types of all speckle images around each main code point ;
  • the obtaining module is used to determine the coding regions of all speckle images around each main coding point, and perform speckle matching and decoding on each of the coding regions to obtain the second coding value of each speckle image ;
  • the reconstruction module is used to reconstruct the three-dimensional image of the object under test according to the calibration parameters of the three-dimensional image reconstruction device, the first code value, and the second code value obtained in advance to obtain the three-dimensional image of the object under test. image.
  • the terminal device 6 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 60 and a memory 61.
  • FIG. 6 is only an example of the terminal device 6 and does not constitute a limitation on the terminal device 6. It may include more or less components than shown in the figure, or a combination of certain components, or different components
  • the terminal device 6 may also include input and output devices, network access devices, buses, and the like.
  • the so-called processor 60 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or memory of the terminal device 6.
  • the memory 61 may also be an external storage device of the terminal device 6, for example, a plug-in hard disk equipped on the terminal device 6, a smart memory card (Smart Media Card, SMC), or a Secure Digital (SD) Card, Flash Card, etc. Further, the memory 61 may also include both an internal storage unit of the terminal device 6 and an external storage device.
  • the memory 61 is used to store the computer instructions and other programs and data required by the terminal device.
  • the memory 61 can also be used to temporarily store data that has been output or will be output.
  • the disclosed apparatus/terminal device and method may be implemented in other ways.
  • the device/terminal device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units.
  • components can be combined or integrated into another device, or some features can be omitted or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing related hardware through computer instructions.
  • the computer instructions can be stored in a computer-readable storage medium. When the instructions are executed by the processor, they can implement the steps of the foregoing method embodiments. .
  • the computer instruction includes computer instruction code, and the computer instruction code may be in the form of source code, object code, executable file, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer instruction code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signal telecommunications signal
  • software distribution media etc.
  • the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction.
  • the computer-readable medium Does not include electrical carrier signals and telecommunication signals.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The present application is applicable to the technical field of computers, and provides a structured light-based three-dimensional reconstruction method, a terminal device, and a storage medium. The method comprises: obtaining a target coding image formed by superposing a target projection image with surface information of a measured object after the target projection image is projected to the surface of the measured object; detecting each main coding point in the target coding image according to a preset detection algorithm; determining all speckle images around each main coding point, and determining a first coding value of each main coding point according to the types of all the speckle images around each main coding point; determining coding areas of all the speckle images in the target projection image, and respectively performing speckle matching decoding on each coding area to obtain a second coding value of each speckle image; and performing three-dimensional image reconstruction on the measured object according to pre-obtained calibration parameters of a three-dimensional image reconstruction apparatus, the first coding value, and the second coding value to obtain a three-dimensional image of the measured object. The accuracy in three-dimensional reconstruction of an object is improved.

Description

基于结构光的三维重建方法、终端设备及存储介质Three-dimensional reconstruction method, terminal equipment and storage medium based on structured light 技术领域Technical field
本申请属于计算机技术领域,尤其涉及基于结构光的三维重建方法、装置、终端设备及存储介质。This application belongs to the field of computer technology, and in particular relates to a three-dimensional reconstruction method, device, terminal device and storage medium based on structured light.
背景技术Background technique
在结构光三维重建技术中,对于动态目标和场景的三维重建,通常采用的编码方法为空间编码法。这是由于空间编码法仅需投影一幅编码图案,其编码信息由空间编码特征或其不同的排列组合来生成,编码和解码过程均可在单幅图像内完成,具有测量速度快、实时性好的优点。但是,现有的空间编码法,由于其编码元素的密度远远低于时间编码结构光,导致存在可重建的点云数量少、空间分辨率不足的问题。目前,为了提高空间编码可重建的点云的空间分辨率,通常采用增加编码元素的数量,或者增大编码窗口的方法。In the structured light 3D reconstruction technology, for the 3D reconstruction of dynamic targets and scenes, the coding method usually used is the spatial coding method. This is because the spatial coding method only needs to project a coding pattern, and its coding information is generated by spatial coding features or different permutations and combinations. The coding and decoding processes can be completed in a single image, with fast measurement speed and real-time performance. Good advantages. However, the existing spatial coding method, because the density of its coding elements is much lower than that of the time-coded structured light, causes the problem of a small number of point clouds that can be reconstructed and insufficient spatial resolution. At present, in order to improve the spatial resolution of the point cloud that can be reconstructed by spatial coding, a method of increasing the number of coding elements or increasing the coding window is usually adopted.
然而,增大编码元素的数量会导致编码识别难度的增加,增大编码窗口会导致解码成功率的下降,导致物体三维重建的准确性不高。因此,如何提高空间编码的编码密度、提升其重建点云的空间分辨率,是现今基于空间编码结构光的基于结构光的三维重建技术仍待解决的难题之一。However, increasing the number of coding elements will increase the difficulty of coding recognition, and increasing the coding window will result in a decrease in the decoding success rate, resulting in low accuracy of the three-dimensional reconstruction of the object. Therefore, how to increase the coding density of spatial coding and the spatial resolution of reconstructed point clouds is one of the problems to be solved in the current spatial coding structured light-based 3D reconstruction technology based on structured light.
技术问题technical problem
本申请实施例提供了一种基于结构光的三维重建方法、终端设备及存储介质,以解决现有技术中,结构光的空间编码的编码密度低、重建点云的空间分辨率不高,导致的基于结构光的三维重建不准确的问题。The embodiments of the present application provide a structured light-based three-dimensional reconstruction method, terminal equipment, and storage medium to solve the problem that in the prior art, the coding density of structured light spatial coding is low and the spatial resolution of reconstructed point clouds is not high, resulting in The problem of inaccurate 3D reconstruction based on structured light.
技术解决方案Technical solutions
本申请实施例的第一方面提供了一种基于结构光的三维重建方法,包括:The first aspect of the embodiments of the present application provides a three-dimensional reconstruction method based on structured light, including:
获取将目标投影图像投射到被测物体表面后,与所述被测物体的表面信息叠加而成的目标编码图像;所述目标编码图像包括第一预设数量的主编码点以及第二预设数量的散斑图像;Obtain a target coded image formed by projecting the target projection image onto the surface of the measured object and superimposed on the surface information of the measured object; the target coded image includes a first preset number of main code points and a second preset Number of speckle images;
根据预设的检测算法检测出所述目标编码图像中的每个主编码点;Detect each main coding point in the target coded image according to a preset detection algorithm;
确定所述每个主编码点周围的所有散斑图像,根据所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值;Determining all speckle images around each main coding point, and determining the first code value of each main coding point according to the types of all speckle images around each main coding point;
确定所述每个主编码点周围的所有散斑图像在所述目标投影图像中的编码区域,分别对每个所述编码区域进行散斑点匹配解码,得到所述每个散斑图像的第二编码值;Determine the coding regions of all speckle images around each main coding point in the target projection image, and perform speckle matching and decoding on each of the coding regions to obtain the second speckle image of each Code value
根据预先获取的三维图像重建装置的标定参数、所述第一编码值以及所述第二编码值,对所述被测物体进行三维图像重建,得到所述被测物体的三维图像。According to the pre-acquired calibration parameters of the three-dimensional image reconstruction device, the first code value and the second code value, perform three-dimensional image reconstruction on the measured object to obtain a three-dimensional image of the measured object.
本申请实施例的第二方面提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机指令,所述处理器执行所述计算机指令时实现如下步骤:A second aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and computer instructions stored in the memory and running on the processor. When the processor executes the computer instructions, Implement the following steps:
获取将目标投影图像投射到被测物体表面后,与所述被测物体的表面信息叠加而成的目标编码图像;所述目标编码图像包括第一预设数量的主编码点以及第二预设数量的散斑图像;Obtain a target coded image formed by projecting the target projection image onto the surface of the measured object and superimposed on the surface information of the measured object; the target coded image includes a first preset number of main code points and a second preset Number of speckle images;
根据预设的检测算法检测出所述目标编码图像中的每个主编码点;Detect each main coding point in the target coded image according to a preset detection algorithm;
确定所述每个主编码点周围的所有散斑图像,根据所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值;Determining all speckle images around each main coding point, and determining the first code value of each main coding point according to the types of all speckle images around each main coding point;
确定所述每个主编码点周围的所有散斑图像在所述目标投影图像中的编码区域,分别对每个所述编码区域进行散斑点匹配解码,得到所述每个散斑图像的第二编码值;Determine the coding regions of all speckle images around each main coding point in the target projection image, and perform speckle matching and decoding on each of the coding regions to obtain the second speckle image of each Code value
根据预先获取的三维图像重建装置的标定参数、所述第一编码值以及所述第二编码值,对所述被测物体进行三维图像重建,得到所述被测物体的三维图像。According to the pre-acquired calibration parameters of the three-dimensional image reconstruction device, the first code value and the second code value, perform three-dimensional image reconstruction on the measured object to obtain a three-dimensional image of the measured object.
本申请实施例的第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令被处理器执行时实现如下步骤:A third aspect of the embodiments of the present application provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the following steps are implemented:
获取将目标投影图像投射到被测物体表面后,与所述被测物体的表面信息叠加而成的目标编码图像;所述目标编码图像包括第一预设数量的主编码点以及第二预设数量的散斑图像;Obtain a target coded image formed by projecting the target projection image onto the surface of the measured object and superimposed on the surface information of the measured object; the target coded image includes a first preset number of main code points and a second preset Number of speckle images;
根据预设的检测算法检测出所述目标编码图像中的每个主编码点;Detect each main coding point in the target coded image according to a preset detection algorithm;
确定所述每个主编码点周围的所有散斑图像,根据所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值;Determining all speckle images around each main coding point, and determining the first code value of each main coding point according to the types of all speckle images around each main coding point;
确定所述每个主编码点周围的所有散斑图像在所述目标投影图像中的编码区域,分别对每个所述编码区域进行散斑点匹配解码,得到所述每个散斑图像的第二编码值;Determine the coding regions of all speckle images around each main coding point in the target projection image, and perform speckle matching and decoding on each of the coding regions to obtain the second speckle image of each Code value
根据预先获取的三维图像重建装置的标定参数、所述第一编码值以及所述第二编码值,对所述被测物体进行三维图像重建,得到所述被测物体的三维图像。According to the pre-acquired calibration parameters of the three-dimensional image reconstruction device, the first code value and the second code value, perform three-dimensional image reconstruction on the measured object to obtain a three-dimensional image of the measured object.
本申请实施例与现有技术相比存在的有益效果是:首先通过预设的检测算法检测出目标编码图像中的每个主编码点,然后确定每个主编码点周围的所有散斑图像,并根据每个主编码点周围的所有散斑图像确定每个主编码点的第一编码值,再确定每个主编码点周围的所有散斑图像在目标投影图像中的编码区域,并分别对每个编码区域进行散斑点匹配解码,得到每个散斑图像的第二编码值,最后根据三维图像重建装置的标定参数、所述第一编码值以及所述第二编码值,对被测物体进行三维图像重建。解决了现有空间编码的编码密度低、重建点云的空间分辨率低下的问题,提高物体三维图像重建的准确性。Compared with the prior art, the embodiment of the present application has the following beneficial effects: firstly, each main code point in the target coded image is detected by a preset detection algorithm, and then all speckle images around each main code point are determined. And determine the first code value of each main code point according to all speckle images around each main code point, and then determine the code area of all speckle images around each main code point in the target projection image, and respectively Perform speckle matching and decoding on each code area to obtain the second code value of each speckle image. Finally, according to the calibration parameters of the 3D image reconstruction device, the first code value and the second code value, the measured object Perform 3D image reconstruction. The problems of low coding density of existing spatial coding and low spatial resolution of reconstructed point clouds are solved, and the accuracy of 3D image reconstruction of objects is improved.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only of the present application. For some embodiments, for those of ordinary skill in the art, other drawings can be obtained from these drawings without creative labor.
图1是本申请实施例提供的基于结构光的三维重建方法的实施流程图;FIG. 1 is an implementation flowchart of a structured light-based 3D reconstruction method provided by an embodiment of the present application;
图2是图1中S102的具体实施流程图;Figure 2 is a flow chart of the specific implementation of S102 in Figure 1;
图3是图1中S103的具体实施流程图;Figure 3 is a flow chart of the specific implementation of S103 in Figure 1;
图4是图3中S1033的具体实施流程图;Figure 4 is a flowchart of the specific implementation of S1033 in Figure 3;
图5是图1中S104的具体实施流程图;Figure 5 is a flowchart of the specific implementation of S104 in Figure 1;
图6是本发明基于结构光的三维重建装置的结构示意图;6 is a schematic diagram of the structure of the structured light-based 3D reconstruction device of the present invention;
图7是本发明实施例提供的终端设备的示意图。Fig. 7 is a schematic diagram of a terminal device provided by an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
以下描述中,为了说明而不是为了限定,提出了诸如特定装置结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的装置、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific device structure and technology are proposed for a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known devices, devices, circuits, and methods are omitted to avoid unnecessary details from obstructing the description of this application.
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions described in the present application, specific embodiments are used for description below.
如图1所示,是本申请实施例提供的基于结构光的三维重建方法的实施流程图。由图1可知,本申请提供的基于结构光的三维重建方法,该实施例的执行主体是终端设备,包括:As shown in FIG. 1, it is an implementation flowchart of a structured light-based 3D reconstruction method provided by an embodiment of the present application. It can be seen from FIG. 1 that, in the structured light-based 3D reconstruction method provided by this application, the execution subject of this embodiment is a terminal device, including:
S101,获取将目标投影图像投射到被测物体表面后,与所述被测物体的表面信息叠加而成的目标编码图像;所述目标编码图像包括第一预设数量的主编码点以及第二预设数量的散斑图像。S101. Obtain a target encoded image that is superimposed on the surface information of the measured object after the target projection image is projected onto the surface of the measured object; the target encoded image includes a first preset number of main encoding points and a second A preset number of speckle images.
在本实施例中,目标投影图像为将预设种类(如8种)的不同局部散斑图像按照编码原理嵌入预设编码网格内形成的图像。将所述目标投影图像采用激光与DOE衍射光栅的方式投射到被测物体表面后,与所述被测物体表面的颜色、纹理等表面信息叠加而成目标编码图像。具体地,所述目标编码图像包括第一预设数量的主编码点以及第二预设数量的散斑图像。每个所述主编码点周围包 含有不同的局部散斑图像。可以理解地,以每个所述主编码点周围的局部散斑图像做为编码元素,对所述目标编码图像进行编码。In this embodiment, the target projection image is an image formed by embedding different local speckle images of preset types (for example, 8 types) into a preset coding grid according to the coding principle. After the target projection image is projected onto the surface of the measured object by means of laser and DOE diffraction grating, it is superimposed with the surface information such as the color and texture of the surface of the measured object to form a target encoded image. Specifically, the target coded image includes a first preset number of main code points and a second preset number of speckle images. Each of the main coding points contains different local speckle images. Understandably, the target coded image is coded by using the local speckle image around each of the main coding points as coding elements.
S102,根据预设的检测算法检测出所述目标编码图像中的每个主编码点。S102: Detect each main coding point in the target coded image according to a preset detection algorithm.
具体地,所述预设的检测算法包括:根据所述目标编码图像中的编码网格的几何特征,确定检测所述目标编码图像中的每个目标主编码点的局部对称检测算子,根据所述局部对称检测算子检测出所述目标编码图像中的每个目标主编码点。所述目标编码图像中的编码网格具有几何特征,所述主编码点为具有几何特征的编码网格的网格线交点。Specifically, the preset detection algorithm includes: determining a local symmetry detection operator for detecting each target main coding point in the target coding image according to the geometric characteristics of the coding grid in the target coding image, and The local symmetry detection operator detects each target main coding point in the target coded image. The coding grid in the target coding image has geometric characteristics, and the main coding point is the intersection of grid lines of the coding grid with geometric characteristics.
进一步地,为了更清楚地对所述S102进行解释,如图2所示,是图1中S102的具体实施流程图。需要说明的是,在本实施方式中,所述编码网格为栅格图形。具体地,由图2可知,S102包括:Further, in order to explain S102 more clearly, as shown in FIG. 2, it is a flowchart of specific implementation of S102 in FIG. 1. It should be noted that, in this embodiment, the coding grid is a grid pattern. Specifically, it can be seen from FIG. 2 that S102 includes:
S1021,提取所有所述编码网格的网格线交点。S1021: Extract all grid lines intersection points of the coding grid.
在本实施例中,所述编码网格具有显著的几何特征,例如正方形编码网格(常见的栅格)或者三角形编码网格等,基于所述编码网格的几何特征,提取所述编码网格的网格线交点,例如栅格编码网格的水平栅格线和竖直栅格线的交点。可以理解的是,根据编码网格的几何特征,每个编码网格通常包含有多个网格线交点。例如,在本实施例中,以栅格为所述编码网格为例,每个栅格包含有4个水平栅格线和竖直栅格线的交点。In this embodiment, the coding grid has significant geometric features, such as a square coding grid (a common grid) or a triangular coding grid. Based on the geometric characteristics of the coding grid, the coding grid is extracted The intersection of the grid lines of the grid, for example, the intersection of the horizontal grid lines and the vertical grid lines of a grid coding grid. It is understandable that, according to the geometric characteristics of the coding grid, each coding grid usually contains a plurality of intersections of grid lines. For example, in this embodiment, taking the grid as the coding grid as an example, each grid includes four intersections of horizontal grid lines and vertical grid lines.
S1022,根据所述编码网格的几何特征,生成用于检测所述目标编码图像包含的主编码点的局部对称检测算子。S1022: Generate a local symmetry detection operator for detecting main coding points contained in the target coded image according to the geometric characteristics of the coding grid.
在本实施例中,所述编码网格为栅格,所述主编码点为水平栅格线和竖直栅格线的交点,则根据栅格的几何特征,生成用于检测所述目标编码图像包含的主编码点的局部对称检测算子为:In this embodiment, the coding grid is a grid, and the main coding point is the intersection of a horizontal grid line and a vertical grid line. Then, according to the geometric characteristics of the grid, the code for detecting the target is generated. The local symmetry detection operator of the main coding point contained in the image is:
Figure PCTCN2019089621-appb-000001
Figure PCTCN2019089621-appb-000001
其中,I表示目标投影图像,(i,j)为当前检测点的像素坐标,w表示以(i,j)为交点的栅格的长度或宽度,(α,β)表示包含交点(i,j)的所有栅格内的每个像素相对于交点(i,j)的偏移量,因此α,β∈[-w,w]。设l=w/3,
Figure PCTCN2019089621-appb-000002
为包含交点(i,j)的所有栅格之外区域的像素偏移量,
Figure PCTCN2019089621-appb-000003
Among them, I represents the target projection image, (i, j) is the pixel coordinate of the current detection point, w represents the length or width of the grid with (i, j) as the intersection point, and (α, β) represents the intersection point (i, The offset of each pixel in all grids of j) relative to the intersection point (i, j), so α, β ∈ [-w, w]. Let l=w/3,
Figure PCTCN2019089621-appb-000002
Is the pixel offset of all areas outside the grid containing the intersection (i, j),
Figure PCTCN2019089621-appb-000003
S1023,基于所述局部对称检测算子检测出所述目标编码图像中的每个主编码点。S1023: Detect each main coding point in the target coded image based on the local symmetry detection operator.
具体地,在本实施例中,可以利用上述局部对称检测算子T从所述目标编码图像中检测出每个主编码点。进一步地,可根据主编码点在局部的旋转对称特征进一步检测出误选的主编码点,提高主编码点检测的准确性。Specifically, in this embodiment, the above-mentioned local symmetry detection operator T may be used to detect each main coding point from the target coded image. Furthermore, the incorrectly selected main coding point can be further detected according to the local rotational symmetry characteristics of the main coding point, so as to improve the accuracy of the detection of the main coding point.
S103,确定所述每个主编码点周围的所有散斑图像,根据所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值。S103: Determine all speckle images around each main coding point, and determine a first code value of each main coding point according to the types of all speckle images around each main coding point.
具体地,根据所述目标编码图像中编码网格的几何特征可知,每个主编码点周围包含有相邻的多个散斑图像,例如,在以栅格为编码网格的目标编码图像中,每个主编码点周围包含有4个相邻的散斑图像,根据散斑图像的成像原理可知,每个散斑图像均不相同,将不相同的散斑图像定义为不同的散斑图像类型。因此,可以确定所述每个主编码点周围的所有散斑图像,并根据所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值。Specifically, according to the geometric characteristics of the coding grid in the target coded image, it can be known that there are multiple adjacent speckle images around each main coding point, for example, in the target coded image with the grid as the coding grid , There are 4 adjacent speckle images around each main code point. According to the imaging principle of speckle images, each speckle image is different. Different speckle images are defined as different speckle images Types of. Therefore, all speckle images around each main coding point can be determined, and the first code value of each main coding point can be determined according to the types of all speckle images around each main coding point.
进一步地,如图3所示,是图1中S103的具体实施流程图。当编码网格的网格线交点具有旋转对称性,散斑图像填充在所述编码网格时,S103可以包括:Further, as shown in FIG. 3, it is a flowchart of specific implementation of S103 in FIG. When the intersection of the grid lines of the coding grid has rotational symmetry and the speckle image is filled in the coding grid, S103 may include:
S1031,根据所述编码网格的网格线交点的旋转对称性,确定所述每个主编码点在所述目标图像中的拓扑编码网格。S1031: Determine the topological coding grid of each main coding point in the target image according to the rotational symmetry of the intersection of the grid lines of the coding grid.
具体地,在实际应用中,所述编码网格的几何特征为确定的,所以可以根 据所述编码网格的网格线交点的旋转对称性,确定每个主编码点的拓扑编码网格,例如根据栅格的水平栅格线和竖直栅格线的交点的旋转对称性,可以确定每个主编码点周围包含有4个编码网格(栅格),即每个主编码点的拓扑编码网格为相邻的4个栅格,可以理解地,在本实施例中,所述每个主编码点在所述目标图像中的拓扑编码网格均包含有相邻的4个栅格。Specifically, in practical applications, the geometric characteristics of the coding grid are determined, so the topological coding grid of each main coding point can be determined according to the rotational symmetry of the intersection of the grid lines of the coding grid, For example, according to the rotational symmetry of the intersection of the horizontal and vertical grid lines of the grid, it can be determined that each main code point contains 4 code grids (grids), that is, the topology of each main code point The coding grid is 4 adjacent grids. It is understandable that, in this embodiment, the topological coding grid of each main coding point in the target image includes 4 adjacent grids. .
S1032,获取所述每个主编码点的拓扑编码网格中填充的所有散斑图像。S1032: Obtain all speckle images filled in the topological coding grid of each main coding point.
具体地,根据散斑图像的生成原理可以确定在每个编码网格中填充的散斑图像不同,且具有唯一性。在本实施例中,每个主编码的拓扑编码网格包含有相邻的4个栅格,则分别获取每相邻的4个栅格中的散斑图像。Specifically, according to the generation principle of the speckle image, it can be determined that the speckle image filled in each coding grid is different and unique. In this embodiment, the topological coding grid of each main code includes 4 adjacent grids, and the speckle images in each of the adjacent 4 grids are obtained respectively.
S1033,分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,并基于所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值。S1033: Perform image type recognition on all speckle images around each main coding point, and determine the first image type of each main coding point based on the types of all speckle images around each main coding point An encoding value.
具体地,由于每个主编码点周围的散斑图像的类型不同,且每个散斑图像的类型具有唯一性,因此可以根据每个主编码点周围的所有散斑图像的类型,在本实施例中为4个散斑图像的类型,确定每个主编码点的第一编码值。Specifically, because the types of speckle images around each main coding point are different, and the type of each speckle image is unique, it can be based on the types of all speckle images around each main coding point. In the example, there are 4 types of speckle images, and the first code value of each main code point is determined.
进一步地,如图4所示,是图3中S1033的具体实施流程图。由图4可知,S1033包括:Further, as shown in FIG. 4, it is a flowchart of specific implementation of S1033 in FIG. 3. As shown in Figure 4, S1033 includes:
S1034,根据预先训练完成的散斑图像类型识别模型,分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,得到所述每个主编码点周围的所有散斑图像的类型。S1034: According to the pre-trained speckle image type recognition model, perform image type recognition on all speckle images around each main coding point, to obtain the types of all speckle images around each main coding point .
具体地,所述预先训练完成的散斑图像类型识别模型为深度神经网络模型,所述神经网络模型的训练样本为采集的预设数量的不同种类的散斑图像块,例如,在本实施例中,采集预设数量的8种不同散斑图像块作为训练样本集,训练出用于识别散斑图像类型的散斑图像类型识别模型,该模型分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,得到所述每个主编码点周围的所有散斑图像的类型。Specifically, the pre-trained speckle image type recognition model is a deep neural network model, and the training samples of the neural network model are a preset number of collected speckle image blocks of different types. For example, in this embodiment In, a preset number of 8 different speckle image blocks are collected as a training sample set, and a speckle image type recognition model used to identify the type of speckle image is trained. The speckle image is subjected to image type recognition, and the types of all speckle images around each main coding point are obtained.
S1035,根据预设的主编码点的第一编码值与主编码点周围的所有散斑图像类型之间的映射关系,确定所述每个主编码点的第一编码值。S1035: Determine the first code value of each main code point according to the preset mapping relationship between the first code value of the main code point and all speckle image types around the main code point.
具体地,预先设置并存储有主编码点的第一编码值与主编码点周围的所有散斑图像类型之间的映射关系,例如,假设在所述映射关系中有主编码点的第一编码值为1234,对应的散斑图像类型按照顺时针方向依次为1-2-3-4,则在本实施例中,假设所述散斑图像类型识别模型识别出主编码点A周围的4个散斑图像的类型分别为(顺时针方向)1-2-3-4,则根据所述映射关系可确定该主编码点A的编码值为1234,依次类推,可以得到所述每个主编码点的第一编码值。Specifically, the mapping relationship between the first code value of the main code point and all speckle image types around the main code point is preset and stored, for example, assuming that there is a first code of the main code point in the mapping relationship The value is 1234, and the corresponding speckle image types are 1-2-3-4 in the clockwise direction. In this embodiment, it is assumed that the speckle image type recognition model has identified 4 speckle image types around the main code point A. The types of speckle images are (clockwise) 1-2-3-4, and then the encoding value of the main code point A can be determined to be 1234 according to the mapping relationship. By analogy, each main code can be obtained. The first code value of the point.
S104,确定所述每个主编码点周围的所有散斑图像在所述目标投影图像中的编码区域,分别对每个所述编码区域进行散斑点匹配解码,得到所述每个散斑图像的第二编码值。S104. Determine the coding regions of all speckle images around each main coding point in the target projection image, and perform speckle matching and decoding on each of the coding regions to obtain the speckle image The second code value.
具体地,以所述每个主编码点在所述目标编码图像中的编码坐标,以及对应的第一编码值,可以确定每个主编码点在所述目标投影图像中的投影坐标,以所述每个主编码点的投影坐标为基准,确定所有散斑图像在所述目标图像中的编码区域。进一步地,通过以所述每个编码区域为单位,对每个编码区域的散斑图像进行散斑点匹配解码,得到所述每个散斑图像的第二编码值。Specifically, by using the coding coordinates of each main coding point in the target coded image and the corresponding first coding value, the projection coordinates of each main coding point in the target projection image can be determined, and the The projection coordinates of each main coding point are used as a reference to determine the coding regions of all speckle images in the target image. Further, by taking each coding region as a unit, performing speckle matching decoding on the speckle image of each coding region, to obtain the second coding value of each speckle image.
具体地,如图5所示,是图1中S104的具体实施流程图。由图5可知,S104包括:Specifically, as shown in FIG. 5, it is a flowchart of specific implementation of S104 in FIG. It can be seen from Figure 5 that S104 includes:
S1041,根据所述每个主编码点的第一编码值以及所述每个主编码点在所述目标编码图像中的编码坐标,确定所述每个主编码点在所述目标投影图像中的投影坐标。S1041: Determine the position of each main coding point in the target projected image according to the first coding value of each main coding point and the coding coordinates of each main coding point in the target coded image. Projection coordinates.
具体地,根据结构光三维重建的原理,所述目标编码图像中的编码坐标与所述目标投影图像中的投影坐标之间具有编码映射关系,因此,在确定了所述主编码点的编码值后,即可在目标投影图像中确定每个主编码点对应的编码坐标以及每个主编码点周围的4个相邻的散斑图像区域。Specifically, according to the principle of structured light three-dimensional reconstruction, there is a coding mapping relationship between the coding coordinates in the target coding image and the projection coordinates in the target projection image. Therefore, the coding value of the main coding point is determined Then, the coding coordinates corresponding to each main coding point and 4 adjacent speckle image regions around each main coding point can be determined in the target projection image.
S1042,基于所述每个主编码点的投影坐标确定所述每个主编码点周围的散 斑图像在所述目标投影图像中的编码区域。S1042: Determine, based on the projection coordinates of each main coding point, the coding area of the speckle image around each main coding point in the target projection image.
根据结构光的原理,对分割出的散斑区域内的散斑点,在目标投影图像中可基于每个主编码点的投影坐标确定每个主编码点周围的散斑图像区域对应的标准散斑图像区域。According to the principle of structured light, for the speckle in the segmented speckle area, the standard speckle corresponding to the speckle image area around each main code point can be determined in the target projection image based on the projection coordinates of each main code point Image area.
S1043,根据预设的局部图像匹配解码算法,分别对每个散斑图像在所述目标投影图像中的编码区域进行匹配解码,得到所述每个散斑图像的编码区域的第二编码值。S1043, according to a preset local image matching and decoding algorithm, respectively perform matching and decoding on the coding region of each speckle image in the target projection image to obtain a second coding value of the coding region of each speckle image.
具体地,所述预设的局部图像匹配解码算法为像素级匹配算法,如所述预设的散斑图像解码算法包括例如像素差的绝对值(SAD,Sum of Absolute Differences),图像序列中对应像素差的平方和(SSD,Sum of Squared Differences),图像的相关性(NCC,Normalized Cross Correlation)等匹配算法,在此不做具体限制。Specifically, the preset local image matching and decoding algorithm is a pixel-level matching algorithm. For example, the preset speckle image decoding algorithm includes, for example, the absolute value of pixel difference (SAD, Sum of Absolute Differences), and the corresponding image sequence Matching algorithms such as the sum of squares of pixel difference (SSD, Sum of Squared Differences), and image correlation (NCC, Normalized Cross Correlation), etc., are not specifically limited here.
S105,根据预先获取的三维图像重建装置的标定参数、所述第一编码值以及所述第二编码值,对所述被测物体进行三维图像重建,得到所述被测物体的三维图像。S105: Perform 3D image reconstruction on the measured object according to the pre-acquired calibration parameters of the 3D image reconstruction device, the first coded value, and the second coded value, to obtain a three-dimensional image of the measured object.
具体地,所述三维图像重建装置的标定参数包括结构光装置中相机与投影设备的内部参数,以及两者之间的转换关系(亦称为外部参数),其中,相机内部参数包括焦距和像元尺寸的比值,主点以及倾斜角,外部参数包括旋转和平移矩阵,畸变参数等。可以理解的是,在结构光重建中,根据获取的标定参数、所述第一编码值以及所述第二编码值,可以获得被测物体的三维图像(轮廓)。Specifically, the calibration parameters of the 3D image reconstruction device include the internal parameters of the camera and the projection equipment in the structured light device, and the conversion relationship between the two (also referred to as external parameters). The internal parameters of the camera include focal length and image The ratio of element size, principal point and tilt angle, external parameters include rotation and translation matrix, distortion parameters, etc. It is understandable that in structured light reconstruction, a three-dimensional image (contour) of the object to be measured can be obtained according to the acquired calibration parameters, the first code value, and the second code value.
通过上述实施例可知,本申请提出的基于结构光的三维重建方法,首先通过预设的检测算法检测出目标编码图像中的每个主编码点,然后确定每个主编码点周围的所有散斑图像,并根据每个主编码点周围的所有散斑图像确定每个主编码点的第一编码值,再确定每个主编码点周围的所有散斑图像在目标投影图像中的编码区域,并分别对每个编码区域进行散斑点匹配解码,得到每个散 斑图像的第二编码值,最后根据三维图像重建装置的标定参数、所述第一编码值以及所述第二编码值,对被测物体进行三维图像重建。解决了现有空间编码的编码密度低、重建点云的空间分辨率低下的问题,提高物体三维图像重建的准确性。It can be seen from the above embodiments that the structured light-based 3D reconstruction method proposed in this application first detects each main coding point in the target coded image through a preset detection algorithm, and then determines all speckles around each main coding point Image, and determine the first code value of each main code point according to all speckle images around each main code point, and then determine the code area of all speckle images around each main code point in the target projection image, and Perform speckle matching and decoding on each coded region to obtain the second coded value of each speckle image. Finally, according to the calibration parameters of the three-dimensional image reconstruction device, the first coded value and the second coded value, Three-dimensional image reconstruction of the measured object. The problems of low coding density of existing spatial coding and low spatial resolution of reconstructed point clouds are solved, and the accuracy of 3D image reconstruction of objects is improved.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
图6是本申请实施例提供的终端设备的示意图。如图6所示,该实施例的终端设备6包括:处理器60、存储器61以及存储在所述存储器61中并可在所述处理器60上运行的计算机指令62,例如基于结构光的三维重建程序。所述处理器60执行所述计算机指令62时实现上述各个基于结构光的三维重建方法实施例中的步骤,例如图1所示的步骤101至105。或者,所述处理器60执行所述计算机指令62时实现上述各装置实施例中各模块/单元的功能,例如图6所示模块601至605的功能。Fig. 6 is a schematic diagram of a terminal device provided by an embodiment of the present application. As shown in FIG. 6, the terminal device 6 of this embodiment includes: a processor 60, a memory 61, and computer instructions 62 stored in the memory 61 and running on the processor 60, such as a three-dimensional structured light-based Rebuild the program. When the processor 60 executes the computer instructions 62, the steps in the above-mentioned structured light-based three-dimensional reconstruction method embodiments, such as steps 101 to 105 shown in FIG. 1, are implemented. Alternatively, when the processor 60 executes the computer instruction 62, the functions of the modules/units in the foregoing device embodiments, for example, the functions of the modules 601 to 605 shown in FIG. 6 are realized.
示例性的,所述计算机指令62可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器61中,并由所述处理器60执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机指令指令段,该指令段用于描述所述计算机指令62在所述终端设备6中的执行过程。例如,所述计算机指令62可以被分割成获取模块、检测模块、确定模块、解码模块、重建模块(虚拟装置中的模块),各模块具体功能如下:Exemplarily, the computer instructions 62 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 61 and executed by the processor 60 to complete This application. The one or more modules/units may be a series of computer instruction instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer instructions 62 in the terminal device 6. For example, the computer instruction 62 may be divided into an acquisition module, a detection module, a determination module, a decoding module, and a reconstruction module (a module in a virtual device), and the specific functions of each module are as follows:
获取模块,用于获取将目标投影图像投射到被测物体表面后,与所述被测物体的表面信息叠加而成的目标编码图像;所述目标编码图像包括第一预设数量的主编码点以及第二预设数量的散斑图像;The acquisition module is used to acquire a target coded image that is superimposed on the surface information of the tested object after the target projection image is projected onto the surface of the tested object; the target coded image includes a first preset number of main code points And a second preset number of speckle images;
检测模块,用于根据预设的检测算法检测出所述目标编码图像中的每个主编码点;The detection module is used to detect each main coding point in the target coded image according to a preset detection algorithm;
解码模块,用于确定所述每个主编码点周围的所有散斑图像,根据所述每 个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值;The decoding module is used to determine all speckle images around each main code point, and determine the first code value of each main code point according to the types of all speckle images around each main code point ;
得到模块,用于确定所述每个主编码点周围的所有散斑图像的编码区域,分别对每个所述编码区域进行散斑点匹配解码,得到所述每个散斑图像的第二编码值;The obtaining module is used to determine the coding regions of all speckle images around each main coding point, and perform speckle matching and decoding on each of the coding regions to obtain the second coding value of each speckle image ;
重建模块,用于根据预先获取的三维图像重建装置的标定参数、所述第一编码值以及所述第二编码值,对所述被测物体进行三维图像重建,得到所述被测物体的三维图像。The reconstruction module is used to reconstruct the three-dimensional image of the object under test according to the calibration parameters of the three-dimensional image reconstruction device, the first code value, and the second code value obtained in advance to obtain the three-dimensional image of the object under test. image.
所述终端设备6可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端设备可包括,但不仅限于,处理器60、存储器61。本领域技术人员可以理解,图6仅仅是终端设备6的示例,并不构成对终端设备6的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备6还可以包括输入输出设备、网络接入设备、总线等。The terminal device 6 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The terminal device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art can understand that FIG. 6 is only an example of the terminal device 6 and does not constitute a limitation on the terminal device 6. It may include more or less components than shown in the figure, or a combination of certain components, or different components For example, the terminal device 6 may also include input and output devices, network access devices, buses, and the like.
所称处理器60可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 60 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
所述存储器61可以是所述终端设备6的内部存储单元,例如终端设备6的硬盘或内存。所述存储器61也可以是所述终端设备6的外部存储设备,例如所述终端设备6上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器61还可以既包括所述终端设备6的内部存储单元也包括外部存储设备。所述存储器61用于存储所述计算机指令以及所述终端设备所需的其他程序和数据。所述存储器61还可以用于暂时地存储已经输出或者将要输出的数据。The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, for example, a plug-in hard disk equipped on the terminal device 6, a smart memory card (Smart Media Card, SMC), or a Secure Digital (SD) Card, Flash Card, etc. Further, the memory 61 may also include both an internal storage unit of the terminal device 6 and an external storage device. The memory 61 is used to store the computer instructions and other programs and data required by the terminal device. The memory 61 can also be used to temporarily store data that has been output or will be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上 述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述装置中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and conciseness of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned functions can be allocated to different functional units, Module completion, that is, divide the internal structure of the device into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist alone physically, or two or more units can be integrated into one unit. The above-mentioned integrated units can be hardware-based Formal realization can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the above-mentioned device, reference may be made to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may be aware that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the device/terminal device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units. Or components can be combined or integrated into another device, or some features can be omitted or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部 单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机指令来指令相关的硬件来完成,所述的计算机指令可存储于一计算机可读存储介质中,该计算机指令在被处理器执行时,可实现上述各个方法实施例的步骤。。其中,所述计算机指令包括计算机指令代码,所述计算机指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。If the integrated module/unit is implemented in the form of 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, this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing related hardware through computer instructions. The computer instructions can be stored in a computer-readable storage medium. When the instructions are executed by the processor, they can implement the steps of the foregoing method embodiments. . Wherein, the computer instruction includes computer instruction code, and the computer instruction code may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer instruction code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or deleted according to the requirements of the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, the computer-readable medium Does not include electrical carrier signals and telecommunication signals.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种基于结构光的三维重建方法,其特征在于,包括:A three-dimensional reconstruction method based on structured light, which is characterized in that it includes:
    获取将目标投影图像投射到被测物体表面后,与所述被测物体的表面信息叠加而成的目标编码图像;所述目标编码图像包括第一预设数量的主编码点以及第二预设数量的散斑图像;Obtain a target coded image formed by projecting the target projection image onto the surface of the measured object and superimposed on the surface information of the measured object; the target coded image includes a first preset number of main code points and a second preset Number of speckle images;
    根据预设的检测算法检测出所述目标编码图像中的每个主编码点;Detect each main coding point in the target coded image according to a preset detection algorithm;
    确定所述每个主编码点周围的所有散斑图像,根据所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值;Determining all speckle images around each main coding point, and determining the first code value of each main coding point according to the types of all speckle images around each main coding point;
    确定所述每个主编码点周围的所有散斑图像在所述目标投影图像中的编码区域,分别对每个所述编码区域进行散斑点匹配解码,得到所述每个散斑图像的第二编码值;Determine the coding regions of all speckle images around each main coding point in the target projection image, and perform speckle matching and decoding on each of the coding regions to obtain the second speckle image of each Code value
    根据预先获取的三维图像重建装置的标定参数、所述第一编码值以及所述第二编码值,对所述被测物体进行三维图像重建,得到所述被测物体的三维图像。According to the pre-acquired calibration parameters of the three-dimensional image reconstruction device, the first code value and the second code value, perform three-dimensional image reconstruction on the measured object to obtain a three-dimensional image of the measured object.
  2. 如权利要求1所述的基于结构光的三维重建方法,其特征在于,所述主编码点为具有几何特征的编码网格的网格线交点,所述根据预设的检测算法检测出所述目标编码图像中的每个主编码点,包括:The 3D reconstruction method based on structured light according to claim 1, wherein the main coding point is the intersection of grid lines of a coding grid with geometric characteristics, and the detection algorithm detects the Each main code point in the target coded image includes:
    提取所有所述编码网格的网格线交点;Extracting all grid lines intersection points of the coding grid;
    根据所述编码网格的几何特征,生成用于检测所述目标编码图像包含的主编码点的局部对称检测算子;Generating a local symmetry detection operator for detecting the main coding points contained in the target coded image according to the geometric characteristics of the coding grid;
    基于所述局部对称检测算子检测出所述目标编码图像中的每个主编码点。Each main coding point in the target coded image is detected based on the local symmetry detection operator.
  3. 如权利要求2所述的基于结构光的三维重建方法,其特征在于,所述编码网格的网格线交点具有旋转对称性,所述散斑图像填充在所述编码网格;3. The structured light-based 3D reconstruction method of claim 2, wherein the intersection of grid lines of the coding grid has rotational symmetry, and the speckle image is filled in the coding grid;
    所述确定所述每个主编码点周围的所有散斑图像,根据所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值,包括:The determining all speckle images around each main coding point, and determining the first code value of each main coding point according to the types of all speckle images around each main coding point includes:
    根据所述编码网格的网格线交点的旋转对称性,确定所述每个主编码点在所述目标图像中的拓扑编码网格;Determining the topological coding grid of each main coding point in the target image according to the rotational symmetry of the intersection of the grid lines of the coding grid;
    获取所述每个主编码点的拓扑编码网格中填充的所有散斑图像;Acquiring all the speckle images filled in the topological coding grid of each main coding point;
    分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,并基于所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值。Perform image type recognition on all speckle images around each main code point, and determine the first code of each main code point based on the types of all speckle images around each main code point value.
  4. 如权利要求3所述的基于结构光的三维重建方法,其特征在于,所述分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,并基于所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值,包括:The structured light-based three-dimensional reconstruction method according to claim 3, wherein the image type recognition is performed on all speckle images around each main coding point respectively, and based on each main coding point The types of all surrounding speckle images, and determining the first code value of each main code point, include:
    根据预先训练完成的散斑图像类型识别模型,分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,得到所述每个主编码点周围的所有散斑图像的类型;According to the pre-trained speckle image type recognition model, perform image type recognition on all speckle images around each main coding point to obtain the types of all speckle images around each main coding point;
    根据预设的主编码点的第一编码值与主编码点周围的所有散斑图像类型之间的映射关系,确定所述每个主编码点的第一编码值。Determine the first code value of each main code point according to the preset mapping relationship between the first code value of the main code point and all speckle image types around the main code point.
  5. 如权利要求1所述的基于结构光的三维重建方法,其特征在于,所述确定所述每个主编码点周围的所有散斑图像在所述目标投影图像中的编码区域,分别对每个所述编码区域进行散斑点匹配解码,得到所述每个散斑图像的第二编码值,包括:The structured light-based three-dimensional reconstruction method according to claim 1, wherein said determining the coding region of all speckle images around each main coding point in the target projection image is for each Performing speckle matching and decoding on the coding region to obtain the second coding value of each speckle image includes:
    根据所述每个主编码点的第一编码值以及所述每个主编码点在所述目标编码图像中的编码坐标,确定所述每个主编码点在所述目标投影图像中的投影坐标;Determine the projection coordinates of each main coding point in the target projection image according to the first coding value of each main coding point and the coding coordinates of each main coding point in the target coded image ;
    基于所述每个主编码点的投影坐标确定所述每个主编码点周围的散斑图像在所述目标投影图像中的编码区域;Determining the coding region of the speckle image around each main coding point in the target projection image based on the projection coordinates of each main coding point;
    根据预设的局部图像匹配解码算法,分别对每个散斑图像在所述目标投影图像中的编码区域进行匹配解码,得到所述每个散斑图像的编码区域的第二编 码值。According to a preset local image matching and decoding algorithm, the coding region of each speckle image in the target projection image is respectively matched and decoded to obtain the second coding value of the coding region of each speckle image.
  6. 如权利要求1所述的基于结构光的三维重建方法,其特征在于,所述编码网格为栅格图形,所述主编码点为所述栅格图形的水平栅格线与竖直栅格线的交点。The 3D reconstruction method based on structured light according to claim 1, wherein the coding grid is a grid pattern, and the main coding points are horizontal grid lines and vertical grids of the grid pattern. The intersection of the lines.
  7. 如权利要求2所述的基于结构光的三维重建方法,其特征在于,所述编码网格为栅格图形,所述主编码点为所述栅格图形的水平栅格线与竖直栅格线的交点。The structured light-based 3D reconstruction method according to claim 2, wherein the coding grid is a grid pattern, and the main coding points are horizontal grid lines and vertical grids of the grid pattern. The intersection of the lines.
  8. 如权利要求3所述的基于结构光的三维重建方法,其特征在于,所述编码网格为栅格图形,所述主编码点为所述栅格图形的水平栅格线与竖直栅格线的交点。The 3D reconstruction method based on structured light according to claim 3, wherein the coding grid is a grid pattern, and the main coding points are horizontal grid lines and vertical grids of the grid pattern. The intersection of the lines.
  9. 如权利要求4所述的基于结构光的三维重建方法,其特征在于,所述编码网格为栅格图形,所述主编码点为所述栅格图形的水平栅格线与竖直栅格线的交点。The 3D reconstruction method based on structured light according to claim 4, wherein the coding grid is a grid pattern, and the main coding point is a horizontal grid line and a vertical grid of the grid pattern. The intersection of the lines.
  10. 如权利要求5所述的基于结构光的三维重建方法,其特征在于,所述编码网格为栅格图形,所述主编码点为所述栅格图形的水平栅格线与竖直栅格线的交点。The 3D reconstruction method based on structured light according to claim 5, wherein the coding grid is a grid pattern, and the main coding points are horizontal grid lines and vertical grids of the grid pattern. The intersection of the lines.
  11. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机指令,其特征在于,所述处理器执行所述计算机指令时实现如下步骤:A terminal device, comprising a memory, a processor, and computer instructions stored in the memory and running on the processor, characterized in that the processor implements the following steps when executing the computer instructions:
    获取将目标投影图像投射到被测物体表面后,与所述被测物体的表面信息叠加而成的目标编码图像;所述目标编码图像包括第一预设数量的主编码点以及第二预设数量的散斑图像;Obtain a target coded image formed by projecting the target projection image onto the surface of the measured object and superimposed on the surface information of the measured object; the target coded image includes a first preset number of main code points and a second preset Number of speckle images;
    根据预设的检测算法检测出所述目标编码图像中的每个主编码点;Detect each main coding point in the target coded image according to a preset detection algorithm;
    确定所述每个主编码点周围的所有散斑图像,根据所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值;Determining all speckle images around each main coding point, and determining the first code value of each main coding point according to the types of all speckle images around each main coding point;
    确定所述每个主编码点周围的所有散斑图像在所述目标投影图像中的编码 区域,分别对每个所述编码区域进行散斑点匹配解码,得到所述每个散斑图像的第二编码值;Determine the coding regions of all speckle images around each main coding point in the target projection image, and perform speckle matching and decoding on each of the coding regions to obtain the second speckle image of each Code value
    根据预先获取的三维图像重建装置的标定参数、所述第一编码值以及所述第二编码值,对所述被测物体进行三维图像重建,得到所述被测物体的三维图像。According to the pre-acquired calibration parameters of the three-dimensional image reconstruction device, the first code value and the second code value, perform three-dimensional image reconstruction on the measured object to obtain a three-dimensional image of the measured object.
  12. 如权利要求11所述的基于结构光的三维重建方法,其特征在于,所述主编码点为具有几何特征的编码网格的网格线交点,所述根据预设的检测算法检测出所述目标编码图像中的每个主编码点,包括:The method of 3D reconstruction based on structured light according to claim 11, wherein the main coding point is the intersection of grid lines of a coding grid with geometric characteristics, and the detection algorithm detects the Each main code point in the target coded image includes:
    提取所有所述编码网格的网格线交点;Extracting all grid lines intersection points of the coding grid;
    根据所述编码网格的几何特征,生成用于检测所述目标编码图像包含的主编码点的局部对称检测算子;Generating a local symmetry detection operator for detecting the main coding points contained in the target coded image according to the geometric characteristics of the coding grid;
    基于所述局部对称检测算子检测出所述目标编码图像中的每个主编码点。Each main coding point in the target coded image is detected based on the local symmetry detection operator.
  13. 如权利要求12所述的基于结构光的三维重建方法,其特征在于,所述编码网格的网格线交点具有旋转对称性,所述散斑图像填充在所述编码网格;The method of 3D reconstruction based on structured light according to claim 12, wherein the intersection of grid lines of the coding grid has rotational symmetry, and the speckle image is filled in the coding grid;
    所述确定所述每个主编码点周围的所有散斑图像,根据所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值,包括:The determining all speckle images around each main coding point, and determining the first code value of each main coding point according to the types of all speckle images around each main coding point includes:
    根据所述编码网格的网格线交点的旋转对称性,确定所述每个主编码点在所述目标图像中的拓扑编码网格;Determining the topological coding grid of each main coding point in the target image according to the rotational symmetry of the intersection of the grid lines of the coding grid;
    获取所述每个主编码点的拓扑编码网格中填充的所有散斑图像;Acquiring all the speckle images filled in the topological coding grid of each main coding point;
    分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,并基于所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值。Perform image type recognition on all speckle images around each main code point, and determine the first code of each main code point based on the types of all speckle images around each main code point value.
  14. 如权利要求13所述的基于结构光的三维重建方法,其特征在于,所述分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,并基于所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值,包括:The structured light-based three-dimensional reconstruction method according to claim 13, wherein the image type recognition is performed on all speckle images around each main coding point respectively, and based on each main coding point The types of all surrounding speckle images, and determining the first code value of each main code point, include:
    根据预先训练完成的散斑图像类型识别模型,分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,得到所述每个主编码点周围的所有散斑图像的类型;According to the pre-trained speckle image type recognition model, perform image type recognition on all speckle images around each main coding point to obtain the types of all speckle images around each main coding point;
    根据预设的主编码点的第一编码值与主编码点周围的所有散斑图像类型之间的映射关系,确定所述每个主编码点的第一编码值。Determine the first code value of each main code point according to the preset mapping relationship between the first code value of the main code point and all speckle image types around the main code point.
  15. 如权利要求11所述的基于结构光的三维重建方法,其特征在于,所述确定所述每个主编码点周围的所有散斑图像在所述目标投影图像中的编码区域,分别对每个所述编码区域进行散斑点匹配解码,得到所述每个散斑图像的第二编码值,包括:The method of 3D reconstruction based on structured light according to claim 11, wherein said determining the coding area of all speckle images around each main coding point in said target projection image is for each Performing speckle matching and decoding on the coding region to obtain the second coding value of each speckle image includes:
    根据所述每个主编码点的第一编码值以及所述每个主编码点在所述目标编码图像中的编码坐标,确定所述每个主编码点在所述目标投影图像中的投影坐标;Determine the projection coordinates of each main coding point in the target projection image according to the first coding value of each main coding point and the coding coordinates of each main coding point in the target coded image ;
    基于所述每个主编码点的投影坐标确定所述每个主编码点周围的散斑图像在所述目标投影图像中的编码区域;Determining the coding region of the speckle image around each main coding point in the target projection image based on the projection coordinates of each main coding point;
    根据预设的局部图像匹配解码算法,分别对每个散斑图像在所述目标投影图像中的编码区域进行匹配解码,得到所述每个散斑图像的编码区域的第二编码值。According to a preset local image matching and decoding algorithm, the coding region of each speckle image in the target projection image is respectively matched and decoded to obtain the second coding value of the coding region of each speckle image.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,其特征在于,所述计算机指令被处理器执行时实现如下步骤:A computer-readable storage medium storing computer instructions, wherein the computer instructions are executed by a processor to implement the following steps:
    获取将目标投影图像投射到被测物体表面后,与所述被测物体的表面信息叠加而成的目标编码图像;所述目标编码图像包括第一预设数量的主编码点以及第二预设数量的散斑图像;Obtain a target coded image formed by projecting the target projection image onto the surface of the measured object and superimposed on the surface information of the measured object; the target coded image includes a first preset number of main code points and a second preset Number of speckle images;
    根据预设的检测算法检测出所述目标编码图像中的每个主编码点;Detect each main coding point in the target coded image according to a preset detection algorithm;
    确定所述每个主编码点周围的所有散斑图像,根据所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值;Determining all speckle images around each main coding point, and determining the first code value of each main coding point according to the types of all speckle images around each main coding point;
    确定所述每个主编码点周围的所有散斑图像在所述目标投影图像中的编码 区域,分别对每个所述编码区域进行散斑点匹配解码,得到所述每个散斑图像的第二编码值;Determine the coding regions of all speckle images around each main coding point in the target projection image, and perform speckle matching and decoding on each of the coding regions to obtain the second speckle image of each Code value
    根据预先获取的三维图像重建装置的标定参数、所述第一编码值以及所述第二编码值,对所述被测物体进行三维图像重建,得到所述被测物体的三维图像。According to the pre-acquired calibration parameters of the three-dimensional image reconstruction device, the first code value and the second code value, perform three-dimensional image reconstruction on the measured object to obtain a three-dimensional image of the measured object.
  17. 如权利要求16所述的基于结构光的三维重建方法,其特征在于,所述主编码点为具有几何特征的编码网格的网格线交点,所述根据预设的检测算法检测出所述目标编码图像中的每个主编码点,包括:The method of 3D reconstruction based on structured light according to claim 16, wherein the main coding point is the intersection of the grid lines of the coding grid with geometric characteristics, and the detection algorithm detects the Each main code point in the target coded image includes:
    提取所有所述编码网格的网格线交点;Extracting all grid lines intersection points of the coding grid;
    根据所述编码网格的几何特征,生成用于检测所述目标编码图像包含的主编码点的局部对称检测算子;Generating a local symmetry detection operator for detecting the main coding points contained in the target coded image according to the geometric characteristics of the coding grid;
    基于所述局部对称检测算子检测出所述目标编码图像中的每个主编码点。Each main coding point in the target coded image is detected based on the local symmetry detection operator.
  18. 如权利要求16所述的基于结构光的三维重建方法,其特征在于,所述编码网格的网格线交点具有旋转对称性,所述散斑图像填充在所述编码网格;16. The structured light-based 3D reconstruction method of claim 16, wherein the intersection of grid lines of the coding grid has rotational symmetry, and the speckle image is filled in the coding grid;
    所述确定所述每个主编码点周围的所有散斑图像,根据所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值,包括:The determining all speckle images around each main coding point, and determining the first code value of each main coding point according to the types of all speckle images around each main coding point includes:
    根据所述编码网格的网格线交点的旋转对称性,确定所述每个主编码点在所述目标图像中的拓扑编码网格;Determining the topological coding grid of each main coding point in the target image according to the rotational symmetry of the intersection of the grid lines of the coding grid;
    获取所述每个主编码点的拓扑编码网格中填充的所有散斑图像;Acquiring all the speckle images filled in the topological coding grid of each main coding point;
    分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,并基于所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值。Perform image type recognition on all speckle images around each main code point, and determine the first code of each main code point based on the types of all speckle images around each main code point value.
  19. 如权利要求18所述的基于结构光的三维重建方法,其特征在于,所述分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,并基于所述每个主编码点周围的所有散斑图像的类型,确定所述每个主编码点的第一编码值,包括:The structured light-based three-dimensional reconstruction method according to claim 18, wherein the image type recognition is performed on all speckle images around each main coding point respectively, and based on each main coding point The types of all surrounding speckle images, and determining the first code value of each main code point, include:
    根据预先训练完成的散斑图像类型识别模型,分别对所述每个主编码点周围的所有散斑图像进行图像类型识别,得到所述每个主编码点周围的所有散斑图像的类型;According to the pre-trained speckle image type recognition model, perform image type recognition on all speckle images around each main coding point to obtain the types of all speckle images around each main coding point;
    根据预设的主编码点的第一编码值与主编码点周围的所有散斑图像类型之间的映射关系,确定所述每个主编码点的第一编码值。Determine the first code value of each main code point according to the preset mapping relationship between the first code value of the main code point and all speckle image types around the main code point.
  20. 如权利要求16所述的基于结构光的三维重建方法,其特征在于,所述确定所述每个主编码点周围的所有散斑图像在所述目标投影图像中的编码区域,分别对每个所述编码区域进行散斑点匹配解码,得到所述每个散斑图像的第二编码值,包括:The method of 3D reconstruction based on structured light according to claim 16, wherein said determining the coding region of all speckle images around each main coding point in the target projection image is performed for each Performing speckle matching and decoding on the coding region to obtain the second coding value of each speckle image includes:
    根据所述每个主编码点的第一编码值以及所述每个主编码点在所述目标编码图像中的编码坐标,确定所述每个主编码点在所述目标投影图像中的投影坐标;Determine the projection coordinates of each main coding point in the target projection image according to the first coding value of each main coding point and the coding coordinates of each main coding point in the target coded image ;
    基于所述每个主编码点的投影坐标确定所述每个主编码点周围的散斑图像在所述目标投影图像中的编码区域;Determining the coding region of the speckle image around each main coding point in the target projection image based on the projection coordinates of each main coding point;
    根据预设的局部图像匹配解码算法,分别对每个散斑图像在所述目标投影图像中的编码区域进行匹配解码,得到所述每个散斑图像的编码区域的第二编码值。According to a preset local image matching and decoding algorithm, the coding region of each speckle image in the target projection image is respectively matched and decoded to obtain the second coding value of the coding region of each speckle image.
PCT/CN2019/089621 2019-05-31 2019-05-31 Structured light-based three-dimensional reconstruction method, terminal device, and storage medium WO2020237660A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/089621 WO2020237660A1 (en) 2019-05-31 2019-05-31 Structured light-based three-dimensional reconstruction method, terminal device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/089621 WO2020237660A1 (en) 2019-05-31 2019-05-31 Structured light-based three-dimensional reconstruction method, terminal device, and storage medium

Publications (1)

Publication Number Publication Date
WO2020237660A1 true WO2020237660A1 (en) 2020-12-03

Family

ID=73551968

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/089621 WO2020237660A1 (en) 2019-05-31 2019-05-31 Structured light-based three-dimensional reconstruction method, terminal device, and storage medium

Country Status (1)

Country Link
WO (1) WO2020237660A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150145959A1 (en) * 2013-11-26 2015-05-28 Rowan University Use of Spatially Structured Light for Dynamic Three Dimensional Reconstruction and Reality Augmentation
CN105928472A (en) * 2016-07-11 2016-09-07 西安交通大学 Three-dimensional shape dynamic measurement method based on active spot projector
CN108122254A (en) * 2017-12-15 2018-06-05 中国科学院深圳先进技术研究院 Three-dimensional image reconstruction method, device and storage medium based on structure light
CN108225216A (en) * 2016-12-14 2018-06-29 中国科学院深圳先进技术研究院 Structured-light system scaling method and device, structured-light system and mobile equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150145959A1 (en) * 2013-11-26 2015-05-28 Rowan University Use of Spatially Structured Light for Dynamic Three Dimensional Reconstruction and Reality Augmentation
CN105928472A (en) * 2016-07-11 2016-09-07 西安交通大学 Three-dimensional shape dynamic measurement method based on active spot projector
CN108225216A (en) * 2016-12-14 2018-06-29 中国科学院深圳先进技术研究院 Structured-light system scaling method and device, structured-light system and mobile equipment
CN108122254A (en) * 2017-12-15 2018-06-05 中国科学院深圳先进技术研究院 Three-dimensional image reconstruction method, device and storage medium based on structure light

Similar Documents

Publication Publication Date Title
CN110264573B (en) Three-dimensional reconstruction method and device based on structured light, terminal equipment and storage medium
US11928800B2 (en) Image coordinate system transformation method and apparatus, device, and storage medium
Lin et al. Line segment extraction for large scale unorganized point clouds
Kim et al. Scene reconstruction from high spatio-angular resolution light fields.
CN112771573A (en) Depth estimation method and device based on speckle images and face recognition system
EP3135033B1 (en) Structured stereo
CN111524168B (en) Point cloud data registration method, system and device and computer storage medium
US10163257B2 (en) Constructing a 3D structure
CN112489099B (en) Point cloud registration method and device, storage medium and electronic equipment
WO2020119467A1 (en) High-precision dense depth image generation method and device
US11651581B2 (en) System and method for correspondence map determination
CN114627227B (en) Object reconstruction method and device based on PBR material and computer readable storage medium
CN114627244A (en) Three-dimensional reconstruction method and device, electronic equipment and computer readable medium
WO2024016524A1 (en) Connected vehicle position estimation method and apparatus based on independent non-uniform incremental sampling
WO2024109772A1 (en) Face posture estimation method and apparatus based on structured light system
CN113610958A (en) 3D image construction method and device based on style migration and terminal
CN111161348B (en) Object pose estimation method, device and equipment based on monocular camera
CN117115358A (en) Automatic digital person modeling method and device
CN115330803B (en) Surface defect data enhancement method and device, electronic equipment and storage medium
CN110533663B (en) Image parallax determining method, device, equipment and system
WO2020237660A1 (en) Structured light-based three-dimensional reconstruction method, terminal device, and storage medium
Zhang et al. Graph-based depth denoising & dequantization for point cloud enhancement
CN112614190A (en) Method and device for projecting map
CN110223388B (en) Three-dimensional reconstruction method and device based on spatial structured light, terminal equipment and storage medium
CN113610971B (en) Fine-grained three-dimensional model construction method and device and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19930840

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19930840

Country of ref document: EP

Kind code of ref document: A1