CN113358065A - Three-dimensional measurement method based on binary coding and electronic equipment - Google Patents

Three-dimensional measurement method based on binary coding and electronic equipment Download PDF

Info

Publication number
CN113358065A
CN113358065A CN202110707611.XA CN202110707611A CN113358065A CN 113358065 A CN113358065 A CN 113358065A CN 202110707611 A CN202110707611 A CN 202110707611A CN 113358065 A CN113358065 A CN 113358065A
Authority
CN
China
Prior art keywords
error
species
coding
phase
binary
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
CN202110707611.XA
Other languages
Chinese (zh)
Other versions
CN113358065B (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.)
Sichuan University
Original Assignee
Sichuan University
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 Sichuan University filed Critical Sichuan University
Priority to CN202110707611.XA priority Critical patent/CN113358065B/en
Publication of CN113358065A publication Critical patent/CN113358065A/en
Application granted granted Critical
Publication of CN113358065B publication Critical patent/CN113358065B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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é

Abstract

The invention relates to the field of three-dimensional measurement, in particular to a three-dimensional measurement method based on binary coding and electronic equipment. The method carries out binary coding on the sinusoidal fringe image through an error diffusion algorithm, improves the sine of a projected image, adopts out-of-focus projection coding fringe group, and finally processes the fringe image reflected by the object to be detected to obtain the three-dimensional data of the object to be detected. Because the projection image adopts binary coding, only two gray values of 0-1 are provided, the nonlinear influence of a digital projector is avoided, and the high-speed high-precision three-dimensional surface shape measurement is realized under the limit of limited frame frequency (120 Hz).

Description

Three-dimensional measurement method based on binary coding and electronic equipment
Technical Field
The invention relates to the field of three-dimensional measurement, in particular to a three-dimensional measurement method based on binary coding and electronic equipment.
Background
The acquisition of three-dimensional information of an object has important practical significance, wherein Phase Measurement Profilometry (PMP) has the advantages of simple structure, non-contact, low cost, high precision, high measurement speed and the like, and has wide application prospects in the fields of industrial quality online detection, cultural relic protection and the like.
The phase shift profilometry is mapped into object space information by analyzing fringe phase information, and is divided into two categories, namely a time phase expansion method and a space phase expansion method according to different absolute phase acquisition modes. The space phase expansion method expands the phase according to the space information, the quality of the phase expansion result is related to the selection of the starting point, the expansion path and the like, and if an error expansion point occurs, the subsequent expansion is in error. The time phase expansion method gradually expands the absolute phase by projecting a plurality of frequency stripes, and each pixel position phase value is related to a plurality of frequency corresponding position phase values and is not related to a space adjacent pixel position. Whether the time phase expansion or the space phase expansion is carried out, a light field with a sine stripe structure needs to be projected, then stripes subjected to surface modulation deformation of an object are captured, and three-dimensional data of the object are analyzed from phase information of deformation stripe images. Wherein the sine of the projection structure light field has decisive influence on the phase extraction precision, and further influences the measurement precision.
The commercial digital projector is adopted to project the binary fringe pattern, the high-speed binary pattern switching capacity of the DMD can be fully utilized to realize high-speed and flexible light field projection, and the detection efficiency is improved, so that the digital projection system is widely used. The method has the specific advantages that the digital projection can realize zero-error phase shift; the defocused projection binary image replaces the projection eight-bit sinogram in the traditional phase shift profilometry, and the measurement speed is greatly improved under the limit of limited frame frequency (120 Hz); the binary image is input into the binary image, so that the influence of the nonlinearity of the projector on the sine of the stripes is avoided. However, the binary encoding process inevitably introduces high frequency components, which affect the accuracy of the phase analysis and thus the accuracy of the final profile detection. Generally, defocusing projection is adopted to filter out high-frequency components, and an approximate ideal sinusoidal light field is obtained in a mode of sacrificing depth of field. At present, the two-value coding modes applied to time phase unwrapped stripe acquisition mainly comprise a pulse width modulation method and a dithering method, the pulse width modulation method is optimized under a one-dimensional scale, and the effect is not ideal when the stripe period is too large. The dithering method comprises random dithering, ordered dithering, error diffusion and the like, and compared with other algorithms, the error diffusion distributes and spreads the residual error in the image threshold process, the precision can be obviously improved when the fringe period is large, but when the fringe period is small, the single-period encodable pixel value is less, and the phase error is still large.
However, the binary coding method in the existing three-dimensional measurement method has the following problems: estimating an optical transfer function through an empirical value, designing a diffusion kernel which is universal for all fringe periods, and when the empirical value deviates from the optical characteristic of an actual projection system, hardly obtaining a high-sine light field; the encoding optimization is not carried out aiming at all the light field fringe periods in the phase analysis process, and the final phase analysis precision and reliability are difficult to guarantee.
Disclosure of Invention
The invention aims to solve the problems of small universality and poor phase analysis precision and reliability of a binary coding method in the conventional three-dimensional measuring method, and provides a three-dimensional measuring method based on binary coding and electronic equipment.
In order to achieve the above purpose, the invention provides the following technical scheme:
a three-dimensional measurement method based on binary coding comprises the following steps:
s1: carrying out binary coding on the sinusoidal fringe image through an error diffusion algorithm to obtain a coding fringe group;
s2: the coding stripe group is projected to the surface of an object to be detected in an out-of-focus mode, and a stripe image reflected by the surface of the object to be detected is collected;
s3: and calculating the truncation phase of the fringe image, unfolding the truncation phase into an absolute phase, and mapping the absolute phase into the three-dimensional data of the object to be detected by adopting a phase mapping method. The invention carries out binary coding on the sinusoidal fringe image through the optimized error diffusion core, improves the sine property of the projected image, and adopts the defocused projection coding fringe group, and because the projected image adopts binary coding, only has two gray values of 0-1, is not influenced by the nonlinearity of a digital projector, and realizes high-speed and high-precision three-dimensional surface shape measurement under the limit of limited frame frequency (120 Hz).
As a preferred embodiment of the present invention, the formula of the error diffusion algorithm in step S1 is as follows:
Figure BDA0003131972470000031
wherein, IbFor encoding groups of stripes, I is a sinusoidal stripe image, InewAs an error diffusion process diagram, InewInitial value is I, e is thresholded quantization errorThe difference, h is the error diffusion kernel, (i, j), (x, y) are the corresponding pixel coordinates, and s is the error diffusion range.
As a preferred embodiment of the present invention, the error diffusion kernel in step S1 is optimized by using a genetic algorithm, including the following steps:
s01: and randomly generating an initial generation population of X species to obtain species information of the X species. The species are sine stripe images generated randomly, each species has c genes, each code word has a length L, sequentially corresponds to c to-be-optimized coefficients of the error diffusion kernel, and can be converted into the error diffusion kernel after proportional normalization;
s02: converting the species into an error diffusion kernel, carrying out binary coding to obtain a sine stripe group (more than or equal to 3 groups of stripes), and carrying out weighted summation on the species error of each stripe period to obtain a total species error;
s03: arranging the total errors of the species in a reverse order, endowing different weight values to the corresponding species, and selecting a hybridization target by adopting a roulette strategy;
s04: randomly selecting a hybridization point, and hybridizing species information of the two populations according to the hybridization probability;
s05: randomly selecting mutation points for gene mutation of the hybridized population according to the mutation probability to generate a next generation error diffusion coefficient;
s06: updating the minimum total error of the species and the corresponding species information, and entering step S07 when the iteration number reaches a preset number; when the iteration times are less than the preset times, returning to the step S02;
s07: and acquiring the species corresponding to the minimum species error, converting and outputting the species as an error diffusion kernel. The invention optimizes the error diffusion kernel through a genetic algorithm, comprehensively considers all light field fringe period fringe coding errors in the phase analysis process, obtains a binary fringe group with the whole species error lower than that coded by the traditional error diffusion method, and effectively improves the measurement precision.
As a preferred embodiment of the present invention, the calculation function of the total error of the species in the step S02 is:
Figure BDA0003131972470000041
wherein E isallTo optimize the objective, βTIs a weight value, ETIs the species error for the fringe of period T. The optimization result of the invention is easy to reuse. Because the optimization result is suitable for the specific fringe frequency group in the phase analysis process, the fringe frequency group formed by the same fringe period can be directly encoded by using the existing optimization result, and the method is convenient and quick and is not influenced by the change of the image resolution.
As a preferred embodiment of the present invention, the species error calculation in step S02 includes the following steps:
s021: calculating the phase error EpAnd intensity error Ei
S022: according to the phase error EpAnd the intensity error EiCalculating the species error ET. The optimization target comprises the phase error and the intensity error, and the method has robustness to the change of the defocusing degree while meeting the requirement of reducing the phase error target.
As a preferred embodiment of the present invention, the phase error EpAnd the intensity error EiThe calculation formula of (a) is respectively:
Figure BDA0003131972470000051
wherein rows × cols is the size of the sine stripe image I, and rows and cols are the number of pixels in the longitudinal direction and the number of pixels in the transverse direction of the image respectively, phisbFor said coding stripe group IbThe spread continuous phase in the truncated phase of (a),
Figure BDA0003131972470000053
is the convolution operator.
As a preferred embodiment of the present invention, the species error E in the step S022TThe calculation formula of (A) is as follows:
Figure BDA0003131972470000052
wherein y belongs to (0,1), k is the size of Gaussian window, ImIs the maximum gray value of the image.
In a preferred embodiment of the present invention, the step S02 uses an "S" type diffusion path to perform binary encoding.
As a preferable embodiment of the present invention, the out-of-focus degree of the out-of-focus projection in step S2 is obtained by substituting the fringe boundary gray difference before and after out-of-focus into a one-dimensional gaussian fuzzy model solution. The invention optimizes the defocusing degree aiming at the optical characteristics of the actual projection system, thereby generating a high-sine light field and further effectively improving the measurement precision.
An electronic device comprising at least one processor, and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any of the methods described above.
Compared with the prior art, the invention has the beneficial effects that:
1. the method carries out binary coding on the sinusoidal fringe image through an error diffusion algorithm, improves the sine of the projected image, and adopts the defocused projection coding fringe group, and because the projected image adopts binary coding, only has two gray values of 0-1, is not influenced by the nonlinearity of a digital projector, and realizes high-speed and high-precision three-dimensional surface shape measurement under the limit of limited frame frequency (120 Hz).
2. The invention optimizes the error diffusion kernel through a genetic algorithm, comprehensively considers all light field fringe period fringe coding errors in the phase analysis process, obtains a binary fringe group with the whole species error lower than that coded by the traditional error diffusion method, and effectively improves the measurement precision.
3. The optimization result of the invention is easy to reuse. Because the optimization result is suitable for the specific fringe frequency group in the phase analysis process, the fringe frequency group formed by the same fringe period can be directly encoded by using the existing optimization result, and the method is convenient and quick and is not influenced by the change of the image resolution.
4. The optimization target comprises the phase error and the intensity error, and the method has robustness to the change of the defocusing degree while meeting the requirement of reducing the phase error target.
5. The invention optimizes the defocusing degree aiming at the optical characteristics of the actual projection system, thereby generating a high-sine light field and further effectively improving the measurement precision.
Drawings
Fig. 1 is a schematic flowchart of a binary coding-based three-dimensional measurement method according to embodiment 1 of the present invention;
fig. 2 is a schematic diagram of a two-dimensional error diffusion application principle in a three-dimensional measurement method based on binary coding according to embodiment 1 of the present invention;
fig. 3 is a schematic diagram of a two-dimensional error diffusion coding in a three-dimensional measurement method based on binary coding according to embodiment 1 of the present invention;
fig. 4 is a schematic diagram of a time phase unwrapping process in a binary coding-based three-dimensional measurement method according to embodiment 1 of the present invention;
FIG. 5 is a flowchart of a genetic algorithm optimized error diffusion kernel in the three-dimensional measurement method based on binary coding according to embodiment 1 of the present invention;
fig. 6 is a structural diagram of a phase measurement profilometry system used in a three-dimensional measurement method based on binary coding according to embodiment 2 of the present invention;
fig. 7 is an example of optimizing a diffusion kernel in a binary coding-based three-dimensional measurement method according to embodiment 2 of the present invention, and coding a set of three-frequency four-step standard sinusoidal fringe patterns into 12 binary fringe patterns;
fig. 8 is an example of a time phase unwrapping result in a three-dimensional measurement method based on binary coding according to embodiment 2 of the present invention;
fig. 9 is a diagram of a result of a real object measurement in a binary-coding-based three-dimensional measurement method according to embodiment 2 of the present invention;
fig. 10 is an electronic device according to embodiment 3 of the present invention, which utilizes the binary coding-based three-dimensional measurement method according to embodiment 1;
the labels in the figure are: 101-imaging system, 102-digital projector, 103-reference plane, 104-object to be measured, 105-computer.
Detailed Description
The present invention will be described in further detail with reference to test examples and specific embodiments. It should be understood that the scope of the above-described subject matter is not limited to the following examples, and any techniques implemented based on the disclosure of the present invention are within the scope of the present invention.
Example 1
As shown in fig. 1, a three-dimensional measurement method based on binary coding includes the following steps:
s1: and carrying out binary coding on the sinusoidal fringe image through an error diffusion algorithm to obtain a coding fringe group, wherein the coding fringe group meets the requirement of a time phase unwrapping algorithm. The error diffusion algorithm binary coding process mainly comprises two parts of threshold quantization and quantization error diffusion. The mechanism of action of error diffusion is shown in fig. 2, and the error diffusion coding rule adopted by the present invention is shown in fig. 3. Wherein (a) in fig. 2 and 3 is an eight-bit sine stripe diagram, and the mathematical expression is:
Figure BDA0003131972470000081
the gray level distribution range of the eight-bit sine stripe pattern is 0-1;
the formula of the error diffusion algorithm is as follows, generating a fringe pattern with only two values, 0 and 1. :
Figure BDA0003131972470000082
wherein, InIs a sine stripe with N steps,
Figure BDA0003131972470000083
in order to truncate the phase position,
Figure BDA0003131972470000084
Ibfor encoding groups of stripes, I is a sinusoidal stripe image, InewAs an error diffusion process diagram, InewThe initial value is I, e is the thresholded quantization error, h is the error diffusion kernel, (I, j), (x, y) are the corresponding pixel coordinates, and s is the error diffusion range.
Let the error diffusion kernel to be optimized be hoptimizedAnd then:
Figure BDA0003131972470000085
wherein alpha isi(i ═ 1,2,3,4) respectively denote error weight coefficients assigned to the neighborhood pixels, -, respectively the processed pixel and the pixel being processed.
S2: the coding stripe group is projected to the surface of an object to be measured in a defocusing mode, and a camera collects stripe images which are modulated and deformed by the surface of the object;
s3: and calculating the truncation phase of the fringe image, and unfolding the truncation phase into an absolute phase by a time phase expansion method. As shown in fig. 4, which shows the multi-frequency heterodyne method expansion principle, two adjacent periodic stripes are synthesized to obtain a new stripe with a period greater than the original period, and two new stripe patterns are obtained and repeatedly synthesized once to obtain a stripe pattern with a period greater than the image width, so as to obtain an absolute phase. And then mapping the phase information into object three-dimensional data according to a corresponding rule (such as a phase height mapping method).
Wherein, the error diffusion kernel is optimized by adopting a genetic algorithm, as shown in fig. 5, comprising the following steps:
s01: and (5) initializing a population. And randomly generating an initial generation population of X species to obtain species information of the X species. The species are sine stripe images generated randomly, each species has 4 genes, each gene code word is 6 in length, and the species sequentially correspond to 4 to-be-optimized coefficients of an error diffusion kernel; and a diffusion core of a Floyd-Steinberg diffusion dithering algorithm is reserved during initialization, so that the occurrence of integral quality deviation of random species is prevented.
S02: and (4) error calculation. And converting the species into corresponding error diffusion kernels, acquiring a sine stripe group by adopting an S-shaped diffusion path binary coding, eliminating the accumulation of errors in the direction of a coding path, and calculating the total error of the species.
Wherein the calculated function of the total error of the species is:
Figure BDA0003131972470000091
wherein E isallTo optimize the objective, βTIs a weight value, ETIs the species error for the fringe of period T.
The species error calculation comprises the following steps:
s021: calculating the phase error E according topAnd intensity error Ei
Figure BDA0003131972470000101
Wherein rows × cols is the size of the sine stripe image I, and rows and cols are the number of pixels in the longitudinal direction and the number of pixels in the transverse direction of the image respectively, phisbFor said coding stripe group IbThe spread continuous phase in the truncated phase of (a),
Figure BDA0003131972470000102
is the convolution operator.
S022: calculating the species error according to the formula:
Figure BDA0003131972470000103
wherein y belongs to (0,1), k is the size of Gaussian window, ImIs the maximum gray value of the image.
S03: and (4) selecting species. And (3) carrying out reverse order arrangement on the total errors of the species, endowing different weight values to the corresponding species, and selecting a hybridization target by adopting a roulette game strategy.
S04: and (4) hybridizing. And randomly selecting a hybridization point, and hybridizing species information of the two populations according to the hybridization probability.
S05: and (4) mutation. And randomly selecting mutation points for gene mutation of the hybridized population according to the mutation probability to generate a next generation error diffusion coefficient.
S06: and (6) iteration. Updating the minimum total species error and the corresponding species information, and entering step S07 when the iteration times reach the preset times; and when the iteration number is smaller than the preset number, returning to the step S02 (in the step, the optimization time consumption needs to be considered, and a convergence experiment is set to determine the iteration number).
S07: and (5) generating an image. And acquiring the species corresponding to the minimum species error, converting and outputting the species as an error diffusion kernel.
Example 2
The present embodiment is an embodiment of applying the binary-coding-based three-dimensional measurement method described in embodiment 1 to Phase Measurement Profilometry (PMP) of a time phase unwrapping method, and the present invention is not limited to the contents mentioned in the embodiments.
The system structure of the phase profilometry is shown in fig. 6. When the binary coded fringes with the period p generated by the computer 105 are projected out of focus by the digital projector 102 onto the surface of the object 104 to be measured placed on the reference plane 103, the deformed fringes received by the imaging system 101 can be expressed as:
Figure BDA0003131972470000111
where C (x, y) represents the background gray scale and D (x, y)/C (x, y) is the fringe contrast. The phase function phi (x, y) contains information Z of the height of the object surface 104 h (x, y). By projecting N sinusoidal fringes (N >2), each time phase shifted by 1/N fringe periods, φ (x, y) can be solved independently of C (x, y) and D (x, y) with a discrete phase shift algorithm:
Figure BDA0003131972470000112
the calculated phase distribution phi (x, y) is truncated within its range of principal values due to the nature of the inverse trigonometric operation. In order to obtain the height distribution of the object, phase unwrapping is necessary to obtain a continuous absolute phase distribution. In the example, a three-frequency four-step method is adopted to obtain absolute phase, wherein a step-by-step time phase expansion method is adopted to expand truncated phase, the resolution of the projector is 1024pixels × 768pixels, the corresponding fringe periods p are 1024pixels, 128pixels and 16pixels respectively, the phase error and intensity error distribution function y is-0.002072T +0.022782k +0.720739, the number of times of iteration is set to 40, and an error diffusion kernel is optimized by using a genetic algorithm:
s01: and (5) initializing a population. And randomly generating 64 primary generation populations, wherein each species consists of four genes, the four species correspond to 4 to-be-optimized coefficients in a diffusion core, and the code word length of each gene is 6.
S02: and (4) error calculation. And each species is converted into a corresponding error diffusion kernel, and an S-shaped diffusion path binary coding sinusoidal image group is adopted to eliminate error accumulation in a certain direction to a certain extent. And calculating the total error of the species to obtain three periodic fringe error weights which are in inverse proportion to the periods of the three periodic fringe error weights, wherein the weights are 16/1168, 128/1168 and 1024/1168 in sequence.
S03: and (4) selecting species. The species are given different weights according to the reverse order of the species error, and a roulette-to-betting strategy is used to select the hybrid targets.
S04: and (4) hybridizing. Randomly selecting a hybridization point, and hybridizing the corresponding genes of the two species according to the hybridization probability. The optimal individual information in each generation has been preserved, and in order to enrich the population generated, the hybridization probability is 100%.
S05: and (4) mutation. And randomly selecting mutation points for gene mutation according to the mutation probability of 0.3 percent by the hybridized species, and generating the next generation error diffusion coefficient.
S06: and (6) iteration. And updating the current minimum species total error and the corresponding species information, jumping to S07 for more than 40 iterations, and returning to S02 otherwise.
S07: and (5) generating an image. And converting the species corresponding to the total error of the recorded minimum species into an error diffusion kernel, and generating an encoding stripe group for the sinusoidal image with any size.
As shown in fig. 7, given a diffusion kernel optimized under the present invention, a set of three-frequency four-step standard sinusoidal fringe patterns is encoded into 12 binary fringe pattern examples, 1 is a 1024-pixel standard sinusoidal fringe pattern for fringe period, 2 is a 128-pixel standard sinusoidal fringe pattern for fringe period, 3 is a 16-pixel standard sinusoidal fringe pattern for fringe period, and 4, 5, and 6 are corresponding encoded fringe sets.
And performing out-of-focus projection on the generated coding fringe group, generating a high-sine light field by using the optical characteristics of a projection system, capturing a deformed fringe pattern, expanding the deformed fringe pattern into an absolute phase by adopting a step-by-step expansion method in time phase expansion, and calculating the three-dimensional information of the object by using a phase-height mapping method to finish object measurement. The step-by-step expansion method determines the high-frequency phase level by using the low-frequency phase, and the higher-frequency phase is expanded in an auxiliary mode by using the period-by-period level.
In this example, the final error result is analyzed by simulation, the truncated phase of each fringe period of the encoded fringe group and the encoded image by the Floyd-Steinberg method of the present invention is shown as 1 and 4 in FIG. 8, the unwrapped absolute phase is shown as 2 and 5 in FIG. 8, the restored three-dimensional surface shape is shown as 3 and 6 in FIG. 8, the final phase error is 0.0054rad, and the unwrapped phase error is 0.0653rad using the Floyd-Steinberg encoded image.
This example was conducted in a three-dimensional measurement experiment of an object under the phase profilometry system configuration of fig. 6, using the encoded fringe set of fig. 7, acquiring images (only the minimum fringe period is given), with the truncated phase for each fringe period as shown at 1 and 2 in fig. 9, and recovering the three-dimensional profile as shown at 3 in fig. 9.
Example 3
As shown in fig. 10, an electronic device includes at least one processor, and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a binary-coding based three-dimensional measurement method as described in the previous embodiments. The input and output interface can comprise a display, a keyboard, a mouse and a USB interface and is used for inputting and outputting data; the power supply is used for supplying electric energy to the electronic equipment.
Those skilled in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium comprises the steps of: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
When the integrated unit of the present invention is implemented in the form of a software functional unit and sold or used as a separate product, it may also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium comprises the steps of: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A three-dimensional measurement method based on binary coding is characterized by comprising the following steps:
s1: carrying out binary coding on the sinusoidal fringe image through an error diffusion algorithm to obtain a coding fringe group;
s2: the coding stripe group is projected to the surface of an object to be detected in an out-of-focus mode, and a stripe image reflected by the surface of the object to be detected is collected;
s3: and calculating the truncation phase of the fringe image, unfolding the truncation phase into an absolute phase, and mapping the absolute phase into the three-dimensional data of the object to be detected by adopting a phase mapping method.
2. The binary coding-based three-dimensional measurement method according to claim 1, wherein the error diffusion algorithm has the following formula:
Figure FDA0003131972460000011
wherein, IbFor encoding groups of stripes, I is a sinusoidal stripe image, InewAs an error diffusion process diagram, InewThe initial value is I, e is the thresholded quantization error, h is the error diffusion kernel, (I, j), (x, y) are the corresponding pixel coordinates, and s is the error diffusion range.
3. The binary coding-based three-dimensional measurement method according to claim 2, wherein the error diffusion kernel is optimized by using a genetic algorithm, and the method comprises the following steps:
s01: randomly generating an initial generation population of X species to obtain species information of the X species; the species is a randomly generated sinusoidal fringe image;
s02: converting the species into an error diffusion kernel, performing binary coding to obtain a sine stripe group, and performing weighted summation on the species error of each stripe period to obtain a total species error; the sine stripe group is more than or equal to 3 groups of stripes;
s03: arranging the total errors of the species in a reverse order, endowing different weight values to the corresponding species, and selecting a hybridization target by adopting a roulette strategy;
s04: randomly selecting a hybridization point, and hybridizing species information of the two populations according to the hybridization probability;
s05: randomly selecting mutation points for gene mutation of the hybridized population according to the mutation probability to generate a next generation error diffusion coefficient;
s06: updating the minimum total error of the species and the corresponding species information, and entering step S07 when the iteration number reaches a preset number; when the iteration times are less than the preset times, returning to the step S02;
s07: and acquiring the species corresponding to the minimum species error, converting and outputting the species as an error diffusion kernel.
4. The binary-coding-based three-dimensional measurement method according to claim 3, wherein the calculation function of the total species error in the step S02 is as follows:
Figure FDA0003131972460000021
wherein E isallTo optimize the objective, βTIs a weight value, ETIs the species error for the fringe of period T.
5. The binary-coding-based three-dimensional measurement method according to claim 4, wherein the species error E in the step S02TThe calculation comprises the following steps:
s021: calculating the phase error EpAnd intensity error Ei
S022: according to the phase error EpAnd the intensity error EiCalculating the species error ET
6. The binary-coding-based three-dimensional measurement method according to claim 5, wherein the phase error E ispAnd the intensity error EiThe calculation formula of (a) is respectively:
Figure FDA0003131972460000022
wherein rows × cols is the size of the sine stripe image I, and rows, cols are the number of longitudinal pixels and the number of transverse pixels of the sine stripe image phi respectivelysbFor said coding stripe group IbThe spread continuous phase in the truncated phase of (a),
Figure FDA0003131972460000031
is the convolution operator.
7. The binary-coding-based three-dimensional measurement method according to claim 6, wherein the species error E022TThe calculation formula of (A) is as follows:
Figure FDA0003131972460000032
wherein y belongs to (0,1), k is the size of Gaussian window, ImIs the maximum gray value of the image.
8. The binary-coding-based three-dimensional measurement method according to claim 3, wherein the step S02 adopts an "S" -type diffusion path for binary coding.
9. The binary-coding-based three-dimensional measurement method according to claim 1, wherein the out-of-focus degree of the out-of-focus projection in step S2 is obtained by substituting the fringe boundary gray difference before and after out-of-focus into a one-dimensional gaussian fuzzy model solution.
10. An electronic device comprising at least one processor, and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 9.
CN202110707611.XA 2021-06-24 2021-06-24 Three-dimensional measurement method based on binary coding and electronic equipment Active CN113358065B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110707611.XA CN113358065B (en) 2021-06-24 2021-06-24 Three-dimensional measurement method based on binary coding and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110707611.XA CN113358065B (en) 2021-06-24 2021-06-24 Three-dimensional measurement method based on binary coding and electronic equipment

Publications (2)

Publication Number Publication Date
CN113358065A true CN113358065A (en) 2021-09-07
CN113358065B CN113358065B (en) 2022-11-15

Family

ID=77536313

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110707611.XA Active CN113358065B (en) 2021-06-24 2021-06-24 Three-dimensional measurement method based on binary coding and electronic equipment

Country Status (1)

Country Link
CN (1) CN113358065B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114279356A (en) * 2021-12-09 2022-04-05 南京信息工程大学 Gray scale stripe pattern design method for three-dimensional measurement
CN114913332A (en) * 2022-07-15 2022-08-16 中国科学技术大学 Method and device for generating binary image
CN116067306A (en) * 2023-03-07 2023-05-05 深圳明锐理想科技有限公司 Automatic dimming method, three-dimensional measuring method, device and system
CN116958292A (en) * 2023-06-15 2023-10-27 湖南视比特机器人有限公司 Deflection imaging method for smooth object surface reconstruction

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000152004A (en) * 1998-11-10 2000-05-30 Sharp Corp Multi-valued dither matrix optimizing device
JP2001186344A (en) * 1999-12-08 2001-07-06 Sindo Ricoh Co Ltd Digital picture thresholding device using error diffusing coefficient to be used for zigzag system and threshold modulating method to be applied to it
US20050007635A1 (en) * 2003-07-09 2005-01-13 Kang Ki-Min Method and apparatus for determining error diffusion coefficients
JP2006303999A (en) * 2005-04-21 2006-11-02 Canon Inc Image processing method, image processor, and image processing system
CN101195306A (en) * 2006-06-27 2008-06-11 精工爱普生株式会社 High quality halftone process
US20120257256A1 (en) * 2011-04-05 2012-10-11 Takashi Wakui Processing condition selecting apparatus, processing condition selecting method, and storage medium
US20140064603A1 (en) * 2013-01-02 2014-03-06 Song Zhang 3d shape measurement using dithering
CN104567730A (en) * 2015-01-15 2015-04-29 四川大学 Method for generating light field with sine structure by means of space-time binary encoding
US20150197086A1 (en) * 2014-01-15 2015-07-16 Canon Kabushiki Kaisha Image processing apparatus and image processing method
JP2018202789A (en) * 2017-06-07 2018-12-27 ローランドディー.ジー.株式会社 Ink jet printer
CN110210087A (en) * 2019-05-20 2019-09-06 中国科学院光电技术研究所 A kind of beam jitter model parameter real-time identification method based on particle swarm algorithm
CN111141232A (en) * 2019-12-20 2020-05-12 浙江大学 High-quality binary stripe generation method based on multi-objective optimization dithering algorithm
CN111141230A (en) * 2019-12-20 2020-05-12 浙江大学 Three-dimensional depth data acquisition method based on frequency optimization dithering algorithm
CN111649692A (en) * 2020-05-22 2020-09-11 浙江四点灵机器人股份有限公司 Binary out-of-focus coding structured light method based on frequency domain optimization

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000152004A (en) * 1998-11-10 2000-05-30 Sharp Corp Multi-valued dither matrix optimizing device
JP2001186344A (en) * 1999-12-08 2001-07-06 Sindo Ricoh Co Ltd Digital picture thresholding device using error diffusing coefficient to be used for zigzag system and threshold modulating method to be applied to it
US20050007635A1 (en) * 2003-07-09 2005-01-13 Kang Ki-Min Method and apparatus for determining error diffusion coefficients
KR20050006491A (en) * 2003-07-09 2005-01-17 삼성전자주식회사 Method and apparatus deciding for a error diffusion coefficient
JP2006303999A (en) * 2005-04-21 2006-11-02 Canon Inc Image processing method, image processor, and image processing system
CN101195306A (en) * 2006-06-27 2008-06-11 精工爱普生株式会社 High quality halftone process
US20120257256A1 (en) * 2011-04-05 2012-10-11 Takashi Wakui Processing condition selecting apparatus, processing condition selecting method, and storage medium
US20140064603A1 (en) * 2013-01-02 2014-03-06 Song Zhang 3d shape measurement using dithering
US20150197086A1 (en) * 2014-01-15 2015-07-16 Canon Kabushiki Kaisha Image processing apparatus and image processing method
CN104567730A (en) * 2015-01-15 2015-04-29 四川大学 Method for generating light field with sine structure by means of space-time binary encoding
JP2018202789A (en) * 2017-06-07 2018-12-27 ローランドディー.ジー.株式会社 Ink jet printer
CN110210087A (en) * 2019-05-20 2019-09-06 中国科学院光电技术研究所 A kind of beam jitter model parameter real-time identification method based on particle swarm algorithm
CN111141232A (en) * 2019-12-20 2020-05-12 浙江大学 High-quality binary stripe generation method based on multi-objective optimization dithering algorithm
CN111141230A (en) * 2019-12-20 2020-05-12 浙江大学 Three-dimensional depth data acquisition method based on frequency optimization dithering algorithm
CN111649692A (en) * 2020-05-22 2020-09-11 浙江四点灵机器人股份有限公司 Binary out-of-focus coding structured light method based on frequency domain optimization

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
SEUNG-HO PARK 等: "《Estimation of error diffusion kernel using genetic algorithm》", 《INTERNATIONAL SOCIETY FOR OPTICS AND PHOTONICS》 *
WILLIAM 等: "《Genetic method to optimize binary dithering technique for high-quality fringe generation》", 《OPTICS LETTERS》 *
周佩 等: "《"S"型二元编码的正弦结构光模板设计与实验研究》", 《激光与光电子学进展》 *
田中贤一: "《GAによる計算機ホログラムにおける最適誤差拡散の推定方法》", 《THE INSTITUTE OF IMAGE INFORMATION AND TELEVISION ENGINEERS》 *
蔡宁 等: "《基于遗传算法相位抖动优化的高质量二值条纹产生方法》", 《光子学报》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114279356A (en) * 2021-12-09 2022-04-05 南京信息工程大学 Gray scale stripe pattern design method for three-dimensional measurement
CN114279356B (en) * 2021-12-09 2023-07-25 南京信息工程大学 Gray scale fringe pattern design method for three-dimensional measurement
CN114913332A (en) * 2022-07-15 2022-08-16 中国科学技术大学 Method and device for generating binary image
CN116067306A (en) * 2023-03-07 2023-05-05 深圳明锐理想科技有限公司 Automatic dimming method, three-dimensional measuring method, device and system
CN116067306B (en) * 2023-03-07 2023-06-27 深圳明锐理想科技有限公司 Automatic dimming method, three-dimensional measuring method, device and system
CN116958292A (en) * 2023-06-15 2023-10-27 湖南视比特机器人有限公司 Deflection imaging method for smooth object surface reconstruction

Also Published As

Publication number Publication date
CN113358065B (en) 2022-11-15

Similar Documents

Publication Publication Date Title
CN113358065B (en) Three-dimensional measurement method based on binary coding and electronic equipment
CN110390638B (en) High-resolution three-dimensional voxel model reconstruction method
CN107169981B (en) Method and device for detecting three-dimensional profile of ballast particles
WO2019178702A1 (en) Systems and methods for polygon object annotation and a method of training an object annotation system
US20200057831A1 (en) Real-time generation of synthetic data from multi-shot structured light sensors for three-dimensional object pose estimation
Zhao et al. Sign-agnostic implicit learning of surface self-similarities for shape modeling and reconstruction from raw point clouds
CN113607085B (en) Binary defocus three-dimensional measurement method and device based on half-broken sine stripes
CN111141232A (en) High-quality binary stripe generation method based on multi-objective optimization dithering algorithm
CN115511752A (en) BP neural network-based point coordinate distortion removal method and storage medium
CN110365404B (en) Wavefront-free sensing self-adaptive system and method for improving convergence speed by using same
CN114819728A (en) Flexible workshop production scheduling method capable of self-adaptive local search
CN111582310B (en) Decoding method and device of implicit structured light
CN112802084A (en) Three-dimensional topography measuring method, system and storage medium based on deep learning
CN111141230A (en) Three-dimensional depth data acquisition method based on frequency optimization dithering algorithm
CN116309144A (en) Point cloud shape completion method based on diffusion probability model
CN111649692A (en) Binary out-of-focus coding structured light method based on frequency domain optimization
JP2013101481A (en) Reading device, method, and program
KR20200030485A (en) Methods and apparatus for processing image data for machine vision
Li et al. Improving resolution of 3D surface with convolutional neural networks
CN116452621B (en) Ideal contour generating algorithm, device and storage medium based on reinforcement learning
Peng et al. Fringe pattern inpainting based on dual-exposure fused fringe guiding CNN denoiser prior
Jia et al. AdaptiveStereo: Depth estimation from adaptive structured light
CN115479556A (en) Binary defocus three-dimensional measurement method and device for reducing phase error mean value
CN116993629B (en) Smoothing method and device based on image decomposition, electronic equipment and storage medium
CN116777969A (en) 4-bit-depth high-precision projection fringe pattern generation method and electronic equipment

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