A binocular vision calibration method and system
By displaying a dynamic target pattern on an LCD screen, and utilizing a three-step phase-shifting algorithm and a nonlinear optimization algorithm, the flexibility and applicability issues of traditional binocular vision calibration methods in narrow depth-of-field and small field-of-view scenarios are solved, achieving high-precision calibration results.
Patent Information
- Application Number
- CN202511446030.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2045-10-11
AI Technical Summary
Traditional binocular vision calibration methods lack flexibility and applicability in application scenarios with narrow depth of field or small common field of view, making it difficult to ensure the accuracy of target feature point extraction and matching.
A dynamic target pattern is displayed on an LCD screen. The phase is recovered and the phase of the encoded target image is restored using a three-step phase-shifting algorithm. High-quality regions are selected by combining the modulation threshold. The phase is compressed and truncated by the remainder operation to reveal the orthogonal jumping ridge line at the center. Based on the row and column numbers of the encoded phase, a set of binocular projection equations is established and the intrinsic and extrinsic parameters are solved by a nonlinear optimization algorithm.
It achieves high-precision calibration under defocus conditions, breaking through the limitations of clear and complete images and common field of view. It is suitable for macro detection and 3D reconstruction in narrow spaces, and has high precision, strong applicability and flexibility.
Smart Images

Figure CN120931737B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lens calibration technology, and in particular to a binocular vision calibration method and system. Background Technology
[0002] Binocular vision systems are similar to the stereo perception mechanism of human eyes. They simultaneously acquire scene images using binocular cameras, calculate scene disparity maps using stereo matching algorithms, and reconstruct the scene's 3D depth information by combining the camera's intrinsic and extrinsic parameters. As a core component of binocular vision systems, binocular calibration aims to establish a strict mapping relationship between the 3D physical world and the 2D image plane by accurately solving for the binocular camera's intrinsic and extrinsic parameters. Traditional binocular calibration methods primarily use planar calibration methods. This method employs planar targets such as checkerboard patterns or dot arrays, and uses binocular cameras to acquire target images from different perspectives, extracting calibration feature points such as corner points and center points. It then combines these with a pinhole imaging model to construct a system of projection equations containing intrinsic and extrinsic parameters, and finally uses a nonlinear optimization algorithm to solve for the binocular camera's intrinsic and extrinsic parameters. Intrinsic parameters include intrinsic parameters such as focal length, principal point, and distortion coefficients, while extrinsic parameters include rotation matrices and translation vectors.
[0003] However, traditional binocular target localization methods suffer from two technical bottlenecks: first, they require the binocular camera to acquire a clear image of the planar target to ensure the accuracy of target feature point extraction; second, they require the binocular camera to acquire a complete image of the planar target to ensure the accuracy of target feature point matching. These requirements significantly reduce the flexibility of traditional binocular target localization methods, making them unsuitable for applications with narrow depth of field or small common field of view. Therefore, ensuring the accuracy of target feature point extraction under defocus blur conditions while effectively utilizing target feature points within the non-common field of view is crucial for improving the flexibility and applicability of binocular target localization. Summary of the Invention
[0004] Based on this, the purpose of the present invention is to provide a binocular vision calibration method and system, which aims to solve the problem that there is a lack of a flexible and versatile binocular vision calibration method in the prior art that can adapt to application scenarios with a small depth of field or a small common field of view.
[0005] A binocular vision calibration method according to an embodiment of the present invention includes:
[0006] The left and right cameras are controlled to simultaneously capture dynamic target patterns displayed sequentially on the LCD screen. The dynamic target patterns include at least 3 phase target images and 3 coded target images. The phase target patterns are circular grating arrays, and the coded target patterns are coded circular arrays.
[0007] The truncated phase of the phase target image and the encoded phase of the encoded target image are recovered based on a three-step phase-shifting algorithm. The image coordinates of the target feature points are determined based on the truncated phase, and the world coordinates of the target feature points are determined based on the encoded phase.
[0008] Adjust the position or orientation of the LCD screen a preset number of times, and return to the steps of controlling the left and right cameras until a preset number of image coordinates and world coordinates are determined;
[0009] The projection equations of the binocular vision system are constructed based on the image coordinates and world coordinates of the target feature points, and the intrinsic and extrinsic parameters of the dual-view camera are determined by solving the equations using a nonlinear optimization algorithm, thus completing the calibration of the dual-view stereo vision system.
[0010] In addition, the binocular vision calibration method according to the above embodiments of the present invention may also have the following additional technical features:
[0011] Furthermore,
[0012] The phase target pattern is a circular grating array, and its mathematical expression is as follows:
[0013]
[0014] The following conditions must be met simultaneously:
[0015]
[0016]
[0017] in, k =1, 2, 3 represent the serial numbers of the phase target patterns, ( x, y () represents the pixel coordinates of the phase target pattern; m =1, 2, ..., M Indicates the row number of the circular grating. n =1, 2, ..., N Indicates the column number of the circular grating, ( x m,n ,y m,n () represents the pixel coordinates of the center feature point of the circular grating in the m-th row and n-th column. r max Indicates the maximum radius of the circular grating;
[0018] Furthermore,
[0019] The coded target pattern is a coded circular array, and its mathematical expression is as follows:
[0020]
[0021] In the formula k =1, 2, 3 represent the serial numbers of the coded target patterns, ( x, y ) represents the pixel coordinates of the coded target pattern, which are consistent with the pixel coordinates of the phase target pattern; m =1, 2, ..., M Indicates the row number of the circular grating. n =1, 2, ..., N Indicates the column number of the circular grating.
[0022] Furthermore,
[0023] The formula for calculating the truncated phase is as follows:
[0024]
[0025] The formula for calculating the encoded phase is as follows:
[0026]
[0027] in, and The range of values is .
[0028] Furthermore, the step of determining the image coordinates of the target feature points based on the truncated phase includes:
[0029] The average modulation image of the phase target image and the coded target image is calculated using a preset formula;
[0030] Set a preset modulation threshold, retain the image area where the circular grating array is located, and determine the image area where each circular grating is located according to the connected component labeling method;
[0031] The range of values for the truncated phase is transformed using the remainder operation to... ;
[0032] The zero-phase point of the truncated phase after the value range changes is extracted according to the edge detection algorithm, and the zero-phase point is fitted with two zero-phase lines. The center feature point of the circular grating, i.e., the image coordinates, is determined according to the intersection of the two zero-phase lines.
[0033] Furthermore,
[0034] The preset formula is:
[0035]
[0036] in, The preset modulation threshold is 0.3, where is the serial number.
[0037] Furthermore, the step of determining the world coordinates of the target feature point based on the encoded phase includes:
[0038] The row and column numbers of the circular grating are determined by a set of preset equations;
[0039] Then, the world coordinates of the target feature point are determined based on the row number and the column number;
[0040] The preset set of equations is as follows:
[0041]
[0042]
[0043] The world coordinates are:
[0044]
[0045] Where round is the rounding function. D This represents the physical spacing between adjacent gratings.
[0046] Another object of the present invention is a binocular vision calibration system, the system comprising:
[0047] The data acquisition module is used to control the left camera and the right camera to simultaneously acquire the dynamic target pattern displayed sequentially on the LCD screen. The dynamic target pattern includes at least 3 phase target images and 3 coded target images. The phase target pattern is a circular grating array, and the coded target pattern is a coded circular array.
[0048] The coordinate determination module is used to recover the truncated phase of the phase target image and the encoded phase of the encoded target image based on a three-step phase shift algorithm, and to determine the image coordinates of the target feature points based on the truncated phase, and to determine the world coordinates of the target feature points based on the encoded phase.
[0049] The loop module is used to adjust the position or orientation of the liquid crystal display screen a preset number of times, and return to the steps of controlling the left and right cameras until a preset number of image coordinates and world coordinates are determined;
[0050] The parameter determination module is used to construct the projection equations of the binocular vision system based on the image coordinates and world coordinates of the target feature points, and to determine the intrinsic and extrinsic parameters of the dual-view camera by solving the equations using a nonlinear optimization algorithm, thereby completing the calibration of the dual-view stereo vision system.
[0051] Another objective of this invention is to provide a storage medium storing a computer program that, when executed by a processor, implements the steps of the binocular vision calibration method described above.
[0052] Another objective of this invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the binocular vision calibration method described above.
[0053] This invention generates a circular grating array resistant to defocus blur using a dynamic target, recovers the truncated and encoded phases using a three-step phase-shift algorithm, filters high-quality regions using a modulation threshold, compresses the truncated phase using a modulo operation, and reveals the orthogonal jumping ridges at the center. Simultaneously, based on the encoded phase, it resolves the row and column numbers, achieving sub-pixel-level center image coordinate positioning and world coordinate binding under defocus conditions. Finally, it establishes a binocular projection equation system using multi-view feature points and employs a nonlinear optimization algorithm to jointly optimize intrinsic and extrinsic parameters, rapidly completing high-precision calibration. This overcomes the limitations of traditional methods on clear, complete images and common fields of view, providing a highly adaptable solution for macro detection and 3D reconstruction in narrow spaces. It possesses the advantages of high accuracy, strong applicability, and high flexibility. Therefore, this invention solves the problem of the lack of a highly flexible and universal binocular vision calibration method in existing technologies that can adapt to application scenarios with small depth of field or small common fields of view. Attached Figure Description
[0054] Figure 1 This is a flowchart of the binocular vision calibration method in the first embodiment of the present invention;
[0055] Figure 2 This is a schematic diagram of the results of the binocular vision calibration system in the second embodiment of the present invention;
[0056] Figure 3 This is a schematic diagram of the structure of the electronic device in the third embodiment of the present invention;
[0057] Figure 4 This includes three phase target images and three coded target images in one embodiment of the present invention.
[0058] Figure 5 This refers to the truncated phase of the phase target image and the encoded phase of the encoded target image in one embodiment of the present invention.
[0059] Figure 6 In one embodiment of the present invention, the image coordinates of the truncated phase after the remainder operation, the center feature point, and the row and column numbers of the circular grating are shown.
[0060] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation
[0061] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0063] Example 1
[0064] Please see Figure 1 The figure shows a binocular vision calibration method in the first embodiment of the present invention, which specifically includes steps S01-S04.
[0065] S01, control the left camera and the right camera to simultaneously acquire the dynamic target pattern displayed sequentially on the LCD screen. The dynamic target pattern includes at least 3 phase target images and 3 coded target images. The phase target pattern is a circular grating array, and the coded target pattern is a coded circular array.
[0066] Specifically, the phase target pattern is a circular grating array, and its mathematical expression is as follows:
[0067]
[0068] The following conditions must be met simultaneously:
[0069]
[0070]
[0071] in, k =1, 2, 3 represent the serial numbers of the phase target patterns, ( x, y ) represents the pixel coordinates of the phase target pattern. m =1, 2, ..., M, representing the row numbers of the circular grating. n =1, 2, ..., N Indicates the column number of the circular grating, ( x m,n ,y m,n () represents the pixel coordinates of the center feature point of the circular grating in the m-th row and n-th column. r max This indicates the maximum radius of the circular grating.
[0072] Furthermore, the coded target pattern is a coded circular array, the mathematical expression of which is as follows:
[0073]
[0074] In the formula k =1, 2, 3 represent the serial numbers of the coded target patterns, ( x, y ) represents the pixel coordinates of the coded target pattern, which are consistent with the pixel coordinates of the phase target pattern; m =1, 2, ..., M Indicates the row number of the circular grating. n =1, 2, ..., N Indicates the column number of the circular grating.
[0075] In practice, the left and right cameras remain relatively fixed during calibration, while the LCD screen displays the dynamic target pattern. Furthermore, the phase modulation design of the circular grating array transforms the physical center of the circle into optical phase information, ensuring that feature extraction is unaffected by defocus blur and reasonably limiting the effective area of the circular gratings to avoid overlap between adjacent gratings. Moreover, the coded circular array encodes row and column numbers separately through conditional branching, achieving cross-viewpoint binding of visible feature points from a single camera and overcoming the limitations of a common field of view. Specifically, the position of each circular grating is uniquely identified by cosine fringe phase.
[0076] S02, based on the three-step phase shift algorithm, recover the truncated phase of the phase target image and the encoded phase of the encoded target image, and determine the image coordinates of the target feature points according to the truncated phase, and determine the world coordinates of the target feature points according to the encoded phase;
[0077] Specifically, the formula for calculating the truncated phase is as follows:
[0078]
[0079] The formula for calculating the encoded phase is as follows:
[0080]
[0081] in, and The range of values is .
[0082] Furthermore, the step of determining the image coordinates of the target feature points based on the truncated phase includes:
[0083] The average modulation image of the phase target image and the coded target image is calculated using a preset formula; a preset modulation threshold is set, and the image region where the circular grating array is located is retained; the image region where each circular grating is located is determined according to the connected component labeling method; the value range of the truncated phase is transformed to [value range missing] using a modulo operation. The zero-phase point of the truncated phase after the value range changes is extracted according to the edge detection algorithm, and the zero-phase point is fitted with two zero-phase lines to determine the center feature point of the circular grating, i.e., the image coordinates, based on the intersection of the two zero-phase lines.
[0084] Furthermore, the preset formula is:
[0085]
[0086] The preset modulation threshold is 0.3.
[0087] Furthermore, the step of determining the world coordinates of the target feature point based on the encoded phase includes: determining the row number and column number of the circular grating through a preset set of equations; and then determining the world coordinates of the target feature point based on the row number and the column number.
[0088] The preset set of equations is as follows:
[0089]
[0090]
[0091] The world coordinates are:
[0092]
[0093] Where round is the rounding function. D This represents the physical spacing between adjacent gratings.
[0094] In practical implementation, a precise mapping from the image coordinate system to the world coordinate system is established by parsing sub-pixel-level feature points in optical encoding. Specifically, a modulation threshold is used to filter high-quality phase regions, reducing blur noise and improving the accuracy of center-of-focus positioning in out-of-focus scenes. Furthermore, phase truncation is achieved through phase modulo operation. It explicitly reveals the orthogonal jumping ridge line at the center of the circle, reducing the error of the edge detection algorithm. Furthermore, it achieves high-precision binding of feature points by encoding the phase and using world coordinates, requiring no manual intervention.
[0095] S03, adjust the position or orientation of the liquid crystal display screen a preset number of times, and return to the steps of controlling the left and right cameras until a preset number of image coordinates and world coordinates are determined;
[0096] Specifically, by varying the position or orientation of the LCD screen, multiple sets of data are acquired, and calibration constraints are added to improve parameter robustness. Overdetermined equations are constructed using feature points from different screen positions and orientations to reduce the dependence of parameter estimation on single-viewpoint data.
[0097] S04. Based on the image coordinates and world coordinates of the target feature points, construct a set of projection equations for the binocular vision system, and solve them using a nonlinear optimization algorithm to determine the intrinsic and extrinsic parameters of the dual-view camera, thereby completing the calibration of the dual-view stereo vision system.
[0098] Specifically, based on the mapping relationship between the image coordinates and world coordinates of the target feature points, the classic Zhang Zhengyou calibration method can be used to estimate the intrinsic and extrinsic parameters of the left and right cameras, including intrinsic parameters such as focal length, principal point, and distortion coefficient, and extrinsic parameters such as rotation matrix and translation vector.
[0099] The following is a detailed description of the solution by calibrating a specific binocular stereo vision system to facilitate understanding. The specific implementation steps are as follows:
[0100] Step 1: Set up a binocular stereo vision calibration system, which mainly includes a left camera, a right camera, an LCD screen, and a computer. The left and right cameras constitute the binocular vision system, and they remain relatively fixed during the calibration process. The LCD screen is used to display dynamic target patterns.
[0101] Step 2: Use a computer to generate 6 dynamic target patterns, including 3 phase target patterns and 3 coded target patterns; then control the LCD screen to display the 6 dynamic target patterns in sequence, and simultaneously control the left and right cameras to acquire 6 dynamic target images, including 3 phase target images and 3 coded target images. Figure 4 Three phase target images and three coded target images are shown respectively.
[0102] Step 3: Use the three-step phase-shifting algorithm to recover the truncated phase of the phase target image and the coded phase of the coded target image, such as... Figure 5 As shown; then the image coordinates of the target feature points are extracted using truncated phase, and the world coordinates of the target feature points are determined using coded phase.
[0103] Step 4: Change the position or orientation of the LCD screen more than 3 times, and repeat Step 2 and Step 3. Use a binocular camera to collect dynamic target images from different positions or orientations, and extract the image coordinates and world coordinates of the calibration feature points. Figure 6 The images show the truncated phase after the modulo operation, the image coordinates of the center feature point, and the row and column numbers of the circular grating.
[0104] Step 5: Based on the one-to-one mapping relationship between the image coordinates and world coordinates of the target feature points, establish the projection equations of the binocular vision system, and then use a nonlinear optimization algorithm to solve the intrinsic and extrinsic parameters of the binocular camera to complete the calibration task of the binocular vision system.
[0105] Furthermore, it should be noted that, to further improve accuracy and efficiency, the circular grating array designed in this invention adopts a tangential encoding approach. This avoids the situation where the radial encoding of circular stripes becomes elliptical stripes after perspective transformation during camera capture, resulting in the elliptical center not coinciding with the actual center, thus affecting the accuracy and efficiency of center extraction. The radial encoding of the circular grating, after perspective transformation during camera capture, results in two... The intersection point of the phase lines perfectly coincides with the actual center of the circle, allowing for accurate and efficient extraction of the center. Furthermore, due to differences in the types of circular gratings and circular fringes, the distribution of the transformed center feature points differs, leading to differences in the methods for determining the center. Two methods, namely the two-line intersection method and the binary quartic curve method, are used to find local minimum extrema. In practice, this scheme utilizes different radii... One approach fits two straight lines at phase points, while another only uses the neighborhood of the zero-phase point to fit a binary quartic curve. Therefore, this approach utilizes more phase points and has higher robustness. Furthermore, for circular grating targets with a large number of feature points, this approach's encoding method can improve the range of feature point encoding during implementation, adapting to the circular grating target and ensuring the feasibility and accuracy of the solution.
[0106] In summary, the binocular vision calibration method in the above embodiments of the present invention generates a circular grating array resistant to defocus blur through a dynamic target, recovers the truncated phase and encoded phase using a three-step phase-shift algorithm, filters high-quality regions by combining modulation thresholds and compresses the truncated phase through modulo operations, reveals the orthogonal jumping ridge line of the circle center, and simultaneously resolves the row and column numbers based on the encoded phase to achieve sub-pixel-level image coordinate positioning of the circle center and world coordinate binding under defocus conditions. Finally, it establishes a binocular projection equation system through multi-view feature points and uses a nonlinear optimization algorithm to jointly optimize intrinsic and extrinsic parameters, quickly completing high-precision calibration. This method breaks through the limitations of traditional methods on clear and complete images and common fields of view, providing a highly adaptable solution for macro detection and 3D reconstruction in narrow spaces. It has the advantages of high accuracy, strong applicability, and high flexibility. Therefore, the present invention solves the problem of the lack of a highly flexible and universal binocular vision calibration method in the prior art that can adapt to application scenarios with small depth of field or small common fields of view.
[0107] Example 2
[0108] Please see Figure 2The diagram shown is a structural block diagram of the binocular vision calibration system proposed in the second embodiment of the present invention. The binocular vision calibration system 200 includes: a data acquisition module 21, a coordinate determination module 22, a loop module 23, and a parameter determination module 24, wherein:
[0109] Data acquisition module 21 is used to control the left camera and the right camera to simultaneously acquire the dynamic target pattern displayed sequentially on the LCD screen. The dynamic target pattern includes at least 3 phase target images and 3 coded target images. The phase target pattern is a circular grating array and the coded target pattern is a coded circular array.
[0110] The coordinate determination module 22 is used to recover the truncated phase of the phase target image and the encoded phase of the encoded target image based on the three-step phase shift algorithm, and to determine the image coordinates of the target feature points based on the truncated phase, and to determine the world coordinates of the target feature points based on the encoded phase;
[0111] The loop module 23 is used to adjust the position or orientation of the liquid crystal display screen a preset number of times, and return to the steps of controlling the left and right cameras until a preset number of image coordinates and world coordinates are determined;
[0112] The parameter determination module 24 is used to construct the projection equation system of the binocular vision system based on the image coordinates and world coordinates of the target feature points, and to determine the intrinsic and extrinsic parameters of the dual-view camera by solving the nonlinear optimization algorithm, thereby completing the calibration of the dual-view stereo vision system.
[0113] Example 3
[0114] In another aspect, the present invention also proposes an electronic device, please refer to [link to relevant documentation]. Figure 3 The diagram shows an electronic device according to the third embodiment of the present invention, including a memory 20, a processor 10, and a computer program 30 stored in the memory and executable on the processor. When the processor 10 executes the computer program 30, it implements the binocular vision calibration method as described above.
[0115] In some embodiments, the processor 10 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip, used to run program code stored in memory 20 or process data, such as executing access restriction programs.
[0116] The memory 20 includes at least one type of readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 20 can be an internal storage unit of an electronic device, such as the hard disk of the electronic device. In other embodiments, the memory 20 can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Furthermore, the memory 20 can include both internal and external storage units of the electronic device. The memory 20 can be used not only to store application software and various types of data of the electronic device, but also to temporarily store data that has been output or will be output.
[0117] It should be pointed out that, Figure 3 The structure shown does not constitute a limitation on the electronic device. In other embodiments, the electronic device may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0118] This invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the binocular vision calibration method described above.
[0119] Those skilled in the art will understand that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0120] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0121] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0122] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0123] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A binocular vision calibration method, characterized in that, A method for calibrating a binocular stereo vision system of a binocular camera, the method comprising: controlling left and right cameras to simultaneously capture dynamic target images displayed on a liquid crystal display screen in sequence, the dynamic target images comprising at least three phase target images and three encoded target images, the phase target images being circular grating arrays, and the encoded target images being encoded circular arrays; recovering truncated phases of the phase target images and encoded phases of the encoded target images based on a three-step phase shift algorithm, and determining image coordinates of target feature points according to the truncated phases, and determining world coordinates of the target feature points according to the encoded phases; adjusting a position or orientation of the liquid crystal display screen for a preset number of times, and returning to perform the step of controlling the left and right cameras until a preset number of the image coordinates and the world coordinates are determined; constructing a projection equation set of the binocular vision system according to the image coordinates and the world coordinates of the target feature points, and determining internal and external parameters of the binocular camera according to a nonlinear optimization algorithm to complete the calibration of the binocular stereo vision system; the phase target images being circular grating arrays, and a mathematical expression thereof being as follows: simultaneously satisfying the following conditions: wherein, k = 1, 2, 3 represents the serial number of the image, x, y ) represents the pixel coordinates of the image; m = 1, 2, …, M represents the row number of the circular grating, n = 1, 2, …, N represents the column number of the circular grating, x m,n ,y m,n ) represents the pixel coordinates of the center feature point of the mth row and nth column circular grating, r max represents the maximum radius of the circular grating; the encoded target images being encoded circular arrays, and a mathematical expression thereof being as follows: wherein k = 1, 2, 3 represents the sequence number of the image, x, y ) represents the pixel coordinate of the image, which is consistent with the pixel coordinate of the phase target image; m = 1, 2, …, M represents the row number of the circular grating, n = 1, 2, …, N represents the column number of the circular grating; a truncated phase calculation formula being as follows: an encoded phase calculation formula being as follows: wherein, and each of the value ranges of ; the step of determining the image coordinates of the target feature points according to the truncated phases comprising: calculating average modulation images of the phase target images and the encoded target images through a preset formula; setting a preset modulation degree threshold, and retaining an image region where the circular grating array is located, and determining a region image where each circular grating is located according to a connected domain marking method; According to the remainder operation, the range of values of the truncated phase is transformed to ; extracting zero phase points of the truncated phases after a value range is changed according to an edge detection algorithm, and fitting two zero phase lines to the zero phase points, so as to determine a center feature point of the circular grating, i.e., the image coordinates, according to an intersection point of the two zero phase lines.
2. The binocular vision calibration method according to claim 1, wherein the preset formula is: the step of determining the world coordinates of the target feature points according to the encoded phases comprising: wherein, is a sequence number, and the preset modulation threshold is 0.
3.
3. The binocular vision calibration method of claim 1, wherein, determining row numbers and column numbers of the circular gratings through a preset equation set; and then determining the world coordinates of the target feature points according to the row numbers and the column numbers; the preset equation set being as follows: the world coordinates being as follows: A system for implementing the binocular vision calibration method according to any one of claims 1 to 3, the system comprising: where round is a rounding function, D is the physical pitch of the adjacent gratings.
4. A binocular vision calibration system, characterized by, a data acquisition module configured to control left and right cameras to simultaneously capture dynamic target images displayed on a liquid crystal display screen in sequence, the dynamic target images comprising at least three phase target images and three encoded target images, the phase target images being circular grating arrays, and the encoded target images being encoded circular arrays; a coordinate determination module configured to recover truncated phases of the phase target images and encoded phases of the encoded target images based on a three-step phase shift algorithm, and determine image coordinates of target feature points according to the truncated phases, and determine world coordinates of the target feature points according to the encoded phases; and A circulation module is configured to adjust the position or orientation of the liquid crystal display screen for a preset number of times, and return to execute the step of controlling the left camera and the right camera until a preset number of image coordinates and world coordinates are determined. A parameter determination module is configured to construct a projection equation set of a binocular vision system according to the image coordinates and the world coordinates of the target feature points, and determine the internal and external parameters of the binocular camera according to a nonlinear optimization algorithm, thereby completing the calibration of the binocular stereo vision system.
5. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the steps of the binocular vision calibration method according to any one of claims 1 to 3.
6. An electronic device, comprising: The computer program is stored in the memory and executable on the processor, and the processor implements the binocular vision calibration method according to any one of claims 1 to 3 when executing the program.
Citation Information
Patent Citations
Concentric circle grating and wedge-shaped grating target for camera calibration
CN102509298A
Binocular vision measurement system calibration method
CN119180869A