CN111340957A - Measurement method and system - Google Patents

Measurement method and system Download PDF

Info

Publication number
CN111340957A
CN111340957A CN202010084272.XA CN202010084272A CN111340957A CN 111340957 A CN111340957 A CN 111340957A CN 202010084272 A CN202010084272 A CN 202010084272A CN 111340957 A CN111340957 A CN 111340957A
Authority
CN
China
Prior art keywords
grid
point
determining
arrow
column
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202010084272.XA
Other languages
Chinese (zh)
Other versions
CN111340957B (en
Inventor
易京亚
赵天光
温志庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ji Hua Laboratory
Original Assignee
Ji Hua Laboratory
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 Ji Hua Laboratory filed Critical Ji Hua Laboratory
Priority to CN202010084272.XA priority Critical patent/CN111340957B/en
Publication of CN111340957A publication Critical patent/CN111340957A/en
Application granted granted Critical
Publication of CN111340957B publication Critical patent/CN111340957B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/582Pseudo-random number generators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • Multimedia (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the invention provides a measuring method and a measuring system. The measuring method comprises the following steps: illuminating a target object by adopting a standard coded image, wherein the standard coded image is coded by an arrow symbol set corresponding to a pseudo-random digital matrix, the number of elements of the pseudo-random digital matrix is the number of types of arrow symbols in the arrow symbol set, and a plurality of arrow symbols respectively point to a plurality of different directions of the elements on the same plane; acquiring a deformation coding image of the standard coding image through reflection of the target object; decoding the morphed encoded image using the pseudo-random digital matrix to determine three-dimensional features of the target object, wherein the sequential decoding is by translating a window of a particular size in the encoded image. The embodiment of the invention has higher robustness and further improves the accuracy of decoding.

Description

Measurement method and system
Technical Field
The invention belongs to the technical field of three-dimensional measurement, and particularly relates to a measurement method and a measurement system.
Background
With the development of three-dimensional measurement technology, 3D measurement technology based on surface structured light is widely used. The structured light 3D measuring technology is that a light source is utilized to project structured light which is coded in advance to the surface of an object to be measured, the height change of the surface of the object causes the deformation of a structured light coded image, a camera is utilized to shoot the deformed coded pattern, and the deformed coded pattern is demodulated, so that the 3D data of the object can be obtained. According to different structured light coding modes, the surface structured light technology is divided into time coding, space coding and direct coding. Time coding needs to acquire a plurality of pictures to perform stable decoding, direct coding is easily affected by ambient light and noise, and a space coding mode only needs a single picture to perform decoding and can be applied to a high-speed measurement scene.
The current commonly used spatial coding scheme is based on M-array, which is an extension of pseudo-random array in two dimensions. The code value of any one characteristic point on the M array with the size of j x i matrix is determined by the code words of the neighborhood grids with specific sizes, and each characteristic point code value in the M array is unique, so that the quick decoding of a single-frame picture can be realized. The M-array itself is a matrix of pseudo-random number sequences in a specific way, and in practical vision applications, each number is replaced by an image symbol, thereby forming an M-array structured light. Wherein the choice of the image symbols determines the ease and accuracy of post-decoding. The traditional image characters have color symbol codes related to color codes, more complex codes can be realized by increasing color channels, but the color values of the color codes are greatly influenced by the illumination factors and the colors of the surfaces of objects, the applicable scenes are limited, and therefore, the black-and-white codes are more widely used.
Disclosure of Invention
In view of this, embodiments of the present invention provide a measurement method and system, which can achieve accurate symbol positioning and efficient code value recovery compared to the conventional symbol encoding technology.
In one aspect, a measurement method is provided, including: illuminating a target object by adopting a standard coded image, wherein the standard coded image is coded by an arrow symbol set corresponding to a pseudo-random digital matrix, the number of elements of the pseudo-random digital matrix is the number of types of arrow symbols in the arrow symbol set, and a plurality of arrow symbols respectively point to a plurality of different directions of the elements on the same plane; acquiring a deformed coding image of the standard coding image through reflection of the target object; decoding the morphed encoded image using the pseudo-random digital matrix to determine the three-dimensional features of the target object, wherein the sequential decoding is by translating a window of a particular size in the encoded image.
In another aspect, a measurement system is provided, including: a coding and decoding device; the projection device is used for irradiating a target object by adopting a standard coded image coded by the coding and decoding device, the standard coded image is coded by an arrow symbol set corresponding to a pseudo-random digital matrix, the number of elements of the pseudo-random digital matrix is the number of types of arrow symbols in the arrow symbol set, and a plurality of arrow symbols respectively point to a plurality of different directions of the elements on the same plane; the acquisition device acquires a deformation coding image of the standard coding image through reflection of the target object; the encoding and decoding device decodes the warped encoded image using the pseudo-random digital matrix to determine the three-dimensional feature of the target object, wherein the sequential decoding is performed by translating a window having a specific size in the encoded image.
The scheme of the embodiment of the invention adopts arrow symbol set coding, and because of a plurality of arrow symbols in the arrow symbol set, the coding with simple code and strong noise immunity is realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the embodiments or drawings used in the prior art description, and obviously, the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow diagram of a measurement method according to one embodiment of the invention.
FIG. 2 is a partial diagram of a pseudo-random digital matrix according to another embodiment of the invention.
FIG. 3 is an arrow symbol diagram for different orientations according to another embodiment of the present invention.
FIG. 4 is a standard symbol encoding scheme according to another embodiment of the present invention.
Fig. 5 is a schematic diagram of an initialization grid according to another embodiment of the present invention.
Fig. 6 is a schematic diagram of padding based on an initialization grid according to another embodiment of the present invention.
Fig. 7 is a schematic diagram of further population based on an initialization grid according to another embodiment of the present invention.
FIG. 8 is a schematic block diagram of a measurement system according to another embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 is a schematic flow diagram of a measurement method according to one embodiment of the invention. The measurement method of fig. 1 includes:
step 110: and (3) irradiating the target object by adopting a standard coded image, wherein the standard coded image is coded by an arrow symbol set corresponding to a pseudo-random number matrix, the number of elements of the pseudo-random number matrix is the number of types of arrow symbols in the arrow symbol set, and a plurality of arrow symbols respectively point to a plurality of different directions of the elements on the same plane.
The standard coding image such as an M array coding pattern projects the generated M array coding pattern to the surface of an object to be measured as a target object by using a light source.
Step 120: and acquiring a deformation coding image of the standard coding image through the reflection of the target object.
The standard coding pattern is modulated by the height code of the surface of the object to be measured to deform, a deformed coding image is formed, and the deformed coding pattern is captured by a camera.
Step 130: the morphed encoded image is decoded using a pseudo-random digital matrix to determine three-dimensional features of the target object, wherein the sequential decoding is by translating a window of a particular size in the encoded image.
In one embodiment of the invention, the number of primitives is N, and two adjacent directions of the N directions pointed to by the N arrow symbols form an angle of 2 п/N, where N is an integer greater than 21*k2N x M pseudo-random M matrix, in which case any one k in the n x M matrix1*k2The code values for the windows are all unique. For example, take the number of elements N-4, k1=3,k2A partial map of the matrix is generated 3.
The standard coded image is coded by an arrow symbol set corresponding to a pseudo-random number matrix, for example, an arrow symbol is adopted to replace a unit in an M matrix so as to obtain an M-array structure coded graph. For each arrow symbol, as shown in fig. 3, when the arrow symbol points to the upper right corner of the rectangle, the arrow symbol corresponds to character 0, when the arrow symbol points to the upper left corner of the rectangle, the arrow symbol corresponds to character 1, when the arrow symbol points to the lower left corner of the rectangle, the arrow symbol corresponds to character 2, and when the arrow symbol points to the lower right corner of the rectangle, the arrow symbol corresponds to character 3, so that, for the whole standard encoded image, the corresponding relationship shown in fig. 4 is provided, and fig. 4 is a standard symbol encoded image according to an embodiment of the present invention. As shown, the pseudo-random digital matrix on the left is encoded to form a standard encoded image on the right.
The scheme of the embodiment of the invention adopts arrow symbol set coding, and because of a plurality of arrow symbols in the arrow symbol set, the coding with simple code and strong noise immunity is realized.
The embodiment of the invention is based on M-array structured light coding. In addition, the embodiment of the invention is a novel decoding scheme based on arrow symbols, and is a more efficient symbol positioning and character decoding scheme.
Generally, in the existing time coding technology, a complex coding mode is adopted for decoding stability, so that the decoding time is too long. Compared with the time coding technology, the structured light space coding technology adopted by the embodiment of the invention can measure the three-dimensional appearance of the object by shooting a single frame of picture, thereby being more suitable for measuring a dynamic scene. In addition, even in the case of the spatial decoding technique, when the symbol is encoded based on a simple geometric shape, if the symbol is deformed or blocked by the object height modulation, the encoded symbol is easily recognized by mistake. According to the arrow coding symbol efficient decoding method, in the processes of positioning the central point of the coding symbol and decoding the symbol, a more efficient algorithm is adopted to improve the calculation speed. In addition, in the embodiment of the invention, the pseudo-random number matrix is used for decoding the deformation coding image to determine the three-dimensional characteristics of the target object, namely, in the process of carrying out neighborhood gridding on the center point of the symbol, the standard M array is used for correcting to construct the correct neighborhood grid position of each symbol, so that the decoding accuracy is ensured while the decoding speed is improved. In other words, a standard M array is introduced to carry out gridding correction in the process of symbol gridding so as to obtain more accurate symbol neighborhood grid relation.
In one embodiment of the present invention, where N is 4, decoding the warped encoded image using a pseudo-random digital matrix comprises: determining the respective central point positions of a plurality of arrow symbols in the deformed encoded image through angular point extraction; and decoding the deformed coded image by utilizing the pseudo-random number matrix based on the position of the respective central point.
In an embodiment of the present invention, determining the respective center point positions of a plurality of arrow symbols in a deformed encoded image by corner point extraction includes: and extracting a plurality of contours in which a plurality of arrow symbols are respectively positioned. And respectively determining a plurality of circumscribed rectangles aiming at the plurality of outlines so that the plurality of circumscribed rectangles respectively contain a plurality of arrow symbols. The four corner points with the highest score in each of the plurality of circumscribed rectangles are determined. And aiming at each specific rectangle, selecting a target corner point of the four corner points as a central point of an arrow symbol contained in the circumscribed rectangle, wherein the abscissa of the target corner point is less than the maximum abscissa of the four corner points and is greater than the minimum abscissa of the four corner points, and the ordinate of the target corner point is less than the maximum ordinate of the four corner points and is greater than the minimum ordinate of the four corner points.
In particular, the acquired pictures may be subjected to image enhancement processing prior to decoding the warped encoded image using the pseudo-random digital matrix in order to reduce the effects of ambient light and noise. The image enhancement processing includes, but is not limited to, methods of contrast enhancement, filtering, binarization, etc.
Furthermore, after the image enhancement processing, contour extraction and filtering may be performed to obtain a contour that conforms to the size of the coded symbol.
And extracting a plurality of outlines in which the arrow symbols are respectively positioned for center point positioning and symbol decoding. Specifically, in order to improve the positioning efficiency of each central point, angular point extraction may be performed on each external rectangle first, and under the condition of adopting non-maximum value suppression, four angular points with the highest score are extracted from each external rectangle and are P1(x1,y1)、P2(x2,y2)、P3(x3,y3)、P4(x4,y4). That is, since the score is the bestThe four high corner points correspond to three vertexes and a central point of the arrow symbol, and the x and y values of the central point cannot be the maximum value and the minimum value no matter how the arrow symbol rotates, as can be seen from the arrow structure.
In particular, the minimum abscissa is xmin=min{x1,x2,x3,x4}; the maximum abscissa is xmax=max{x1,x2,x3,x4}; the minimum ordinate is ymin=min{y1,y2,y3,y4}; maximum ordinate ymax=max{y1,y2,y3,y4}。
The abscissa of the target corner point is smaller than the maximum abscissa of the four corner points and larger than the minimum abscissa of the four corner points, and the ordinate of the target corner point is smaller than the maximum ordinate of the four corner points and larger than the minimum ordinate of the four corner points. For example the center point Pc(xc,yc) Satisfies the following conditions: x is the number ofc≠xminAnd xc≠xmaxAnd y isc≠yminAnd y isc≠ymax
Selecting a target corner point of the four corner points as a central point of an arrow symbol contained in the circumscribed rectangle, in other words, searching for a corner point satisfying P from the four corner pointscThe desired point is the center point.
In one embodiment, if there are two points that satisfy the requirement, then P is utilized1(x1,y1)、P2(x2,y2)、 P3(x3,y3)、P4(x4,y4) Four points quickly calculate the position of the gravity center, and the point of the two points closest to the gravity center is taken as the center point Pc. Therefore, the four corner points with the highest scores can be rapidly screened by utilizing the obvious advantages of the arrow mark corner point characteristics. That is, since the x and y values of the center point are not the maximum and minimum among the four points, three boundary points are quickly excluded by comparing the sizes of the four corner points x and y, thereby positioning the center corner point as the center pointThe center point.
In one embodiment of the present invention, decoding a warped encoded image using a pseudo-random number matrix based on respective centroid positions comprises: determining a plurality of digital codes respectively corresponding to the arrow symbols based on the respective central point positions of the arrow symbols; determining an initialization grid based on the respective central point positions of the arrow symbols; based on the pseudo-random digital matrix, the plurality of digital codes, and the initialization grid, a neighborhood grid between the plurality of arrow symbols is determined.
In an embodiment of the present invention, determining a plurality of digital codes respectively corresponding to a plurality of arrow symbols based on respective central point positions of the plurality of arrow symbols includes: extracting a specific rectangle from each external rectangle, and dividing the rectangle into four quadrants; for each specific rectangle, determining the direction indicated by the arrow symbols in the circumscribed rectangle by counting the number of pixels in each quadrant, which are the same as the gray scale of the outline; and determining the number corresponding to the direction indicated by the arrow symbol in the circumscribed rectangle as the number code corresponding to the arrow symbol.
Determining a plurality of digital codes respectively corresponding to a plurality of arrow symbols based on respective central point positions of the arrow symbols, specifically, identifying a central point PcThe symbol then needs to be decoded to recover the digital code represented by the symbol.
In a particular embodiment, take PcA window of size W x W in which W is W>5, and W is less than the side length of the corresponding circumscribed rectangle. Equally dividing the circumscribed rectangle W x W into four quadrants, counting the number of foreground color pixels in the four quadrants, which are the same as the symbol gray value, and identifying the digital code according to the quadrant with the least number.
For example, when the method of fig. 3 is used for symbol encoding, when the quadrant with the least pixels of the foreground is the first quadrant, the corresponding number is 2; when the quadrant with the least pixels of the current scene is the second quadrant, the corresponding number is 3; when the quadrant with the least pixels of the current scene is the third quadrant, the corresponding number is 0; when the quadrant with the least pixels of the foreground is the fourth quadrant, the corresponding number is 1.
In order to determine a plurality of digital codes corresponding to a plurality of arrow symbols, respectively. The embodiment of the invention is based on the decoding algorithm of arrow symbols, and based on W-W neighborhood windows of the central point, the pixel accumulation calculation of different quadrants is carried out, thereby carrying out symbol decoding. In consideration of the characteristics of arrow symbols, the decoding algorithm can be accelerated by adopting the most W size, and redundant calculation is avoided.
The center point positioning method based on the four high-resolution points is convenient, quick and effective, and the calculated amount is greatly reduced compared with the traditional center point positioning method based on the external rectangle to calculate the gravity center. In addition, the traditional calculation of the center point is to average the deformation process, and there is precision loss, but the center point positioning method provided by the invention has faster positioning speed and better positioning precision. Moreover, the more reasonable central point neighborhood W x W window adopted by the invention is used for decoding, thereby further reducing the calculated amount and improving the decoding efficiency.
In one embodiment of the present invention, determining an initialization grid based on respective center point positions of a plurality of arrow symbols includes: determining initial points of grids based on the positions of respective central points and the original points of the deformation coding image by utilizing the Euclidean relationship; determining a reference row distance and a reference column distance based on the grid initial point and the respective central point positions of the arrow symbols; a row grid and a column grid are determined based on the grid initiation point, the reference row spacing, and the reference column spacing, wherein the row grid and the column grid form an initialization grid.
As described above, each arrow symbol can find its center point coordinate Pc(xc,yc) And a digital code S; in spatial coding techniques, the code value for each point is determined by its k1*k2The neighborhood is uniquely determined. The primitive is an N m pseudo-random matrix of N, the types of the digital codes are N, and the number of the symbols is N m.
But only knows Pc(xc,yc) The corresponding digital code S is not sufficient to determine the uniqueness of the point, and it is also necessary to know the digital code of its corresponding neighborhood. Therefore, in the present embodiment, the arrow is based on a plurality of arrowsThe position of the respective central point of the symbol, an initialization grid is determined, i.e. in order to obtain each central point Pc(xc,yc) The neighborhood of (a) needs to be gridded for all central points.
Considering the point coordinate value P of the center point stored in each gridc(xc,yc) And a digital code S, and the correct gridding can ensure that the captured deformed code pattern has a consistent neighborhood with the standard code.
And determining the initial points of the grids based on the positions of the respective central points and the original points of the deformed coded images by utilizing the Euclidean relationship. Specifically, in order to more reasonably determine the gridded pitch, the line pitch and the column pitch after gridding are evaluated. For example, the center point P closest to the top left vertex is calculatedfrist(xf,yf) Assuming that the number of center points is N, i.e. P1(x1,y1)、P2(x2,y2)...PN(xN,yN) The distance from the ith point to the upper left point (origin)
Figure BDA0002381482530000081
Then there is Pfrist(x, y) distance to origin: dfrist=min{d1,d2…dN}。
And determining a reference row distance and a reference column distance based on the grid initial point and the positions of the respective central points of the arrow symbols. Specifically, the reference column pitch may also be expressed as a gridded column pitch. In the calculation, with Pfrist(xf,yf) As a starting point, the value of y is set at (y-T)y,y+Ty) Center point in range, TySorting according to the tolerance range of y from small to large according to the value of x, obtaining the distance between two adjacent points, if N1 points exist, obtaining N1-1 distances, obtaining the median of the N1-1 distances, and taking the median as the column distance Dc. The reference line spacing may also be referred to as a gridded line spacing. In the calculation, with Pfrist(xf,yf) As a starting point, the value of x is set to (x-T)x,x+Tx) Center point, T, of the rangexTolerance range according to xSorting the lines according to the y value from small to large, calculating the distance between two adjacent points, if N2 points exist, calculating N2-1 distances, taking the median of the N2-1 distances, and taking the median as the line distance Dr
It should be understood that the median values in the above can be replaced by average values, and the embodiment of the present invention is not limited thereto.
In one embodiment of the present invention, determining a row grid and a column grid based on a grid initiation point, a reference row spacing, and a reference column spacing comprises: determining a first-column point vector through iterative calculation, wherein a next point of the first-column point vector is determined based on an initial point of a grid and a current line spacing, and the current line spacing is obtained by weighting an upper line spacing and a reference line spacing based on a first weight; determining a head line point vector through iterative calculation, wherein the next point of the head line point vector is determined based on the initial point of the grid and the current column distance, and the current column distance is obtained by weighting the previous column distance and the average column distance based on a second weight; a column grid and a row grid are determined based on the first column point vector and the first row point vector, respectively.
In general, the head-column point vector and the head-line point vector are determined by iterative calculations. By reference line spacing DrAnd a reference column pitch DcFirstly, a grid first row point and a grid first column point are constructed, then a column network is constructed by utilizing the first row point, and a row network is constructed by utilizing the first column point.
In the iterative calculation, the head-column central point vector is calculated
Figure BDA0002381482530000092
With Pfrist(xf,yf) Starting from P (x)f,yf+Dr) Is centered at Ty*TxSearching the window for a center point P (x, y), and taking off P (x) when there are multiple center pointsf,yf+Dr) The nearest point is the second point of the first grid if Ty*TxIf there is no center point in the window, then take P (x)f,yf+Dr) Is the second point and is marked as the invalid point.
Specifically, the kth point (k) of the first column>2) Is determined by starting from the k-1 pointP (xk-1,yk-1+Dr_λ) Is centered at Ty*TxSearching the window for a center point P (x, y), and taking off P (x) when there are multiple center pointsk-1,yk-1+Dr_λ) The nearest point is the kth point of the first grid if Ty*TxIf there is no center point in the window, then take P (x)k-1,yk-1+Dr_λ) Is point k and is marked as invalid point. When y isk-1+Dr_λ-Ty>ymaxStopping searching to obtain the first-row central point composition vector
Figure BDA0002381482530000091
Wherein y ismaxIs the maximum y coordinate value among all P (x, y).
Generally, the current line spacing is weighted by the previous line spacing and the reference line spacing based on the first weight. Taking the distance from the k-2 th point to the k-1 st point as Dpre_kRecord Dr_λ=λDpre_k+(1-λ)DrWherein λ is the first weight and the value range is [0,1 ]]。
Early calculation of head line center point vector
Figure BDA0002381482530000101
When is in Pfrist(xf,yf) Starting from P (x)f+Dc,yf) Is centered at Ty*TxSearching the window for a center point P (x, y), and taking off P (x) when there are multiple center pointsf+Dc,yf) The nearest point is the second point of the first-line grid if Ty*TxIf there is no center point in the window, then take P (x)f+Dc,yf) Is the second point and is marked as the invalid point.
K point of the first line (k)>2) Is determined by starting at point k-1 and starting at P (x)k-1+Dc_λ,yk-1) Is centered at Ty*TxSearching the window for a center point P (x, y), and taking off P (x) when there are multiple center pointsk-1+Dc_λ,yk-1) The nearest point is the kth point of the first line grid if Ty*TxIn the window hasThe central point is P (x)k-1+Dc_λ,yk-1) Is point k and is marked as invalid point. When x isk-1+Dc_λ-Tx>xmaxStopping searching to obtain the first line central point composition vector
Figure BDA0002381482530000102
Wherein xmaxIs the maximum x-coordinate value of all P (x, y).
Generally, the current column spacing is weighted by the last column spacing and the average column spacing based on the second weight. Taking the distance from the k-2 th point to the k-1 st point as Dpre_kRecord Dc_λ=λDpre_k+(1-λ)DcWherein λ is the second weight and the value range is [0,1 ]]。
It should be understood that the first weight value and the second weight value may be equal or unequal. In a preferred embodiment, the first weight is equal to the second weight, thereby reducing the amount of computation.
Generally, the row grid is determined based on the first column point vectors, respectively. In particular, a first-column center-point vector is utilized
Figure BDA0002381482530000103
Each point in the image is used as a starting point, line-by-line search is carried out in a searching mode of a head line point towards the X direction,
Figure BDA0002381482530000104
with NrWhen it is dotted, there is NrThe individual line vectors, in order, may form a line grid Gr
In addition, a column grid is determined based on the head-line point vectors, respectively. Using head line central point vectors
Figure BDA0002381482530000105
Each point is taken as a starting point, the search is carried out column by column in a search mode of the first column point towards the Y direction,
Figure BDA0002381482530000106
with NcWhen it is dotted, there is NcA column vector which can be constructed in orderGrid array Gc
In one embodiment of the present invention, determining a neighborhood grid among a plurality of arrow symbols based on a pseudo-random number matrix, a plurality of digital codes, and an initialization grid comprises: determining a window size (k) between an initialization grid and a pseudorandom digital matrix1+1)*(k2+1) such that each digital code of the arrow symbol of the initialization grid in the initial matching window is identical to the corresponding element of the pseudo-random digital matrix in the initial matching window, where k is1,k2Is a positive integer; based on the initial matching window, move k in the row direction1*k2Window, line filling of neighborhood grid by line grid by comparing whether digital code and element are the same, or moving k in column direction based on initial matching window1*k2And a window for performing column filling of the neighbor grid using the column grid by comparing whether the digital code is identical to the element, wherein when the digital code of at least one of the column grid and the row grid is identical to the corresponding element, filling the current grid of the neighbor grid with the digital code, and if not, filling the current grid with invalid points.
After obtaining the row grid and column grid, N is createdr*NcMesh G is initialized. Based on the pseudo-random digital matrix, the plurality of digital codes, and the initialization grid, a neighborhood grid between the plurality of arrow symbols is determined. And checking and filling grid by utilizing the M matrix and the row and column grids which are coded initially, and finally, except for invalid grids, enabling each grid to contain the coordinates of the central point and the corresponding digital codes.
An initial matching window having a window size of (k1+1) × (k2+1) between the initialization grid and the pseudo-random number matrix is determined. For the upper left corner of G grid (k)1+1)*(k2+1) the window is filled. First utilizes GrUpper left (k)1+1)*(k2+1) area to fill the G grid (k)1+1)*(k2+1) region where n is availablekK is1*k2Submatrix w1、w2...wnkThe matrix values are represented by a corresponding gridA digital code composition wherein nk=k1*k2. Find one (k) in the standard M matrix1+1)*(k2+1) window, so that n is within the windowkK is1*k2Sub-matrix m1、m2...mnkAnd w1、w2...wnkThe hamming distances of the windows are all 0.
When the numeric code of at least one of the column grid and the row grid is the same as the corresponding element, the current grid of the neighborhood grid is filled with the numeric code. If M array does not have the (k)1+1)*(k2+1) region, then G is usedcFor G grid (k)1+1)*(k2+1) area is modified until a satisfactory (k) is found in the standard M array1+1)*(k2+1) region. In this case (k) in the standard M array1+1)*(k2+1) Window Wm0I.e., the G-grid start window, as shown in fig. 5.
Based on the initial matching window, the neighborhood grid is row filled with the row grid by shifting the k1 x k2 window in the row direction by comparing whether the digital code and the element are identical. In particular, to realize front k1Filling of the rows at (k)1+1)*(k2+1) using k1*k2Windows k in M matrix and G grid1The inline sync begins to slide to the right. When sliding to unfilled columns (k)2+2 starting unfilled), with k1Value needs to utilize GrIs filled with the corresponding central point P (x, y) and the digital code S, and is corrected by the digital code at the corresponding position of the M matrix, and when the digital code does not meet the requirement, G is usedcAnd replacing the corresponding position center point P (x, y) and the digital code S, and then checking.
When the digital codes and corresponding elements of the column grid and the row grid are not the same, filling the current grid with invalid points. Specifically, if the requirement is still not met, invalid points are filled in the grid. k is a radical of1*k2The window slides to the right and fills column by column until the top k1 rows of the G grid each complete the center point P (x, y) and the digital code S fill and invalid grid marker.
Based on the initial matching window, the column filling of the neighborhood grid is performed with the column grid by shifting the k1 × k2 window in the column direction by comparing whether the digital code and the element are identical. In particular, to realize front k2Column filling in (k)1+1)*(k2+1) using k1*k2Window k in front of M matrix and G grid2The synchronization on the column starts sliding to the lower side. When sliding to unfilled rows (k)1+2 initially unfilled) with k2Value needs to utilize GcIs filled with the corresponding central point P (x, y) and the digital code S, and is corrected by the digital code at the corresponding position of the M matrix, and when the digital code does not meet the requirement, G is usedrAnd replacing the corresponding position center point P (x, y) and the digital code S, and then checking.
When the digital codes and corresponding elements of the column grid and the row grid are not the same, filling the current grid with invalid points. Specifically, if the requirements are still not met, invalid points are filled in the grid. k is a radical of1*k2The window slides downwards and is filled line by line until k is in front of G grid2Column each trellis completes the center point P (x, y) and the numeric code S padding and invalid trellis labeling.
An example of window slide fill with front k1 rows and front k2 columns is shown in FIG. 6.
In addition, the remaining area of the G grid is filled. The filling is similar to that described above.
And the polarity is shifted in the longitudinal direction or the transverse direction by taking the initial matching window as a starting point. Shifting a window k1 x k2 in the row direction, performing row filling of the neighborhood grid using the row grid by comparing whether the digital code is the same as the element, or shifting a window k1 x k2 in the column direction based on the initial matching window, performing column filling of the neighborhood grid using the column grid by comparing whether the digital code is the same as the element. By k1*k2Window in front of M matrix and G grid1+1 line starts sliding right when k1*k2The grid coordinate of the lower right corner of the window is (k)1+1,k2+2), the value needs to be filled, and G is selected in comparison with the same position number code of M matrixcAnd GrThe central point P (x, y) with the same middle number code is filled in the position, and if no corresponding point exists, an invalid point is filled. After the filling is finished, the filling k is continued to the right1The +1 row has the remaining points, one grid is filled with windows each time a slide is made. When k is1After the +1 lines are filled, the same filling operation is performed on each remaining line from top to bottom until the filling of the entire G grid is completed, an example of which is shown in fig. 7.
Based on the above algorithm, the grid correction algorithm based on the standard M matrix provided in the embodiment of the present invention performs multiple checks on the row and column grids obtained by decoding calculation using the M matrix encoded in advance. In addition, compared with the traditional symbol center point neighborhood positioning method, the method and the device have the advantages that the calculation amount is saved, the rapid demodulation is facilitated, and the correct neighborhood point is found when the large-deformation object is measured.
FIG. 8 is a schematic block diagram of a measurement system according to another embodiment of the present invention. The measurement system of fig. 8 includes:
a coding/decoding device 810;
a projection device 820, which irradiates a target object with a standard coded image coded by a coding and decoding device, wherein the standard coded image is coded by an arrow symbol set corresponding to a pseudo-random digital matrix, the number of elements of the pseudo-random digital matrix is the number of types of arrow symbols in the arrow symbol set, and a plurality of arrow symbols respectively point to a plurality of different directions of the elements on the same plane;
the acquisition device 830 acquires the deformed code image of the standard code image through the reflection of the target object;
and a coding and decoding device 810 for decoding the deformed encoded image using the pseudo-random number matrix to determine the three-dimensional feature of the target object, wherein the three-dimensional feature of the target object is sequentially decoded by shifting a window having a specific size in the encoded image.
The scheme of the embodiment of the invention adopts arrow symbol set coding, and because of a plurality of arrow symbols in the arrow symbol set, the coding with simple code and strong noise immunity is realized. In other words, in the gridding reconstruction process, the invention constructs a grid area with a specific size by using an algorithm, and introduces a standard M matrix to verify the row grid and the column grid generated in the early stage, fills the points meeting the requirements into the grid, marks invalid points, and verifies the whole algorithm for multiple times, thereby ensuring that the symbol center point constructs a correct neighborhood grid to the maximum extent.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned functional units and modules are illustrated as being divided, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to complete all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit, and the integrated unit may be implemented in the form of a hardware or a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the system, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described or recited in detail in a certain embodiment, reference may be made to the descriptions of other embodiments.
Those of ordinary skill in the art would appreciate that the elements and algorithm steps of the various embodiments described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when the actual implementation is performed, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of grid 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, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the method according to the embodiments of the present invention may also be implemented by instructing related hardware through a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, and software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the present invention, and are intended to be included within the scope thereof.

Claims (10)

1. A method of measurement, comprising:
illuminating a target object by adopting a standard coded image, wherein the standard coded image is coded by an arrow symbol set corresponding to a pseudo-random digital matrix, the number of elements of the pseudo-random digital matrix is the number of types of arrow symbols in the arrow symbol set, and a plurality of arrow symbols respectively point to a plurality of different directions of the elements on the same plane;
acquiring a deformation coding image of the standard coding image through reflection of the target object;
decoding the morphed encoded image using the pseudo-random digital matrix to determine three-dimensional features of the target object, wherein the sequential decoding is by translating a window of a particular size in the encoded image.
2. The measurement method according to claim 1, wherein the number of primitives is п/2 degrees between two adjacent directions of 4 directions pointed to by 4, 4 arrow symbols, and wherein decoding the warped encoded image using the pseudo-random number matrix comprises:
extracting a plurality of contours in which the arrow symbols are respectively located;
determining a plurality of circumscribed rectangles for the plurality of outlines respectively, so that the plurality of arrow symbols are contained in the plurality of circumscribed rectangles respectively;
determining four corner points with highest scores in each circumscribed rectangle in the plurality of circumscribed rectangles;
for each specific rectangle, selecting a target corner point of the four corner points as a central point of an arrow symbol contained in the circumscribed rectangle, wherein an abscissa of the target corner point is smaller than a maximum abscissa of the four corner points and larger than a minimum abscissa of the four corner points, and a ordinate of the target corner point is smaller than a maximum ordinate of the four corner points and larger than a minimum ordinate of the four corner points;
decoding the warped encoded image using the pseudo-random digital matrix based on the respective center point positions.
3. The measurement method according to claim 2, wherein said decoding the warped encoded image using the pseudo-random number matrix based on the respective center point positions comprises:
determining a plurality of digital codes respectively corresponding to the arrow symbols based on the respective central point positions of the arrow symbols;
determining an initialization grid based on the respective center point positions of the arrow symbols;
determining a neighborhood grid among the plurality of arrow symbols based on the pseudo-random digital matrix, the plurality of digital codes, and the initialization grid.
4. The measurement method according to claim 3, wherein the determining a plurality of digital codes respectively corresponding to the plurality of arrow symbols based on the respective center point positions of the plurality of arrow symbols comprises:
extracting a specific rectangle from each external rectangle, and dividing the rectangle into four quadrants;
for each specific rectangle, determining the direction indicated by the arrow symbol in the circumscribed rectangle by counting the number of pixels in each quadrant, which are the same as the gray scale of the outline;
and determining the number corresponding to the direction indicated by the arrow symbol in the circumscribed rectangle as the digital code corresponding to the arrow symbol.
5. The measurement method according to claim 3, wherein determining an initialization grid based on the respective center point positions of the plurality of arrow symbols comprises:
determining a grid initial point based on the respective central point positions and the original point of the deformation coding image by utilizing a Euclidean relation;
determining a reference row spacing and a reference column spacing based on the grid initial point and the respective center point positions of the plurality of arrow symbols;
determining a row grid and a column grid based on the grid initiation point, the reference row spacing, and the reference column spacing, wherein the row grid and the column grid form the initialization grid.
6. The measurement method of claim 5, wherein determining a row grid and a column grid based on the grid initiation point, the reference row spacing, and the reference column spacing comprises:
determining a first column point vector through iterative computation, wherein a next point of the first column point vector is determined based on the initial grid point and a current line spacing, and the current line spacing is obtained by weighting an upper line spacing and the reference line spacing based on a first weight;
determining a head line point vector through iterative computation, wherein a next point of the head line point vector is determined based on the initial grid point and a current column distance, and the current column distance is obtained by weighting a previous column distance and the average column distance based on a second weight;
determining the column grid and the row grid based on the leading column point vector and the leading row point vector, respectively.
7. The measurement method according to any one of claims 3-6, wherein determining a neighborhood grid among the plurality of arrow symbols based on the pseudo-random number matrix, the plurality of digital codes, and the initialization grid comprises:
determining a window size (k) between the initialization grid and the pseudo-random digital matrix1+1)*(k2+1) such that each digital code of an arrow symbol of the initialization grid in the initial matching window is identical to a corresponding element of the pseudo random digital matrix in the initial matching window, where k is1,k2Is a positive integer;
moving k in the row direction based on the initial matching window1*k2A window for performing line filling of the neighborhood grid by using the line grid by comparing whether the digital code and the element are the same or not, or
Moving k in the column direction based on the initial matching window1*k2A window for performing column filling of the neighborhood grid using the column grid by comparing whether the numeric code and the element are identical,
and when the numerical code of at least one of the column grid and the row grid is the same as the corresponding element, filling the current grid of the neighborhood grid with the numerical code, and if the numerical code is not the same, filling invalid points into the current grid.
8. A measurement system, comprising:
a coding and decoding device;
the projection device is used for irradiating a target object by adopting a standard coded image coded by the coding and decoding device, the standard coded image is coded by an arrow symbol set corresponding to a pseudo-random digital matrix, the number of elements of the pseudo-random digital matrix is the number of types of arrow symbols in the arrow symbol set, and a plurality of arrow symbols respectively point to a plurality of different directions of the elements on the same plane;
the acquisition device acquires a deformation coding image of the standard coding image through reflection of the target object;
the encoding and decoding device decodes the deformed encoded image using the pseudo-random digital matrix to determine the three-dimensional feature of the target object, wherein the three-dimensional feature of the target object is sequentially decoded by shifting a window having a specific size in the encoded image.
9. The system according to claim 1, wherein the number of primitives is п/2 angle between two adjacent directions of 4 directions pointed by 4, 4 arrow symbols, and wherein the codec device is specifically configured to:
extracting a plurality of contours in which the arrow symbols are respectively located;
determining a plurality of circumscribed rectangles for the plurality of outlines respectively, so that the plurality of arrow symbols are contained in the plurality of circumscribed rectangles respectively;
determining four corner points with highest scores in each circumscribed rectangle in the plurality of circumscribed rectangles;
for each specific rectangle, selecting a target corner point of the four corner points as a central point of an arrow symbol contained in the circumscribed rectangle, wherein an abscissa of the target corner point is smaller than a maximum abscissa of the four corner points and larger than a minimum abscissa of the four corner points, and a ordinate of the target corner point is smaller than a maximum ordinate of the four corner points and larger than a minimum ordinate of the four corner points;
decoding the warped encoded image using the pseudo-random digital matrix based on the respective center point positions.
10. The system according to claim 9, wherein the codec device is specifically configured to:
determining a plurality of digital codes respectively corresponding to the arrow symbols based on the respective central point positions of the arrow symbols;
determining an initialization grid based on the respective center point positions of the arrow symbols;
determining a neighborhood grid among the plurality of arrow symbols based on the pseudo-random digital matrix, the plurality of digital codes, and the initialization grid.
CN202010084272.XA 2020-02-10 2020-02-10 Measurement method and system Active CN111340957B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010084272.XA CN111340957B (en) 2020-02-10 2020-02-10 Measurement method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010084272.XA CN111340957B (en) 2020-02-10 2020-02-10 Measurement method and system

Publications (2)

Publication Number Publication Date
CN111340957A true CN111340957A (en) 2020-06-26
CN111340957B CN111340957B (en) 2023-07-14

Family

ID=71183571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010084272.XA Active CN111340957B (en) 2020-02-10 2020-02-10 Measurement method and system

Country Status (1)

Country Link
CN (1) CN111340957B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833405A (en) * 2020-07-27 2020-10-27 北京大华旺达科技有限公司 Calibration identification method and device based on machine vision

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030210803A1 (en) * 2002-03-29 2003-11-13 Canon Kabushiki Kaisha Image processing apparatus and method
CN103047943A (en) * 2012-12-31 2013-04-17 吉林大学 Method for detecting vehicle door outer plate shape and size based on single-projection encoding structured light
CN103727877A (en) * 2013-12-20 2014-04-16 北京农业信息技术研究中心 Fruit identifying and locating method, device and system
CN104457607A (en) * 2014-12-10 2015-03-25 东北大学 Depth-measurement-oriented sand clock code structure optical encoding and decoding methods
CN106225719A (en) * 2016-08-04 2016-12-14 西安交通大学 A kind of generation method and device of character array structure light coding pattern

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030210803A1 (en) * 2002-03-29 2003-11-13 Canon Kabushiki Kaisha Image processing apparatus and method
CN103047943A (en) * 2012-12-31 2013-04-17 吉林大学 Method for detecting vehicle door outer plate shape and size based on single-projection encoding structured light
CN103727877A (en) * 2013-12-20 2014-04-16 北京农业信息技术研究中心 Fruit identifying and locating method, device and system
CN104457607A (en) * 2014-12-10 2015-03-25 东北大学 Depth-measurement-oriented sand clock code structure optical encoding and decoding methods
CN106225719A (en) * 2016-08-04 2016-12-14 西安交通大学 A kind of generation method and device of character array structure light coding pattern

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高海红: "基于编码结构光的深度测量方法研究与实现" *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833405A (en) * 2020-07-27 2020-10-27 北京大华旺达科技有限公司 Calibration identification method and device based on machine vision
CN111833405B (en) * 2020-07-27 2023-12-08 北京大华旺达科技有限公司 Calibration and identification method and device based on machine vision

Also Published As

Publication number Publication date
CN111340957B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
US8805057B2 (en) Method and system for generating structured light with spatio-temporal patterns for 3D scene reconstruction
CN111291584B (en) Method and system for identifying two-dimensional code position
CN108122254B (en) Three-dimensional image reconstruction method and device based on structured light and storage medium
US9769454B2 (en) Method for generating a depth map, related system and computer program product
WO2017023210A1 (en) Generating a merged, fused three-dimensional point cloud based on captured images of a scene
CN107346041B (en) Method and device for determining grating parameters of naked eye 3D display equipment and electronic equipment
CN110686599A (en) Three-dimensional measurement method, system and device based on colored Gray code structured light
WO2020119467A1 (en) High-precision dense depth image generation method and device
WO2007052191A2 (en) Filling in depth results
US10574947B2 (en) Object reconstruction in disparity maps using displaced shadow outlines
CN107346040B (en) Method and device for determining grating parameters of naked eye 3D display equipment and electronic equipment
CN111047650A (en) Parameter calibration method for time-of-flight camera
CN108895979B (en) Line segment coded structured light depth acquisition method
CN109064536B (en) Page three-dimensional reconstruction method based on binocular structured light
CN112991517B (en) Three-dimensional reconstruction method for texture image coding and decoding automatic matching
CN111340957B (en) Measurement method and system
US8472756B2 (en) Method for producing high resolution image
CN111336949B (en) Space coding structured light three-dimensional scanning method and system
CN115345994A (en) Three-dimensional reconstruction method, device and system
CN111783877B (en) Depth information measurement method based on single-frame grid composite coding template structured light
Liang et al. A structured light encoding method for M-array technique
CN110926370B (en) Measurement method and system
CN107515844A (en) Font method to set up, device and mobile device
Jia et al. One-shot m-array pattern based on coded structured light for three-dimensional object reconstruction
CN112991516A (en) Texture coding image generation method for three-dimensional reconstruction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant