WO2020181525A1 - 编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置 - Google Patents

编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置 Download PDF

Info

Publication number
WO2020181525A1
WO2020181525A1 PCT/CN2019/077994 CN2019077994W WO2020181525A1 WO 2020181525 A1 WO2020181525 A1 WO 2020181525A1 CN 2019077994 W CN2019077994 W CN 2019077994W WO 2020181525 A1 WO2020181525 A1 WO 2020181525A1
Authority
WO
WIPO (PCT)
Prior art keywords
stripe
code value
code
value matrix
matrix
Prior art date
Application number
PCT/CN2019/077994
Other languages
English (en)
French (fr)
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 CN201980000336.9A priority Critical patent/CN110062870B/zh
Priority to PCT/CN2019/077994 priority patent/WO2020181525A1/zh
Publication of WO2020181525A1 publication Critical patent/WO2020181525A1/zh

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
    • G01B11/254Projection of a pattern, viewing through a pattern, e.g. moiré
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/521Depth or shape recovery from laser ranging, e.g. using interferometry; from the projection of structured light

Definitions

  • the embodiments of the present application relate to the field of data processing technology, and in particular to a method for determining an encoding array, an initialization method, a structured light encoding method, an optical device, and a three-dimensional measuring device.
  • Three-dimensional sensing technology can be divided into contact measurement and non-contact measurement.
  • non-contact measurement optical three-dimensional measurement based on structured light projection is widely used, and its measurement accuracy and speed are comparable to that of structured light projection.
  • the coding method used in 3D measurement is directly related.
  • coding methods mainly include time coding and spatial coding.
  • time coding method multiple coded images are projected onto the target object in chronological order, and each projection generates a code value for each pixel in the coded image, which will cause more coding times and slower measurement speed .
  • spatial coding method only one coded image is projected onto the target object, and the adjacent pixel information (such as color, pixel value or geometric shape) is used to generate the code value.
  • the adjacent pixel information is easily lost, the measured value The accuracy is small.
  • one of the technical problems solved by the embodiments of the present invention is to provide a method for determining an encoding array, an initialization method, a structured light encoding method, an optical device, and a three-dimensional measuring device to overcome the above-mentioned defects in the prior art .
  • the embodiment of the present application provides a method for determining an encoding array, which includes:
  • an encoding array is generated, and i is greater than or equal to 2.
  • the code value matrix of the i-th stripe after generating the code value matrix of the i-th stripe, it includes: determining the code value matrix of the i-th stripe and at least one code value of all previous i-1 strips Whether the matrices are the same; if they are different, generate a coding array for coding the image to be coded according to the code value matrix of the i-th stripe and the code values of all the previous i-1 strips.
  • the code of the i-th stripe is regenerated Value, and determine whether the code value of the regenerated i-th stripe is the same as the code value matrix of all the previous i-1 strips.
  • regenerating the code value of the i-th stripe includes: shifting the column vector in the code value matrix of the i-1th stripe to the left, and retaining and A plurality of column vectors with the same number of stripes, and performing column vector increment processing on the code value matrix of the i-1th stripe to regenerate the code value of the i-th stripe.
  • judging whether the code value matrix of the i-th stripe is the same as the code value matrix of all previous i-1 stripes includes: judging that all previous i-1 are added Whether the intermediate process matrix of at least one code value matrix of the root stripe includes the code value matrix of the i-th stripe, if it does, the code value matrix of the i-th stripe is at least one of all the previous i-1 stripes The code value matrix is the same; otherwise, the code value matrix of the i-th stripe is different from the code value matrixes of all the previous i-1 strips.
  • the encoding direction is from left to right, and the neighborhood is the right neighborhood; or, the encoding direction is from right to left, and the neighborhood is left. Neighborhood; or, the coding direction is top to bottom, and the neighborhood is the lower neighborhood; or, the coding direction is bottom to top, and the neighborhood is the upper neighborhood.
  • the embodiment of the present application also provides a method for initializing a coding array, which includes:
  • the code array is initialized.
  • it further includes: generating the code value of the first stripe and the code value of several stripes based on the code value generation model, so as to generate the code value of the first stripe according to the code value of the first stripe. And the code values of the several stripes to generate the code value matrix of the first stripe.
  • the pre-configured matrix is an empty matrix.
  • An embodiment of the present application also provides a structured light encoding method, which encodes an image to be encoded by obtaining an encoding array according to any embodiment of the present application.
  • the encoding array obtained according to any embodiment of the present application encodes the image to be encoded to obtain a time-sharing encoded image.
  • the embodiment of the present application also provides an optical device, which includes: a plurality of grating structures, the plurality of grating structures are arranged according to the encoding sequence of the image to be encoded, and the encoding array is arranged according to the code value of the i-th stripe Matrix and the code values of all the first i-1 strips, the code value matrix of the i-th stripe is generated according to the code value of the i-th stripe and the code values of several stripes in its neighborhood; The i stripe and several strips in its neighborhood are determined along the encoding direction, and i is greater than or equal to 2.
  • the several grating structures are used to project the encoded image obtained by encoding the image to be encoded according to the array to the On the target object. .
  • An embodiment of the present application also provides a three-dimensional measurement system, which includes: a projection device and an imaging device, the projection device includes the optical device according to any embodiment of the present application, and the imaging device is used to capture the encoded image projection The projection image formed on the target object to perform three-dimensional measurement of the target object according to the projection image and the encoded image.
  • the i-th stripe in the image to be encoded and several strips in its neighborhood are determined along the encoding direction; according to the code value of the i-th stripe and the code value of the several strips , Generate the code value matrix of the i-th stripe; generate the code array according to the code value matrix of the i-th stripe and the code values of all the previous i-1 stripes, i is greater than or equal to 2, thereby avoiding time coding Projecting multiple encoded images onto the target object in chronological order in the method leads to slower measurement speed, and avoids the use of adjacent pixel information (such as color, pixel value or geometric shape) to generate code values in the spatial encoding method.
  • the measurement accuracy is small.
  • FIG. 1 is a schematic diagram of the use of a three-dimensional measurement system according to an embodiment of the application
  • FIG. 2 is a schematic flowchart of a method for initializing a code array in Embodiment 2 of this application;
  • FIG. 3 is a schematic flowchart of a method for determining a code array in Embodiment 3 of this application;
  • FIG. 4 is a schematic flowchart of a method for determining a code array according to Embodiment 4 of this application;
  • FIG. 5 is a schematic flowchart of a method for determining a code array according to Embodiment 5 of this application;
  • FIG. 6 is a schematic diagram of a coded image according to Embodiment 6 of the application.
  • FIG. 7 is a schematic diagram of a coded image in Embodiment 7 of the application.
  • the i-th stripe in the image to be encoded and several strips in its neighborhood are determined along the encoding direction; according to the code value of the i-th stripe and the code value of the several strips , Generate the code value matrix of the i-th stripe; generate the code array according to the code value matrix of the i-th stripe and the code values of all the previous i-1 stripes, i is greater than or equal to 2, thereby avoiding time coding Projecting multiple encoded images onto the target object in chronological order in the method leads to slower measurement speed, and avoids the use of adjacent pixel information (such as color, pixel value or geometric shape) to generate code values in the spatial encoding method.
  • the measurement accuracy is small.
  • FIG. 1 is a schematic diagram of the use of a three-dimensional measurement system according to an embodiment of the application; as shown in FIG. 1, it includes: a projection device 101 and a camera device 102.
  • the projection device includes an optical device (not shown in the figure).
  • the device includes a plurality of raster structures, the plurality of raster structures are arranged according to the entire column of the encoding of the image to be encoded, and the encoding array is based on the code value matrix of the i-th stripe and the code values of all the previous i-1 strips Generated, the code value matrix of the i-th stripe is generated according to the code value of the i-th stripe and the code values of several stripes in its neighborhood; the i-th stripe and several stripes in its neighborhood pass Determined along the encoding direction, i is greater than or equal to 2; the several grating structures are used to project the encoded image obtained by encoding the image to be encoded according to the array onto the target object through beam d
  • the optical device may be an optical device made based on the principle of beam diffraction, or specifically called a diffractive optical device or a diffractive optical element (DOE).
  • DOE diffractive optical element
  • a host in order to implement the structured light coding method in any embodiment of the present application to obtain the coded image, a host is added to the three-dimensional measurement system, and the host is used to execute the structured light coding method in any embodiment of the present application to obtain the code.
  • Image in addition, the host is also used to perform three-dimensional measurement of the target object according to the projected image and the encoded image.
  • the host is also used to perform three-dimensional measurement of the target object according to the projected image and the coded image, which specifically obtains three-dimensional information of the scene by matching the projected image with the coded image ,
  • the matching process can also be called the decoding process.
  • FIG. 2 is a schematic flowchart of a method for initializing a code array in Embodiment 2 of this application; as shown in FIG. 2, it includes:
  • S201 Determine the first stripe in the image to be encoded and several stripes in its neighborhood along the encoding direction;
  • one column of pixels corresponds to one stripe
  • one stripe includes several pixels. If the pixels of the image to be coded are divided according to the row direction, a row of pixels corresponds to a stripe, and a stripe includes several pixels.
  • the determination of the first stripe is related to the division of the above-mentioned stripe. If the division is performed in the direction of the column and the coding direction is from left to right, the first stripe is the leftmost stripe. A column of pixels; if the encoding direction is from right to left, the first stripe is the rightmost column of pixels. If it is divided according to the row direction, and if the coding direction is top to bottom, the first stripe is the top row of pixels; if the coding direction is from bottom to top, the first stripe is the bottom row Pixels.
  • the determination of several stripes in the neighborhood of the first strip is also related to the encoding direction. If the encoding direction is from left to right and the stripes are divided according to the column direction, then the first fringe neighborhood is Right neighborhood; if the encoding direction is from right to left, and the stripes are divided according to the column direction, the first fringe neighborhood is the left neighborhood; if the encoding direction is from top to bottom, and the stripes are in the row direction For division, the first stripe neighborhood is the lower neighborhood; if the coding direction is from bottom to top, and the stripes are divided according to the row direction, the first stripe neighborhood is the upper neighborhood.
  • the specific number of several stripes is not specifically limited. It can be one, two, or more than three, as long as the code value matrix of each stripe is not repeated.
  • S202 Generate a code value matrix of the first stripe according to the code value of the first stripe and the code values of the several stripes;
  • the pixels in a stripe can be divided into several groups, and each group of pixels is randomly assigned the same code value. It can be seen that, in fact, for any stripe, the code value is repeated according to the pixel group. Therefore, the code value of a group of pixels can be directly used to represent the code value corresponding to a stripe.
  • the number of code values of a stripe is equal to the number of pixels in a group of pixels. For example, a group of pixels includes 4 Pixels, the number of code values of one stripe is also 4. Of course, this is only an example and not a special limitation.
  • the code value of the first stripe and the code values of the several stripes can be generated randomly, or can be generated according to a pre-established code value model. For example, based on the code value generation model, the code value of the first stripe and the code value of several stripes are generated, so as to generate the code value of the first stripe and the code value of the several stripes.
  • the code value matrix of the stripes can be generated randomly, or can be generated according to a pre-established code value model.
  • S203 Initialize the code array according to the code value matrix of the first stripe.
  • the code value matrix of the first stripe can be directly used as the initial value of the code array.
  • the initialized code array is used to determine the code value array of the following two stripes. For details, please refer to the detailed record of the embodiment in FIG. 3.
  • Figure 3 is a schematic flow chart of the method for determining the coding array of the third embodiment of the application; in this embodiment, after the initialization of the coding matrix is completed based on the above figure 2, the code value arrays are determined for the subsequent stripes except the first stripe ; As shown in Figure 3, it can include:
  • S301 Determine the i-th stripe in the image to be encoded and several stripes in its neighborhood along the encoding direction;
  • i is greater than or equal to 2, that is, the second subsequent stripe is determined until the code value arrays of all strips.
  • the definition of the neighborhood can be referred to the record of the embodiment in Figure 2 above, which is related to the coding direction and the stripe division direction. It can be the right neighborhood, the left neighborhood, or the upper neighborhood. It can be a lower neighborhood, and which type of neighborhood to use can be determined according to specific usage scenarios.
  • S302 Generate a code value matrix of the i-th stripe according to the code value of the i-th stripe and the code values of several stripes;
  • the code value array of the first stripe in the embodiment of FIG. 2 is used. Since the code value of the second stripe has been randomly generated during the initialization process of the example shown in Fig. 2, it is enough to determine the code value of several stripe in its neighborhood. In practical applications, since several stripes in the neighborhood of the first stripe overlap with several stripes in the neighborhood of the second stripe, the code value of the overlapping part of the stripes has been determined in Figure 2. The code value of the overlapping part of the stripes is sufficient.
  • the code value of the non-coincident part of the stripe can be determined by the code value generation model, for example, the code value of the non-coincident part of the stripe can be generated by the random code value generation model, thereby forming the code of several stripes in the neighborhood of the second stripe Value, and then combined with the code value of the second stripe to form the code value array of the second stripe.
  • step S302 and before step S303 it may further include: judging whether the code value matrix of the i-th stripe is the same as at least one code value matrix of all the previous i-1 strips; if they are different, execute Step S303.
  • step S303 may further include: judging whether the code value matrix of the i-th stripe is the same as at least one code value matrix of all the previous i-1 strips, and if they are different, based on the The code value matrix and the code values of all the first i-1 stripes generate a coded array.
  • the code value matrix of the i-th stripe is the same as at least one code value matrix of all the previous i-1 strips, the code value of the i-th stripe is regenerated according to the code value of the i-th stripe, and the re-generated i-th stripe is determined Whether the code value of is the same as the code value matrix of all the previous i-1 stripes, until the code value of the generated i-th stripe is different from the code value matrix of all the previous i-1 stripes.
  • the stripes are divided according to the column direction and the encoding direction is from to right, when the code value of the i-th stripe is regenerated according to the code value matrix of the i-1th stripe, the The column vector in the code value matrix of the i-1 stripe is left-shifted, and several column vectors with the same number as the number of stripes are retained, and the column vector of the code value matrix of the i-1th stripe is increased. Quantity processing to regenerate the code value of the i-th stripe.
  • judging whether the code value matrix of the i-th stripe is the same as the code value matrix of all the previous i-1 stripes includes: judging the intermediate process matrix of at least one code value matrix to which all the previous i-1 stripes are added Whether the code value matrix of the i-th stripe is included, if it is included, the code value matrix of the i-th stripe is the same as at least one code value matrix of all the previous i-1 stripes; otherwise, the i-th stripe The code value matrix of the root stripe is different from the code value matrix of all the previous i-1 stripes.
  • the above steps S301-303 are executed for a total of n-1 times to obtain the code value matrix of all stripes, and then the final encoding array used for encoding the image to be encoded is obtained.
  • the code of the i-th stripe if the code value matrix of the i-th stripe and the code values of all the previous i-1 stripe have been controlled in advance, the code of the i-th stripe The generation of the value matrix, so that the code value matrix of the i-th stripe does not overlap with the code value matrixes of all the previous i-1 strips, the step of determining the code of the i-th stripe can be omitted Whether the value matrix is the same as the code value matrix of all the first i-1 stripes.
  • Figure 4 is a schematic flow chart of a method for determining a coding array according to the fourth embodiment of this application; in this embodiment, the pattern of the stripes is taken as the column direction, the coding direction is from left to right, and the code value array of the first stripe is generated as an example Explain; as shown in Figure 4, it includes the following steps:
  • S401 Initialize the code value of the first stripe and the code values of the three stripes in its right neighborhood, and initialize the intermediate process matrix
  • the elements of the first stripe are divided into several groups, and each group includes 4 pixels.
  • the code value of the first stripe is initialized to obtain a specific code value column vector [1,0, 0,0].
  • the three stripes in the right neighborhood are: the second stripe, the third stripe, and the fourth stripe. Therefore, the code value of the second stripe is initialized to obtain the specific code value column vector [0,1,1, 1], the code value of the third stripe is initialized to obtain the specific code value column vector [0,1,0,1], and the code value of the fourth stripe is initialized to obtain the specific code value column vector [0,1,0, 1]. It should be noted that, in order to avoid repetition of the code value array generated subsequently, when initializing the code value of the stripe, it is preferable to ensure that the code value column vector corresponding to each stripe is not repeated.
  • the intermediate process matrix after initialization is preferably an empty matrix, and the dimension of the empty matrix can be dynamically adjusted according to the dimension of the code value matrix.
  • S402 Generate a code value matrix of the first stripe according to the code value of the first stripe and the code values of the three stripes in its neighborhood;
  • the corresponding code value matrix A is formed by combining the code value column vectors of the first-fourth stripe above, that is, the code value matrix of the first stripe:
  • step S403 since the intermediate process matrix after initialization is an empty matrix, the code value matrix of the first stripe is not included in the empty matrix. Therefore, jump directly to step S404, and step S403 can be omitted. However, it should be noted that if the initialized intermediate process matrix is not an empty matrix, step S403 needs to be added. Therefore, in order to consider both cases and ensure universal application to various scenarios, it is preferable to retain step S403.
  • the randomly generated column vector is, for example: [1,0,0,1], of course, it can also be [0,0,0,1]; or it can be arbitrarily following the 1st-4th stripe Column vectors with the same or different code values. Since the leftmost column of code values in the code value matrix of the first stripe in step S402 is removed, and at the same time, the remaining three columns of code values are shifted to the left, therefore, the randomly generated column vector can be added to the rightmost column. Side, that is, the fourth column, so as to form a new code value matrix of the first stripe, and jump to step S403 again to determine whether it is included in the intermediate process matrix after initialization. In this case, it should be noted that the intermediate process matrix after initialization The process matrix is preferably not an empty matrix.
  • the code value array of the first stripe is not included in the intermediate process matrix after initialization.
  • Figure 5 is a schematic flow chart of a method for determining a coding array according to Embodiment 5 of the application; in this embodiment, the pattern of the stripes is used as the column direction, and the coding direction is from left to right to generate the second stripe, the third stripe,
  • S501 Determine the i-th stripe in the image to be encoded and the 3 stripes in its right neighborhood along the encoding direction from left to right;
  • the three stripes in the second right neighborhood are: the third stripe, the fourth stripe, and the fifth stripe.
  • the code values of the second to fourth strips have been generated, and it can be used directly here, and just generate the fifth
  • the code value of the root stripe for example, the code value column vector of the 5th stripe is [0,1,1,0], or, by extension, or arbitrarily the same or different from the code value of the 1st-4th stripe of.
  • the code value matrix A2 of the second stripe obtained after processing in step S502 is:
  • the intermediate process matrix for generating the code value matrix of the first stripe is marked as Mats. Since the initial intermediate process matrix is an empty matrix, the intermediate process matrix with the code value matrix A1 added is:
  • step S502 From the comparison between A2 and Mats, A2 is not included in the intermediate process matrix Mats. Therefore, the code value matrix A2 generated by the above step S502 is an effective code value matrix. Correspondingly, for the second stripe The code value column vector [0,1,1,1] of is valid, so jump to step S504A. Otherwise, jump to step S504B.
  • the code value column vector of the fifth stripe makes the code value array of the second stripe included in the intermediate process matrix for generating the code value matrix of the first stripe, and then the second stripe is regenerated according to step S504B.
  • the code value matrix of i stripes will not be illustrated in detail.
  • FIG. 6 is a schematic diagram of a coded image in Embodiment 6 of this application
  • FIG. 7 is a schematic diagram of a coded image in Embodiment 7 of this application
  • the larger white square represents the code value of 1.
  • the smaller white box represents the code value is 0.
  • the difference between Fig. 6 and Fig. 7 is that the coded image in Fig. 6 is a pair, and its corresponding coded sequence is a mixture of 0 and 1.
  • Fig. 7 in order to project the coded image in time sharing, all the codes in the coded sequence are used.
  • the code value 0 forms a coded image for the image to be coded, and uses all code values 1 in the code sequence to form another coded image.
  • An embodiment of the present application also provides a structured light encoding method, which encodes an image to be encoded by obtaining an encoding array according to any embodiment of the present application.
  • the encoding array obtained according to any embodiment of the present application encodes the image to be encoded to obtain a time-sharing encoded image.
  • the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
  • processors CPU
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • This application may be described in the general context of computer-executable instructions executed by a computer, such as program modules.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific transactions or implement specific abstract data types.
  • This application can also be practiced in distributed computing environments. In these distributed computing environments, remote processing devices connected through a communication network execute transactions.
  • program modules can be located in local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Processing (AREA)

Abstract

一种编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置,编码阵列的确定方法包括:沿着编码方向确定待编码图像中第i根条纹及与其邻域内的若干根条纹(S201);根据所述第i根条纹的码值以及若干根条纹的码值,生成所述第i根条纹的码值矩阵(S202);根据所述第i根条纹的码值矩阵以及所有前i-1根条纹的码值(S203),生成编码阵列,i大于等于2。编码阵列的确定方法避免了时间编码方式中按时间顺序将多幅编码图像投影到目标物体上导致的测量速度较慢,以及避免了在空间编码方式中利用相邻像素信息(例如颜色,像素值或者几何形状)来产生码值导致的测量精度较小。

Description

编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置 技术领域
本申请实施例涉及数据处理技术领域,尤其涉及一种编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置。
背景技术
三维传感技术可以区分为接触式测量以及非接触式测量,而对于非接触测量来说,其中基于结构光投影的光学三维测量使用的较为广泛,而其测量精度和速度与结构光投影的光学三维测量中使用的编码方式直接关联。
现有技术中,编码方式主要有时间编码方式以及空间编码方式。其中,在时间编码方式中,按时间顺序将多幅编码图像投影到目标物体上,每次投影对编码图像中各个像素产生一个码值,由此会导致编码次数较多,测量的速度较慢。在空间编码方式中,只将一幅编码图像投影到目标物体上,利用相邻像素信息(例如颜色,像素值或者几何形状)来产生码值,但是,由于相邻像素信息容易丢失,测量的精度较小。
发明内容
有鉴于此,本发明实施例所解决的技术问题之一在于提供一种编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置,用以克服现有技术中的上述缺陷。
本申请实施例提供了一种编码阵列的确定方法,其包括:
沿着编码方向确定待编码图像中第i根条纹及与其邻域内的若干根条纹;
根据所述第i根条纹的码值以及若干根条纹的码值,生成所述第i根条纹的码值矩阵;
根据所述第i根条纹的码值矩阵以及所有前i-1根条纹的码值,生成编码阵列,i大于等于2。
可选地,在本申请的任一实施例中,生成所述第i条纹的码值矩阵之后,包括:判断第i根条纹的码值矩阵与所有前i-1根条纹的至少一码值矩阵是否相同;若不同,则根据所述第i根条纹的码值矩阵以及所有前i-1根条纹的码值, 生成用于对待编码图像进行编码的编码阵列。
可选地,在本申请的任一实施例中,若所述第i根条纹的码值矩阵与所有前i-1根条纹的至少一码值矩阵相同,则重新生成第i根条纹的码值,并判断重新生成的第i根条纹的码值与所有前i-1根条纹的码值矩阵是否相同。
可选地,在本申请的任一实施例中,重新生成第i根条纹的码值,包括:对所述第i-1根条纹的码值矩阵中的列矢量进行左移处理,保留与若干根条纹的数量相同的若干个列矢量,并对所述第i-1根条纹的码值矩阵进行列矢量增量处理,以重新生成第i根条纹的码值。
可选地,在本申请的任一实施例中,判断所述第i根条纹的码值矩阵与所有前i-1根条纹的码值矩阵是否相同包括:判断添加了所有前所有i-1根条纹的至少一码值矩阵的中间过程矩阵是否包括所述第i根条纹的码值矩阵,若包括,则所述第i根条纹的码值矩阵与所有前i-1根条纹的至少一码值矩阵相同,否则,则所述第i根条纹的码值矩阵与所有前i-1根条纹的码值矩阵不相同。
可选地,在本申请的任一实施例中,所述编码方向为从左到右,所述邻域为右邻域;或者,所述编码方向从右到左,所述邻域为左邻域;或者,所述编码方向为上到下,所述邻域为下邻域;或者,所述编码方向为下到上,所述邻域为上邻域。
本申请实施例还提供一种编码阵列的初始化方法,其包括:
沿着编码方向确定待编码图像中第1根条纹及与其邻域内的若干根条纹;
根据所述第1根条纹的码值以及所述若干根条纹的码值,生成所述第1条纹的码值矩阵;
根据所述第1根条纹的码值矩阵,对编码阵列进行初始化。
可选地,在本申请的任一实施例中,还包括:基于码值生成模型,生成第1根条纹的码值以及若干根条纹的码值,以根据所述第1根条纹的码值以及所述若干根条纹的码值,生成所述第1条纹的码值矩阵。
可选地,在本申请的任一实施例中,所述预先配置的矩阵为空矩阵。
本申请实施例还提供一种结构光编码方法,其根据本申请任一实施例得到编码阵列对待编码图像进行编码。
可选地,在本申请的任一实施例中,根据本申请任一实施例得到编码阵列对待编码图像进行编码得到分时编码图像。
本申请实施例还提供一种光学装置,其包括:若干个光栅结构,所述若干个光栅结构根据对待编码图像进行编码的编码整列设置,所述编码阵列根据所 述第i根条纹的码值矩阵以及所有前i-1根条纹的码值生成,所述第i根条纹的码值矩阵根据所述第i根条纹的码值以及其邻域内的若干根条纹的码值生成;所述第i根条纹及与其邻域内的若干根条纹通过沿着编码方向确定,i大于等于2;所述若干个光栅结构用于通过光束衍射将根据所述阵列对待编码图像进行编码得到的编码图像投影到目标物体上。。
本申请实施例还提供一种三维测量系统,其包括:投影设备以及摄像设备,所述投影设备包括本申请任一实施例所述的光学装置,所述摄像设备用于捕获所述编码图像投影到目标物体上形成的投影图像,以根据所述投影图像和所述编码图像进行所述目标物体的三维测量。
本申请实施例提供的技术方案中,通过沿着编码方向确定待编码图像中第i根条纹及与其邻域内的若干根条纹;根据所述第i根条纹的码值以及若干根条纹的码值,生成所述第i根条纹的码值矩阵;根据所述第i根条纹的码值矩阵以及所有前i-1根条纹的码值,生成编码阵列,i大于等于2,从而避免了时间编码方式中按时间顺序将多幅编码图像投影到目标物体上导致的测量速度较慢,以及避免了在空间编码方式中利用相邻像素信息(例如颜色,像素值或者几何形状)来产生码值导致的测量精度较小。
附图说明
后文将参照附图以示例性而非限制性的方式详细描述本申请实施例的一些具体实施例。附图中相同的附图标记标示了相同或类似的部件或部分。本领域技术人员应该理解,这些附图未必是按比例绘制的。附图中:
图1为本申请实施例一三维测量系统的使用示意图;
图2为本申请实施例二编码阵列的初始化方法流程示意图;
图3为本申请实施例三编码阵列的确定方法流程示意图;
图4为本申请实施例四编码阵列的确定方法流程示意图;
图5为本申请实施例五编码阵列的确定方法流程示意图;
图6为本申请实施例六编码图像的示意图;
图7为本申请实施例七编码图像的示意图。
具体实施方式
实施本发明实施例的任一技术方案必不一定需要同时达到以上的所有优点。
下面结合本发明实施例附图进一步说明本发明实施例具体实现。
本申请实施例提供的技术方案中,通过沿着编码方向确定待编码图像中第i根条纹及与其邻域内的若干根条纹;根据所述第i根条纹的码值以及若干根条纹的码值,生成所述第i根条纹的码值矩阵;根据所述第i根条纹的码值矩阵以及所有前i-1根条纹的码值,生成编码阵列,i大于等于2,从而避免了时间编码方式中按时间顺序将多幅编码图像投影到目标物体上导致的测量速度较慢,以及避免了在空间编码方式中利用相邻像素信息(例如颜色,像素值或者几何形状)来产生码值导致的测量精度较小。
图1为本申请实施例一三维测量系统的使用示意图;如图1所示,其包括:投影设备101以及摄像设备102,所述投影设备包括光学装置(图中未示出),所述光学装置包括若干个光栅结构,所述若干个光栅结构根据对待编码图像进行编码的编码整列设置,所述编码阵列根据所述第i根条纹的码值矩阵以及所有前i-1根条纹的码值生成,所述第i根条纹的码值矩阵根据所述第i根条纹的码值以及其邻域内的若干根条纹的码值生成;所述第i根条纹及与其邻域内的若干根条纹通过沿着编码方向确定,i大于等于2;所述若干个光栅结构用于通过光束衍射将根据所述阵列对待编码图像进行编码得到的编码图像投影到目标物体上,所述摄像设备用于捕获所述编码图像投影到目标物体上形成的投影图像,以根据所述投影图像和所述编码图像进行所述目标物体的三维测量。
本实施例中,所述光学装置具体可以基于光束衍射原理制成的光学器件,或者具体称之为衍射光学器件或者衍射光学元件(Diffractive Optical Elements,简称DOE)。
本实施例中,为了实现本申请任一实施例结构光编码方法得到编码图像,在三维测量系统中增加了主机,所述主机用于执行本申请任一实施例中的结构光编码方法得到编码图像,另外,所述主机还用于根据所述投影图像和所述编码图像进行所述目标物体的三维测量。此处,需要说明的是,所述主机还用于根据所述投影图像和所述编码图像进行所述目标物体的三维测量,其具体通过对投影图像与编码图像进行匹配以获取场景的三维信息,该匹配过程又可以称之为解码过程。
图2为本申请实施例二编码阵列的初始化方法流程示意图;如图2所示, 其包括:
S201、沿着编码方向确定待编码图像中第1根条纹及与其邻域内的若干根条纹;
本实施例中,如果对待编码图像的像素按照列的方向进行划分,一列像素对应一根条纹,一根条纹包括若干个像素。如果对待编码图像的像素按照行的方向进行划分,一行像素对应一根条纹,一根条纹包括若干个像素。
为此,本实施例中,第1根条纹的确定跟上述条纹的划分相关,如果按照列的方向进行划分,且如果编码方向是从左到右,则第1根条纹即为最左侧的一列像素;如果编码方向是从右到左,则第1根条纹即为最右侧的一列像素。如果按照行的方向进行划分,且如果编码方向是上到下,则第1根条纹即为最上面的一行像素;如果编码方向是从下到上,则第1根条纹即为最下面的一行像素。
本实施例中,第1根条纹邻域内的若干根条纹的确定同样与编码方向有关,如果编码方向从左到右,且条纹是按照列的方向进行划分的,则第1根条纹邻域为右邻域;如果编码方向从右到左,且条纹是按照列的方向进行划分的,则第1根条纹邻域为左邻域;如果编码方向从上到下,且条纹是按照行的方向进行划分的,则第1根条纹邻域为下邻域;如果编码方向从下到上,且条纹是按照行的方向进行划分的,则第1根条纹邻域为上邻域。
本实施例中,若干根条纹的具体数量不做特殊限定,可以是1条,也可以是2条,还可以是3条以上,只要可以保证每一根条纹的码值矩阵不重复即可。
S202、根据所述第1根条纹的码值以及所述若干根条纹的码值,生成所述第1条纹的码值矩阵;
本实施例中,1根条纹中的像素可以划分为若干组,每组像素随机赋予相同的码值,由此可见,实际上对于任1根条纹来说,码值是按照像素组重复出现的,因此,可以直接将其中一组像素的码值来表示对应1根条纹的码值,1根条纹的码值的数量与一组像素中像素的个数对等,比如一组像素中包括4个像素,则一根条纹的码值的数量也为4个。当然,此处仅仅是举例说明,并非特别限定。
对于第1根条纹的码值以及所述若干根条纹的码值具体可以随机生成,也可以根据预先建立的码值模型生成。比如,基于码值生成模型,生成第1根条纹的码值以及若干根条纹的码值,以根据所述第1根条纹的码值以及所述若干根条纹的码值,生成所述第1条纹的码值矩阵。
S203、根据所述第1根条纹的码值矩阵,对编码阵列进行初始化。
本实施例中,可以直接将所述第1根条纹的码值矩阵作为编码阵列的初始值。该初始化后的编码阵列用于确定后续2根条纹的码值阵列,详细请参见图3实施例的详细记载。
图3为本申请实施例三编码阵列的确定方法流程示意图;本实施例中,基于上述图2完成了编码矩阵的初始化后,对后续除第1根条纹之外的其他条纹进行码值阵列确定;如图3所示,其可以包括:
S301、沿着编码方向确定待编码图像中第i根条纹及与其邻域内的若干根条纹;
本实施例中,i大于等于2,即确定后续第2根条纹,直至所有根条纹的码值阵列。
本实施例中,邻域的定义可参见上述图2实施例的记载,与编码方向与条纹的划分方向相关,可以是右邻域,也可以是左邻域,也可以是上邻域,还可以是下邻域,具体采用哪一种邻域可以根据具体使用情形确定。
S302、根据所述第i根条纹的码值以及若干根条纹的码值,生成所述第i根条纹的码值矩阵;
本实施例中,举例来说,在确定第2根条纹的码值矩阵时,使用的是上述图2实施例中第1根条纹的码值阵列。由于在图2示例的初始化过程中,第2根条纹的码值已经随机生成,只要确定其邻域内的若干根条纹的码值即可。在实际应用中,由于第1根条纹邻域的若干根条纹跟第2根条纹邻域的若干根条纹会有重合,那对于重合部分的条纹的码值在图2中已确定,只要确定不重合部分的条纹的码值即可。具体地,可以通过码值生成模型确定不重合部分的条纹的码值,比如通过随机码值生成模型生成不重合部分的条纹的码值,从而形成第2根条纹邻域内的若干根条纹的码值,再与第2根条纹的码值组合形成第2根条纹的码值阵列。
S303、根据所述第i根条纹的码值矩阵以及所有前i-1根条纹的码值,生成编码阵列。
本实施中,在步骤S302之后,步骤S303之前,还可以包括:判断所述第i根条纹的码值矩阵与所有前i-1根条纹的至少一码值矩阵是否相同;若不同,则执行步骤S303。或者,在步骤S303中还可以包括:判断所述第i根条纹的码值矩阵与所有前i-1根条纹的至少一码值矩阵是否相同,若不同,则根据所 述第i根条纹的码值矩阵以及所有前i-1根条纹的码值,生成编码阵列。若所述第i根条纹的码值矩阵与所有前i-1根条纹的至少一码值矩阵相同,则根据所述重新生成第i根条纹的码值,并判断重新生成的第i根条纹的码值与所有前i-1根条纹的码值矩阵是否相同,直至生成的第i根条纹的码值与所有前i-1根条纹的码值矩阵不同。
进一步地,如果条纹的按照列方向进行划分,且编码方向为从到右,则根据所述第i-1根条纹的码值矩阵重新生成第i根条纹的码值时,可以对所述第i-1根条纹的码值矩阵中的列矢量进行左移处理,保留与若干根条纹的数量相同的若干个列矢量,并对所述第i-1根条纹的码值矩阵进行列矢量增量处理,以重新生成第i根条纹的码值。
进一步地,判断所述第i根条纹的码值矩阵与所有前i-1根条纹的码值矩阵是否相同包括:判断添加了所有前i-1根条纹的至少一码值矩阵的中间过程矩阵是否包括所述第i根条纹的码值矩阵,若包括,则所述第i根条纹的码值矩阵与所有前i-1根条纹的至少一码值矩阵相同,否则,则所述第i根条纹的码值矩阵与所有前i-1根条纹的码值矩阵不相同。
执行上述步骤S301-303,对于生成第2根条纹的码值矩阵来说,上述步骤中i=2,通过上述判断过程直至生成与第1根条纹的码值矩阵不重复的一个码值矩阵即可。当需要生成第3根条纹的码值矩阵时,上述步骤中i=3,并使用第2根条纹的码值矩阵,进行上述判断码值矩阵是否相同而过程,直至生成与第1根、第2根条纹的码值矩阵不重复的一个码值矩阵即可。以此类推,如果条纹的根数为n,则执行上述步骤S301-303共计n-1次,即可得到所有条纹的码值矩阵,进而得到最终用于对待编码图像进行编码的编码阵列。
此处,需要说明的是,在一些应用场景中,如果在所述第i根条纹的码值矩阵以及所有前i-1根条纹的码值时就已经预先控制所述第i根条纹的码值矩阵的生成,从而使得所述第i根条纹的码值矩阵与所述所有前i-1根条纹的码值矩阵不重复,则就可以省去步骤:判断所述第i根条纹的码值矩阵与所有前i-1根条纹的码值矩阵是否相同。
图4为本申请实施例四编码阵列的确定方法流程示意图;本实施例中,以条纹的花纹为列方向,编码方向为从左到右的方向,生成第1根条纹的码值阵列为例进行说明;如图4所示,其包括如下步骤:
S401、初始化第1根条纹的码值以及其右邻域内3根条纹的码值,以及初始化中间过程矩阵;
本实施例中,比如将第1根条纹的元素分成若干组,每组包括4个像素,则如前所述,第1根条纹的码值初始化得到具体的码值列向量[1,0,0,0]。其右邻域内的3根条纹分别为:第2根条纹、第3根条纹、第4根条纹,因此,第2根条纹的码值初始化得到具体的码值列向量[0,1,1,1],第3根条纹的码值初始化得到具体的码值列向量[0,1,0,1],第4根条纹的码值初始化得到具体的码值列向量[0,1,0,1]。需要说明的是,为了避免后续生成的码值阵列重复,在初始化条纹的码值时,优选确保对应各个条纹的码值列矢量不重复。
本实例中,为了减少数据计算量,增加编码速度,初始化后的中间过程矩阵优选为一空矩阵,该空矩阵的维度可根据码值矩阵的维度进行动态调整。
S402、根据第1根条纹的码值以及其邻域内3根条纹的码值生成第1根条纹的码值矩阵;
本实施例中,通过将上述第1根-第4根条纹的码值列向量组合起来形成对应的码值矩阵A,即第1根条纹的码值矩阵:
Figure PCTCN2019077994-appb-000001
S403、判断第1根条纹的码值矩阵是否包括在初始化后的中间过程矩阵中,若否,则执行步骤S404A,若是,则执行步骤S404B;
本实施例中,由于初始化后的中间过程矩阵为空矩阵,因此,第1根条纹的码值矩阵不包括在空矩阵中,因此,则直接跳转到步骤S404,可以省略步骤S403。但是,需要说明的是,如果初始化的中间过程矩阵不为空矩阵,则需要增加步骤S403,因此,为了兼顾考虑两种情形,确保通用于各种场景,优选保留步骤S403。
S404A、将第1根条纹的码值矩阵添加到所述初始化后的中间过程矩阵中;
S404B、将第1根条纹的码值矩阵中最左侧的一列码值移除,并将保留的三列码值左移,同时,添加随机生成的列矢量,形成新的第1根条纹的码值矩阵,并跳转到S403;
本实施例中,随机生成的列矢量比如为:[1,0,0,1],当然,也可以为[0,0,0,1];或者任意跟第1根-第4根条纹的码值相同或者不同的列矢量。由于步骤S402中的第1根条纹的码值矩阵中最左侧的一列码值被移除,同时,保留的三列码 值左移,因此,则可以将随机生成的列矢量添加到最右侧,即第4列,从而形成新的第1根条纹的码值矩阵,并再次跳转到步骤S403判断是否包括在初始化后的中间过程矩阵,此种情况需要说明的是,初始化后的中间过程矩阵优选不为空矩阵。
S405、结束对第1根条纹的编码。
通过上述步骤S403、S404B的循环,直至第1根条纹的码值阵列没有包括在初始化后的中间过程矩阵中。
图5为本申请实施例五编码阵列的确定方法流程示意图;本实施例中,以条纹的花纹为列方向,编码方向为从左到右的方向,生成第2根条纹、第3根条纹、第n根条纹的码值阵列为例进行说明;如图5所示,本实施例中以生成第2根条纹的编码为例,其中i=2,其包括如下步骤:
S501、沿着从左到右的编码方向确定待编码图像中第i根条纹及与其右邻域内的3根条纹;
本实施例中,第2根右邻域内的3根条纹分别为:第3根条纹、第4根条纹、第5根条纹。
S502、根据所述第i根条纹的码值以及其邻域内的3根条纹的码值,生成所述第i根条纹的码值矩阵;
本实施例中,参见上述图4实施例,在生成第1根条纹的码值阵列时,第2根-第4根条纹的码值已经生成,在此直接使用即可,而只要生成第5根条纹的码值,比如第5根条纹的码值列向量为[0,1,1,0],或者,推而广之或者任意跟第1根-第4根条纹的码值相同或者不同的。在具体实施,优选任意跟第1根-第4根条纹的码值不同的,避免后续步骤S503的重复执行,以提高数据处理效率。
本实施例中,经过步骤S502处理得到的第2根条纹的码值矩阵A2为:
Figure PCTCN2019077994-appb-000002
S503、判断所述第i根条纹的码值矩阵是否包括在生成所有前i-1根条纹的至少一码值矩阵的中间过程矩阵中;若否,则执行S504A;若是,则执行S504B;
本实施例中,具体为判断第2根条纹的码值阵列是否包括在生成所述第1根条纹的码值矩阵的中间过程矩阵中。生成所述第1根条纹的码值矩阵的中间 过程矩阵记为Mats,由于初始化的中间过程矩阵为空矩阵,则添加了码值矩阵A1的中间过程矩阵为:
Figure PCTCN2019077994-appb-000003
由上述A2跟Mats的比对来看,A2并未包括在中间过程矩阵Mats中,因此,即通过上述步骤S502生成的码值矩阵A2为有效的码值矩阵,对应地,对第2根条纹的码值列向量[0,1,1,1]有效,从而跳转到步骤S504A。否则,跳转到步骤S504B。
S504A、结束对第i根条纹的编码;
S504B、将第i根条纹的码值矩阵中最左侧的一列码值移除,并将保留的三列码值左移,同时,添加随机生成的列矢量,形成新的第i根条纹的码值矩阵,并跳转到S503。
参见上述步骤S502中,第5根条纹的码值列向量使得第2根条纹的码值阵列包括在生成所述第1根条纹的码值矩阵的中间过程矩阵中,则按照步骤S504B重新生成第i根条纹的码值矩阵,详细不再举例说明。
此处需要说明的是,在一种具体应用场景中,并不必然包括上述图4实施例以生成第1根条纹的码值阵列,或者,直接利用为满足其它应用场景中而已经生成的第1根条纹的码值阵列即可。
图6为本申请实施例六编码图像的示意图;图7为本申请实施例七编码图像的示意图;参见图6、7所示,在编码图像上,较大白色方框代表码值为1,较小白色方框代表码值为0。图6和图7不同之处在于,图6中编码图像为一副,其对应的编码序列为0和1的混合,而在图7中,为了分时进行投射编码图像,使用编码序列中所有码值0对待编码图像形成一副编码图像,使用编码序列中所有码值1对待编码图像形成另一副编码图像。
本申请实施例还提供一种结构光编码方法,其根据本申请任一实施例得到编码阵列对待编码图像进行编码。
可选地,在本申请的任一实施例中,根据本申请任一实施例得到编码阵列对待编码图像进行编码得到分时编码图像。
至此,已经对本主题的特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作可以按照不同的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序,以实现期望的结果。在某些实施方式中,多任务处理和并行处理可以是有利的。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定事务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行事务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (13)

  1. 一种编码阵列的确定方法,其特征在于,包括:
    沿着编码方向确定待编码图像中第i根条纹及与其邻域内的若干根条纹;
    根据所述第i根条纹的码值以及若干根条纹的码值,生成所述第i根条纹的码值矩阵;
    根据所述第i根条纹的码值矩阵以及所有前i-1根条纹的码值,生成编码阵列,i大于等于2。
  2. 根据权利要求1所述的方法,其特征在于,生成所述第i条纹的码值矩阵之后,包括:判断所述第i根条纹的码值矩阵与所有前i-1根条纹的至少一码值矩阵是否相同;若不同,则根据所述第i根条纹的码值矩阵以及所有前i-1根条纹的码值,生成用于对待编码图像进行编码的编码阵列。
  3. 根据权利要求2所述的方法,其特征在于,若所述第i根条纹的码值矩阵与所有前i-1根条纹的至少一码值矩阵相同,则重新生成第i根条纹的码值,并判断重新生成的第i根条纹的码值与所有前i-1根条纹的码值矩阵是否相同。
  4. 根据权利要求3所述的方法,其特征在于,重新生成第i根条纹的码值,包括:对第i-1根条纹的码值矩阵中的列矢量进行左移处理,保留与若干根条纹的数量相同的若干个列矢量,并对所述第i-1根条纹的码值矩阵进行列矢量增量处理,以重新生成第i根条纹的码值。
  5. 根据权利要求2所述的方法,其特征在于,判断所述第i根条纹的码值矩阵与所有前i-1根条纹的码值矩阵是否相同包括:判断添加了所有前i-1根条纹的至少一码值矩阵的中间过程矩阵是否包括所述第i根条纹的码值矩阵,若包括,则所述第i根条纹的码值矩阵与所有前i-1根条纹的码值矩阵相同,否则,则所述第i根条纹的码值矩阵与所有前i-1根条纹的码值矩阵不相同。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述编码方向为从左到右,所述邻域为右邻域;或者,所述编码方向从右到左,所述邻域为左邻域;或者,所述编码方向为上到下,所述邻域为下邻域;或者,所述编码方向为下到上,所述邻域为上邻域。
  7. 一种编码阵列的初始化方法,其特征在于,包括:
    沿着编码方向确定待编码图像中第1根条纹及与其邻域内的若干根条纹;
    根据所述第1根条纹的码值以及所述若干根条纹的码值,生成所述第1条纹的码值矩阵;
    根据所述第1根条纹的码值矩阵,对编码阵列进行初始化。
  8. 根据权利要求6所述的方法,其特征在于,还包括:基于码值生成模型,生成第1根条纹的码值以及若干根条纹的码值,以根据所述第1根条纹的码值以及所述若干根条纹的码值,生成所述第1条纹的码值矩阵。
  9. 根据权利要求8所述的方法,其特征在于,所述预先配置的矩阵为空矩阵。
  10. 一种结构光编码方法,其特征在于,根据权利要求1-6任一项得到编码阵列对待编码图像进行编码。
  11. 根据权利要求10所述的方法,其特征在于,根据权利要求1-6任一项得到编码阵列对待编码图像进行编码得到分时编码图像。
  12. 一种光学装置,其特征在于,包括:若干个光栅结构,所述若干个光栅结构根据对待编码图像进行编码的编码整列设置,所述编码阵列根据所述第i根条纹的码值矩阵以及所有前i-1根条纹的码值生成,所述第i根条纹的码值矩阵根据所述第i根条纹的码值以及其邻域内的若干根条纹的码值生成;所述第i根条纹及与其邻域内的若干根条纹通过沿着编码方向确定,i大于等于2;所述若干个光栅结构用于通过光束衍射将根据所述阵列对待编码图像进行编码得到的编码图像投影到目标物体上。
  13. 一种三维测量系统,其特征在于,包括:投影设备以及摄像设备,所述投影设备包括权利要求12所述的光学装置,所述摄像设备用于捕获所述编码图像投影到目标物体上形成的投影图像,以根据所述投影图像和所述编码图像进行所述目标物体的三维测量。
PCT/CN2019/077994 2019-03-13 2019-03-13 编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置 WO2020181525A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980000336.9A CN110062870B (zh) 2019-03-13 2019-03-13 编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置
PCT/CN2019/077994 WO2020181525A1 (zh) 2019-03-13 2019-03-13 编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/077994 WO2020181525A1 (zh) 2019-03-13 2019-03-13 编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置

Publications (1)

Publication Number Publication Date
WO2020181525A1 true WO2020181525A1 (zh) 2020-09-17

Family

ID=67325771

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077994 WO2020181525A1 (zh) 2019-03-13 2019-03-13 编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置

Country Status (2)

Country Link
CN (1) CN110062870B (zh)
WO (1) WO2020181525A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110823131B (zh) * 2019-11-18 2020-12-22 西南交通大学 基于可编程控制器的三维测量光栅条纹的生成方法
CN114252027B (zh) * 2021-12-22 2023-07-14 深圳市响西科技有限公司 一种结构光条纹图连续播放方法及3d结构光光机

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030072569A1 (en) * 2001-10-15 2003-04-17 Pentax Corporation Three-dimensional image-capturing device and adapter for three-dimensional image-capturing
CN101526340A (zh) * 2009-03-20 2009-09-09 东南大学 基于格雷编码原理的光栅条纹图像的条纹彩色编码方法
CN103514627A (zh) * 2012-06-21 2014-01-15 南京大学 一种针对颜色结构光扫描系统的自适应动态规划匹配方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3028016B2 (ja) * 1993-02-26 2000-04-04 村田機械株式会社 積荷の三次元画像計測方法
CN1138232C (zh) * 2000-05-26 2004-02-11 清华大学 一种空间编码方法
CN101256672B (zh) * 2008-03-21 2011-10-12 北京中星微电子有限公司 基于视频摄像设备的物体图像深度重构装置及其投影装置
CN101281652B (zh) * 2008-05-12 2011-09-14 北京中星微电子有限公司 基于视频摄像设备的结构光编码及解码方法
CN102322823B (zh) * 2011-09-13 2013-01-23 四川大学 基于相位级次自编码的光学三维测量方法
CN106643562B (zh) * 2016-10-27 2019-05-03 天津大学 基于时域空域混合编码的结构光条纹投射方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030072569A1 (en) * 2001-10-15 2003-04-17 Pentax Corporation Three-dimensional image-capturing device and adapter for three-dimensional image-capturing
CN101526340A (zh) * 2009-03-20 2009-09-09 东南大学 基于格雷编码原理的光栅条纹图像的条纹彩色编码方法
CN103514627A (zh) * 2012-06-21 2014-01-15 南京大学 一种针对颜色结构光扫描系统的自适应动态规划匹配方法

Also Published As

Publication number Publication date
CN110062870B (zh) 2021-08-13
CN110062870A (zh) 2019-07-26

Similar Documents

Publication Publication Date Title
CN113643378B (zh) 多相机环境中主动式刚体的位姿定位方法及相关设备
US11024073B2 (en) Method and apparatus for generating virtual object
CN103440660B (zh) 一种基于gpu的集成成像微图像阵列快速生成方法
KR102197067B1 (ko) 멀티 프레임들의 동일한 영역을 연속으로 렌더링하는 방법 및 장치
US20150109292A1 (en) Method and apparatus for generating acceleration structure in ray tracing system
US20170256061A1 (en) Image processing
WO2020181525A1 (zh) 编码阵列的确定方法、初始化方法、结构光编码方法、光学装置以及三维测量装置
CN104854426A (zh) 用于为了三维图像生成来标记图像的系统和方法
CN107036556A (zh) 基于分段量化相位编码的结构光三维测量方法
US20220335272A1 (en) Fast sparse neural networks
JP2018511874A (ja) 3次元モデリング方法及び装置
CN108122280A (zh) 一种三维点云的重建方法及装置
CN104778741A (zh) 二维图形转换为三维图形的方法和装置
CN106023147A (zh) 一种基于gpu的线阵遥感影像dsm快速提取方法
US20130207967A1 (en) Image processing apparatus and method
CN115439571A (zh) 一种适用于线阵推扫式卫星影像核线影像生成方法及装置
US10893252B2 (en) Image processing apparatus and 2D image generation program
JP2018063220A (ja) 3次元測定装置および3次元測定方法
US11360744B2 (en) Two-dimensional data matching method, device and logic circuit
US9741155B2 (en) Apparatus and method for tile-based graphic data rendering
CN114119661A (zh) 一种目标追踪处理器、目标追踪方法及装置
WO2023196057A1 (en) Repairing image depth values for an object with a light absorbing surface
KR20100072843A (ko) 평행사변형 기반의 무한 호모그래피 산출 방법과 이를 이용한 건물 구조 복원 방법
JP2022547873A (ja) 点群データ処理方法及び装置
CN112465932A (zh) 一种图像填充方法、装置、设备及存储介质

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: 19919044

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: 19919044

Country of ref document: EP

Kind code of ref document: A1