A high-precision projector calibration method and system

By combining Gray code grating and phase-shift grating, using Hilbert transform to compensate for phase error and using local homography matrix to transform feature points, the problem of projector nonlinear error is solved, high-precision projector calibration is achieved, and the accuracy and efficiency of three-dimensional reconstruction are improved.

CN119164323BActive Publication Date: 2025-10-10HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411056026.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2025-10-10
Estimated Expiration
2044-08-02

AI Technical Summary

Technical Problem

The nonlinear characteristics of the projector, such as lens distortion and light source non-uniformity, affect the accuracy of structured light 3D imaging. A high-precision calibration method is needed to improve the accuracy of light pattern projection and image data decoding.

Method used

A method combining Gray code grating pattern and phase-shifted sinusoidal grating pattern is adopted to compensate the phase error through Hilbert transform. The local homography matrix is ​​used to transform the feature points of the calibration plate from the camera coordinate system to the projector coordinate system. Combined with the camera calibration method, high-precision calibration of the projector is performed.

Benefits of technology

It effectively reduces the impact of nonlinear errors on calibration, improves the accuracy of projector calibration, lays the foundation for subsequent high-precision three-dimensional reconstruction, and reduces the difficulty and time cost of system calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119164323B_ABST
    Figure CN119164323B_ABST
Patent Text Reader

Abstract

The present application provides a kind of high-precision calibration method of projector overcoming nonlinear error, the present application adopts phase encoding technique, obtains absolute phase value by projecting gray code and sinusoidal stripe pattern.Hilbert transform is used to compensate phase error, reduce the error introduced by nonlinear factors of projector and camera.The feature points of calibration board are converted from camera pixel coordinate system to projector coordinate system by local homography matrix, further reduce the influence of nonlinear error on calibration accuracy.Finally, Zhang Zhengyou calibration method is used to calibrate the projector, and its internal and external parameters are obtained.This method can effectively improve the calibration accuracy and reduce the calibration difficulty.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of three-dimensional imaging technology, and in particular to a high-precision calibration method and system for a projector. Background Art

[0002] Structured light 3D imaging technology represents an advanced approach in 3D reconstruction. Its core approach involves using a projector to project a carefully designed light pattern onto the surface of a target object. The distortion of the light pattern caused by the surface geometry is captured and decoded by a camera, allowing advanced 3D reconstruction algorithms to calculate the object's precise 3D shape. Thanks to its exceptional accuracy and efficiency, this technology has been widely adopted in various fields, including industrial manufacturing quality control, medical imaging, cultural heritage preservation, and virtual reality content creation.

[0003] In structured light 3D imaging systems, the projector plays a central role. It is not only responsible for generating the key light patterns, but these patterns are also the basis of the entire 3D reconstruction process. However, the inherent nonlinear characteristics of the projector, such as lens distortion, gamma shift, and light source non-uniformity, may adversely affect the quality of the projected image of the light pattern, thereby interfering with the accuracy of the 3D reconstruction. Therefore, it is particularly important to accurately calibrate the projector, which not only ensures the correct projection of the light pattern, but also ensures the accurate decoding of the image data, further improving the accuracy of the obtained 3D data. With the advancement of technology, structured light 3D imaging technology is moving towards higher resolution and faster scanning speeds, which places higher requirements on the calibration of the projector. Developing a fast and reliable projector calibration method has become one of the key factors in promoting the further optimization and application of this technology. Summary of the Invention

[0004] The technical problem to be solved by the present invention is how to overcome the nonlinear error factors of the projector and the camera and improve the calibration accuracy.

[0005] The present invention solves the above technical problems through the following technical means:

[0006] A high-precision calibration method for a projector comprises the following steps:

[0007] S101. Projecting a Gray code grating pattern and a phase-shifted sinusoidal grating pattern onto a calibration plate, and capturing images with a camera;

[0008] S102. Decode the grating image to obtain an absolute phase distribution map;

[0009] S103. Compensate for phase error using Hilbert transform;

[0010] S104. Detect the feature points of the calibration plate and calculate their coordinates in the camera coordinate system;

[0011] S105. Estimating the homography matrix of the local area of ​​the calibration plate feature points;

[0012] S106. Using the local homography matrix, the feature points of the calibration plate are converted to the projector coordinate system;

[0013] S107. Calibrate the projector with reference to the camera calibration method to obtain the internal and external parameters of the projector.

[0014] Furthermore, the specific execution process of step S101 is as follows:

[0015] The projector has a resolution of w × h, and the projected pattern is consistent with the projector resolution. Each Gray code grating pattern and sinusoidal grating pattern is sequentially projected onto a calibration plate. The projection of the pattern completely covers the calibration plate, and the camera captures the complete pattern projection.

[0016] The number of phase shift steps of the projected sinusoidal grating pattern is N (N ≥ 3), which requires N grayscale patterns. The pattern contains t sinusoidal periods (t is generally a power of 2). One of the encoding methods for the grating pixel value Y in the nth (1 ≤ n ≤ N) phase shift pattern is:

[0017]

[0018] X∈{0,1,2,...,D-1}

[0019] In the above formula, X represents the position of the grating pixel in the pattern, D represents the dimension of the grating direction, that is, the number of pixels, and T represents the number of pixels contained in a sine cycle, T = D / t, V min and V max are the minimum and maximum values ​​of the set pixel value Y respectively; when the pattern is a horizontal sinusoidal grating, each column has the same pixel value, D = w, T = w / t, and the value range of X is {0, 1, 2, ..., w-1}; when the pattern is a vertical sinusoidal grating, each row has the same pixel value, D = h, T = h / t, and the value range of X is {0, 1, 2, ..., h-1};

[0020] The number of coding bits of the projected Gray code grating pattern is M, so M binary patterns are needed to form the Gray code. Each pattern represents one bit of the Gray code. One of the encoding methods of the pixel value Y in the mth (1≤m≤M) Gray code pattern is:

[0021]

[0022] X∈{0,1,2,...,D-1}

[0023] In the above formula, X represents the position of the grating pixel in the pattern, D represents the dimension in the grating direction, that is, the number of pixels, and V0 and V1 are two values ​​of the set pixel value Y. When the pattern is a horizontal Gray code, D = w, each column has the same pixel value, and the value range of X is {0, 1, 2, ..., w-1}; when the pattern is a vertical Gray code, D = h, each row has the same pixel value, and the value range of X is {0, 1, 2, ..., h-1}.

[0024] Generally speaking, the value of M depends on t, and the relationship is as follows:

[0025] M=1+log2 t.

[0026] Furthermore, the specific execution process of step S102 is as follows:

[0027] The image of the sinusoidal grating pattern after being modulated on the surface of the calibration plate can be expressed as a function of a specific position, as shown in the following equation:

[0028] I n (x,y)=A(x,y)+B(x,y)cos[φ(x,y)+2π(n-1) / N],n=1,2,...,N

[0029] Among them I n is the nth sinusoidal grating image, n = 1, 2, ..., N represents the number of phase shift steps, N is the number of sinusoidal grating images, (x, y) represents the position of the image pixel, A(x, y) and B(x, y) represent the background light intensity and modulation amplitude, 2π(n-1) / Ν is the initial phase of the nth sinusoidal grating image, φ(x, y) represents the phase at the (x, y) position, and its solution is shown in the following formula:

[0030]

[0031] Each sinusoidal grating phase-shifted image has t complete sinusoidal cycles. To conveniently express the absolute phase Φ(x,y) of each pixel position (x,y), two integer values ​​k1 and k2 are used to express the period position of (x,y), where k1 = 0, 1, ..., t-1 is obtained by decoding the first M-1, i.e., log2t, Gray code images, and k2 = 0, 1, ..., t is obtained by decoding all M Gray code images. The absolute phase Φ(x,y) is obtained using the following formula:

[0032]

[0033] Using the horizontal Gray code and sinusoidal grating pattern, the horizontal absolute phase Φ of each pixel position (x,y) can be obtained. H(x, y); the longitudinal absolute phase Φ of each pixel position (x, y) can be obtained by using longitudinal Gray code and sinusoidal grating pattern V (x, y).

[0034] Further, the step S103 specifically executes the process as follows:

[0035] The image I n is applied with Hilbert transform and is recorded as The following can be obtained:

[0036]

[0037] The phase error Δφ caused by nonlinearity N can be expressed as:

[0038]

[0039] wherein φ actual is the actually calculated phase value, φ ideal is the ideal phase value, and G is the gamma factor related parameter of the projector.

[0040] The Hilbert transform of I n is wherein the corresponding phase error can be expressed as:

[0041]

[0042] wherein φ Hactual is the phase value obtained after Hilbert transform.

[0043] Further, the step S104 specifically executes the process as follows:

[0044] First, the captured Gray code and sinusoidal grating projection image containing the calibration plate is preprocessed; then the feature points of the calibration plate are automatically detected and recognized; after the feature points of the calibration plate are detected, the sub-pixel detection technology is further used to finely position the feature points and calculate the coordinates of the feature points in the camera coordinate system.

[0045] Further, the step S105 specifically executes the process as follows:

[0046] The absolute phase Φ(x c , y c ) at the feature points (x c , y c ) of the calibration plate in the camera coordinate system is converted into the pixel coordinates (x p , y p ) in the projector coordinate system:

[0047]

[0048] In the above formula, Φ H (x c ,y c ) and Φ V (x c ,y c ) obtained in step S102, t is the number of sinusoidal cycles contained in the pattern, W is the horizontal resolution of the image, and H is the vertical resolution of the image;

[0049] Find a unique local homography for each feature point on the calibration plate. The local homography is calculated in a small neighborhood around each target feature point and is only valid for that feature point. The calculation method is as follows:

[0050] Assuming that p is the homogeneous coordinate of the point near the feature point of the calibration plate in the camera coordinate system, and q is its homogeneous coordinate in the projector coordinate system, the local homography matrix can be found by the following formula

[0051]

[0052] Furthermore, the specific execution process of step S106 is as follows:

[0053] Get the local homography matrix Then, the coordinates of the feature point of the calibration plate at the center point in the camera coordinate system are Its coordinates in the projector coordinate system can be obtained according to the following formula

[0054]

[0055] Repeat the above calculation until all the feature points of the calibration plate are converted to the projector coordinate system.

[0056] Furthermore, the specific execution process of step S107 is as follows:

[0057] For each pattern projection image, the homography mapping from the calibration plate plane to the image plane is calculated; the homomorphism of the feature points detected in multiple images is used to estimate the intrinsic and extrinsic parameters of the projector using techniques such as least squares method; nonlinear optimization and other techniques are used to further refine the projector parameters, and the accuracy of the calibration results is ensured by evaluating the reprojection error.

[0058] Corresponding to the above method, the present invention also provides a high-precision projector calibration system, comprising:

[0059] The image acquisition module projects the Gray code and phase-shifted sinusoidal grating patterns onto the calibration board, and the camera captures the image;

[0060] A decoding module, decoding the grating image to obtain an absolute phase distribution map;

[0061] Error compensation module, which uses Hilbert transform to compensate for phase error;

[0062] The calibration plate feature point coordinate calculation module detects the calibration plate feature points and calculates their coordinates in the camera coordinate system;

[0063] Local homography matrix calculation module, estimates the homography matrix of the local area of ​​the feature points of the calibration plate;

[0064] The conversion module uses the local homography matrix to convert the feature points of the calibration plate into the projector coordinate system;

[0065] The calibration module calibrates the projector with reference to the camera calibration method to obtain the internal and external parameters of the projector.

[0066] Furthermore, the specific execution process of the error compensation module is as follows:

[0067] For image I n Apply the Hilbert transform and write it as We can get:

[0068]

[0069] Phase error Δφ caused by nonlinearity N It can be expressed as:

[0070]

[0071] Among them, φ actual is the actual calculated phase value, φ ideal is the ideal phase value, and G is a parameter related to the gamma factor of the projector.

[0072] For I n Hilbert transform The corresponding phase error It can be expressed as:

[0073]

[0074] Where φ Hactual The phase value is obtained through Hilbert transform.

[0075] The advantages of the present invention are:

[0076] The present invention fully considers the various nonlinear error factors of the projector and camera, can effectively improve the calibration accuracy of the projector, and lays the foundation for subsequent high-precision three-dimensional reconstruction. The present invention adopts a combination of Gray code and phase-shift grating to obtain the absolute phase information of the object surface, and compensates for the phase error introduced by the system nonlinearity through Hilbert transform, reducing the impact of nonlinear error on calibration accuracy; the feature points of the calibration plate are converted from the camera coordinate system to the projector coordinate system using a local homography matrix, further reducing the impact of nonlinear error. The proposed calibration method has a simple process and low operational difficulty. Only a small number of images are required to achieve high-precision calibration of the projector, greatly reducing the difficulty and time cost of system calibration. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] Figure 1 is a flow chart of a calibration method in an embodiment of the present invention;

[0078] Figure 2 is the calibration algorithm in the embodiment of the present invention;

[0079] Figure 3 is a Gray code pattern used for projection in an embodiment of the present invention;

[0080] Figure 4 is a sinusoidal grating pattern used for projection in an embodiment of the present invention;

[0081] Figure 5 A Gray code image captured by a camera in an embodiment of the present invention;

[0082] Figure 6 A sinusoidal grating image captured by a camera in an embodiment of the present invention;

[0083] Figure 7 Schematic diagram of solving the local homography matrix in an embodiment of the present invention. DETAILED DESCRIPTION

[0084] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0085] This embodiment provides a new method for calibrating a projector in a structured light 3D imaging system, including the following steps:

[0086] Step 1: Project the Gray code and phase-shifted sinusoidal grating patterns onto the calibration board and capture the image with the camera.

[0087] The resolution of the projector is w×h, and the projected pattern is consistent with the projector resolution. In this example, the resolution is 1024×768 (w=1024, h=768).

[0088] The number of phase shift steps of the projected sinusoidal grating pattern is N. The pattern contains t sinusoidal cycles, and the number of pixels contained in each cycle is T. The minimum and maximum values ​​of the pixel values ​​in the pattern are set to V. min and V max , one of the preferred encoding methods for the grating pixel value Y in the nth (1≤n≤N) phase shift pattern is:

[0089]

[0090] X∈{0,1,2,...,D-1}

[0091] Where X represents the position of the grating pixel in the pattern, and D represents the dimension of the grating direction, i.e. the number of pixels;

[0092] This example takes 3 (N=3) steps of phase shift and 16 (t=16) sinusoidal cycles as an example. Therefore, the sinusoidal grating pattern has 3 horizontal phase shift patterns and 3 vertical phase shift patterns. When the pattern is a horizontal sinusoidal grating, D=1024 and each cycle has T=64 pixels. When the pattern is a vertical sinusoidal grating, D=768 and each cycle has T=48 pixels. The pixel values ​​of the three phase shift patterns in the same direction all change in a sinusoidal manner with the same amplitude. The difference between them is the different initial phases. The minimum and maximum pixel values ​​in the pattern of this example are set to 50 (V min =50) and 200(V max =200), this encoding range is a preferred embodiment and more universal for projectors; taking the transverse sinusoidal grating as an example, the encoding equation for the three phase-shift patterns of the present invention is given as follows:

[0093]

[0094] In this example, the pattern width is divided into t = 16 periods. Therefore, 4 (log2 t = 4) bits of Gray code are required to determine the phase period. At the same time, to avoid mismatches between the decoding period boundary and the truncated phase edge, an additional bit of Gray code is required. Therefore, this example requires a total of 5 bits of Gray code, that is, 5 Gray code patterns are required in each direction. Figure 3 is a 5-bit Gray code pattern used for projection in the present invention, Figure 4 This is a 3-step phase-shifted sinusoidal grating pattern used for projection in the present invention.

[0095] Project the above pattern onto the calibration plate and capture the image using a camera; Figure 5 is a 5-bit Gray code image obtained by taking a picture with a camera. Figure 6 The image of a 3-step phase-shifted sinusoidal grating captured by a camera.

[0096] The position of the calibration plate is changed, and the projector repeatedly projects the sinusoidal fringe pattern and the Gray code pattern, which are then photographed by the camera. This process is repeated several times to obtain the calibration image.

[0097] Step 2: Decode the grating image to obtain the absolute phase distribution map

[0098] The sinusoidal grating pattern modulated by the calibration plate surface can be expressed as a function of a specific position, as shown in the following equation:

[0099] I n (x,y)=A(x,y)+B(x,y)cos[φ(x,y)+2π(n-1) / N],n=1,2,...,N

[0100] Among them I n That is, the image of the n-th sinusoidal grating, n = 1, 2, ..., N represents the number of phase shift steps, N is the number of sinusoidal grating images, (x, y) represents the position of the image pixel, A(x, y) and B(x, y) represent the background light intensity and modulation amplitude, 2π(n-1) / Ν is the initial phase of the n-th sinusoidal grating image, φ(x, y) represents the phase at the (x, y) position, and its solution is shown in the following formula:

[0101]

[0102] This example uses a three-step phase shift method (N=3). For each calibration plate pose captured by the camera, the pixel values ​​of the three phase-shifted images can be expressed as the following function:

[0103] I1(x,y)=A(x,y)+B(x,y)cos[φ(x,y)]

[0104]

[0105] The truncated phase can be obtained from these three phase-shifted images as follows:

[0106]

[0107] Since the output range of the inverse tangent function is usually limited to [-π,π], the resulting phase image has periodicity. The absolute phase is obtained using a Gray code image.

[0108] This example uses 16 cycles as an example, requiring five Gray code images. The first four Gray code images can be decoded using traditional methods to obtain the cycle number k1, and all five Gray code images can be decoded to obtain the cycle number k2. The cycle boundaries of k1 and k2 are exactly offset, and the absolute phase is obtained using the following formula:

[0109]

[0110] Step 3: Use Hilbert transform to compensate for the phase error.

[0111] The Hilbert transform is widely used in signal processing. It is a linear operator that transforms a real variable into another real variable through convolution:

[0112]

[0113] The Hilbert transform is essentially a frequency domain multiplier, shifting negative frequency terms by π / 2 and positive frequency terms by -π / 2. For a signal like cos(ωt), the Hilbert transform becomes cos(ωt-π / 2) = sin(ωt). Therefore, the Hilbert transform can shift the original phase shift by π / 2.

[0114] For image I n Apply the Hilbert transform and write it as We can get:

[0115]

[0116] Phase error Δφ caused by nonlinearity N It can be expressed as:

[0117]

[0118] Among them, φ actual is the actual calculated phase value, φ ideal is the ideal phase value, and G is a parameter related to the gamma factor of the projector.

[0119] For I n Hilbert transform The corresponding phase error It can be expressed as:

[0120]

[0121] Where φ Hactual The phase value is obtained through Hilbert transform.

[0122] The phase error of the Hilbert-transformed sinusoidal grating image maintains the same periodicity and amplitude as the original sinusoidal grating, but its error distribution shifts by half a period. Therefore, by calculating the average of the phases before and after the transformation, the phase error introduced by the system nonlinearity can be effectively offset.

[0123] Step 4: Detect the feature points of the calibration plate and calculate their coordinates in the camera coordinate system;

[0124] This example uses a checkerboard calibration plate, and the feature points of the calibration plate are the checkerboard corner points.

[0125] To improve the accuracy and reliability of corner detection, the captured checkerboard image is first preprocessed. This includes, but is not limited to, adjusting the image's contrast and brightness to enhance the checkerboard edges. Furthermore, applying filtering algorithms (such as Gaussian blur) can remove image noise and avoid false detections.

[0126] The corners of the chessboard can be automatically identified by using corner detection functions in image processing libraries (such as OpenCV), such as findChessboardCorners().

[0127] After detecting corners, further refinement of their location is often necessary. This can be accomplished using sub-pixel corner detection techniques, such as cornerSubPix() in OpenCV. This method considers the pixel information surrounding the corner and optimizes the corner's coordinates using the grayscale centroid method within a local window, achieving higher-precision detection.

[0128] Step 5: Estimate the homography matrix of the local area of ​​the feature points of the calibration plate;

[0129] Calibrate the plate feature points (x c ,y c ) at the absolute phase Φ(x c ,y c ) is converted to pixel coordinates (x p ,y p ):

[0130]

[0131] In the above formula, Φ H (x c ,y c ) and Φ V (x c ,y c ) obtained in step S102, t is the number of sinusoidal cycles contained in the pattern, W is the horizontal resolution of the image, and H is the vertical resolution of the image;

[0132] Find a unique local homography for each feature point on the calibration plate. The local homography is calculated in a small neighborhood around each target feature point and is only valid for that feature point. The calculation method is as follows:

[0133] Assuming that p is the homogeneous coordinate of the point near the feature point of the calibration plate in the camera coordinate system, and q is its homogeneous coordinate in the projector coordinate system, the local homography matrix can be found by the following formula

[0134]

[0135] The present invention does not use a single global homography to transform all chessboard angles to the projector coordinate system, but rather Figure 7 As shown in Figure 1, a unique local homography is found for each chessboard corner. These local homographies are calculated in a small neighborhood around each target corner. They are only valid when transforming specific corner points to projected coordinates and are not applicable to other corner points. Local homographies allow the nonlinear distortion of each corner point to be modeled independently, thereby further reducing the impact of nonlinear errors on calibration. In addition, because local homographies are estimated from more neighborhood data points than the minimum required data points, they show high robustness in the face of small decoding errors.

[0136] Step 6: Use the local homography matrix to transform the feature points of the calibration plate into the projector coordinate system;

[0137] Use step 5 to obtain the local homography matrix Then, the coordinates of the feature point of the calibration plate at the center point in the camera coordinate system are Its coordinates in the projector coordinate system can be obtained according to the following formula

[0138]

[0139] Repeat the above calculation until all the feature points of the calibration plate are converted to the projector coordinate system.

[0140] Step 7: Calibrate the projector with reference to the camera calibration method to obtain the internal and external parameters of the projector.

[0141] For each calibration image, the present invention calculates the homography mapping from the checkerboard calibration plate plane to the image plane. Using the homomorphism of the calibration plate feature points detected in multiple images, the least squares method and other techniques are used to estimate the internal parameters (such as focal length, principal point coordinates, and distortion coefficient) and external parameters (i.e., the rotation and translation between the projector and the calibration plate) of the projector. Nonlinear optimization is used to further refine the projector parameters, and the accuracy of the calibration results is ensured by evaluating the reprojection error.

[0142] Through the above steps, a high-precision projector calibration result can be obtained.

[0143] This embodiment proposes a new method for projector calibration in a structured light three-dimensional imaging system. This method fully considers the various nonlinear error factors of the projector and the camera, can effectively improve the calibration accuracy of the projector, and lays the foundation for subsequent high-precision three-dimensional reconstruction. The present invention adopts a combination of Gray code and phase-shift grating to obtain the absolute phase information of the object surface, and compensates for the phase error introduced by the system nonlinearity through Hilbert transform, thereby reducing the impact of nonlinear error on calibration accuracy; the local homography matrix is ​​used to convert the characteristic points of the calibration plate from the camera coordinate system to the projector coordinate system, further reducing the impact of nonlinear error. The proposed calibration method has a simple process and low operational difficulty. Only a small number of images are required to achieve high-precision calibration of the projector, which greatly reduces the difficulty and time cost of system calibration.

[0144] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A high-precision calibration method for a projector, characterized in that: The following steps are involved: S101. Projecting Gray code and phase-shifted sinusoidal grating patterns onto a calibration plate, and capturing the calibration plate with a camera to obtain a grating image; S102. Decode the grating image to obtain an absolute phase distribution map; S103. Compensate for phase error using Hilbert transform; S104. Detect the feature points of the calibration plate and calculate their coordinates in the camera coordinate system; S105. Estimate the homography matrix of the local area of ​​the calibration plate feature point; convert the calibration plate feature point (x c ,y c ) at the absolute phase Φ(x c ,y c ) is converted to pixel coordinates (x p ,y p ): In the above formula, Φ H (x c ,y c ) and Φ V (x c ,y c ) obtained in step S102, t is the number of sinusoidal cycles contained in the pattern, W is the horizontal resolution of the image, and H is the vertical resolution of the image; S106. Using the local homography matrix, the feature points of the calibration plate are converted to the projector coordinate system; S107. Calibrate the projector with reference to the camera calibration method to obtain the internal and external parameters of the projector.

2. A projector high-precision calibration method according to claim 1, characterized in that: The specific execution process of step S101 is: The projector has a resolution of w × h, and the projected pattern is consistent with the projector resolution. Each Gray code grating pattern and sinusoidal grating pattern is sequentially projected onto a calibration plate. The projection of the pattern completely covers the calibration plate, and the camera captures the complete pattern projection. The number of phase shift steps of the projected sinusoidal grating pattern is N, where N ≥ 3. This requires N grayscale patterns, each containing t sinusoidal periods, where t is a power of 2. One encoding method for the grating pixel value Y in the nth phase shift pattern is: X∈{0,1,2,...,D-1} In the above formula, 1≤n≤N, X represents the position of the grating pixel in the pattern, D represents the dimension of the grating direction, that is, the number of pixels, T represents the number of pixels contained in a sine cycle, T=D / t, V min and V max are the minimum and maximum values ​​of the grating pixel value Y in the set phase shift pattern. When the pattern is a horizontal sinusoidal grating, each column has the same pixel value, D = w, T = w / t, and the value range of X is {0, 1, 2, ..., w-1}. When the pattern is a vertical sinusoidal grating, each row has the same pixel value, D = h, T = h / t, and the value range of X is {0, 1, 2, ..., h-1}. The number of coding bits of the projected Gray code grating pattern is M, so M binary patterns are needed to form the Gray code. Each pattern represents one bit of the Gray code. One of the encoding methods of the pixel value Y in the mth Gray code pattern is: X∈{0,1,2,...,D-1} In the above formula, 1≤m≤M, X represents the position of the grating pixel in the pattern, D represents the dimension in the grating direction, that is, the number of pixels, and V0 and V1 are two values ​​of the pixel value Y of the set Gray code pixel pattern. When the pattern is a horizontal Gray code, D = w, each column has the same pixel value, and the value range of X is {0, 1, 2, ..., w-1}; when the pattern is a vertical Gray code, D = h, each row has the same pixel value, and the value range of X is {0, 1, 2, ..., h-1}. The value of M depends on t, and the relationship is as follows: M=1+log2 t.

3. A high-precision projector calibration method according to claim 1, characterized in that: The specific execution process of step S102 is: The image of the sinusoidal grating pattern after being modulated by the calibration plate surface is expressed as a function of a specific position, as shown in the following equation: Yo n (x,y)=A(x,y)+B(x,y)cos[φ(x,y)+2π(n-1) / N],n=1,2,...,N Among them I n is the nth sinusoidal grating image, n = 1, 2, ..., N represents the number of phase shift steps, N is the number of sinusoidal grating images, (x, y) represents the position of the image pixel, A(x, y) and B(x, y) represent the background light intensity and modulation amplitude, 2π(n-1) / Ν is the initial phase of the nth sinusoidal grating image, φ(x, y) represents the phase at the (x, y) position, and its solution is shown in the following formula: Each sinusoidal grating phase-shifted image has t complete sinusoidal cycles. To conveniently express the absolute phase Φ(x,y) of each pixel position (x,y), two integer values ​​k1 and k2 are used to express the period position of (x,y), where k1 = 0, 1, ..., t-1 is obtained by decoding the first M-1, i.e., log2t, Gray code images, and k2 = 0, 1, ..., t is obtained by decoding all M Gray code images. The absolute phase Φ(x,y) is obtained using the following formula: Using the horizontal Gray code and sinusoidal grating pattern, the horizontal absolute phase Φ of each pixel position (x, y) can be obtained. H (x, y); Using the longitudinal Gray code and sinusoidal grating pattern, the longitudinal absolute phase Φ of each pixel position (x, y) can be obtained V (x,y).

4. A projector high-precision calibration method according to claim 3, characterized in that: The specific execution process of step S103 is: For image I n Apply the Hilbert transform and write it as We can get: Phase error Δφ caused by nonlinearity N It can be expressed as: Among them, φ actual is the actual calculated phase value, φ ideal is the ideal phase value, G is a parameter related to the gamma factor of the projector; For I n Hilbert transform The corresponding phase error It can be expressed as: Where φ Hactual is the phase value obtained after Hilbert transform.

5. The method for high-precision calibration of a projector according to claim 1, characterized in that: The specific execution process of step S104 is as follows: First, the captured Gray code and sinusoidal grating projection images containing the calibration plate are preprocessed; then, the feature points of the calibration plate are automatically detected and identified; after the feature points of the calibration plate are detected, the positioning of the feature points is further refined using sub-pixel detection technology, and their coordinates in the camera coordinate system are calculated.

6. A high-precision projector calibration method according to claim 1, characterized in that: The specific execution process of step S105 is as follows: Find a unique local homography for each feature point on the calibration plate. The local homography is calculated in a small neighborhood around each target feature point and is only valid for that feature point. The calculation method is as follows: Assuming that p is the homogeneous coordinate of the point near the feature point of the calibration plate in the camera coordinate system, and q is its homogeneous coordinate in the projector coordinate system, the local homography matrix can be found by the following formula 7. A high-precision projector calibration method according to claim 6, characterized in that: The specific execution process of step S106 is as follows: Get the local homography matrix Then, the coordinates of the feature point of the calibration plate at the center point in the camera coordinate system are Its coordinates in the projector coordinate system can be obtained according to the following formula Repeat the above calculation until all the feature points of the calibration plate are converted to the projector coordinate system.

8. A high-precision projector calibration method according to claim 7, characterized in that: The specific execution process of step S107 is: For each pattern projection image, the homography mapping from the calibration plate plane to the image plane is calculated; the intrinsic and extrinsic parameters of the projector are estimated using the least squares technique using the homomorphism of the feature points detected in multiple images; Nonlinear optimization techniques are used to further refine the projector parameters, and the accuracy of the calibration results is ensured by evaluating the reprojection error.

9. A high-precision calibration system for a projector, characterized in that: include: The image acquisition module projects the Gray code and phase-shifted sinusoidal grating patterns onto the calibration plate. The camera captures the calibration plate to acquire the grating image. A decoding module, decoding the grating image to obtain an absolute phase distribution map; Error compensation module, which uses Hilbert transform to compensate for phase error; The calibration plate feature point coordinate calculation module detects the calibration plate feature points and calculates their coordinates in the camera coordinate system; Local homography matrix calculation module, estimates the homography matrix of the local area of ​​the feature points of the calibration plate; The conversion module uses the local homography matrix to convert the feature points of the calibration plate to the projector coordinate system; the feature points of the calibration plate in the camera coordinate system (x c ,y c ) at the absolute phase Φ(x c ,y c ) is converted to pixel coordinates (x p ,y p ): In the above formula, Φ H (x c ,y c ) and Φ V (x c ,y c ) obtained in step S102, t is the number of sinusoidal cycles contained in the pattern, W is the horizontal resolution of the image, and H is the vertical resolution of the image; The calibration module calibrates the projector with reference to the camera calibration method to obtain the internal and external parameters of the projector.

10. The high-precision projector calibration system according to claim 9, characterized in that: The specific execution process of the error compensation module is as follows: The image of the sinusoidal grating pattern after being modulated by the calibration plate surface is expressed as a function of a specific position, as shown in the following equation: Yo n (x,y)=A(x,y)+B(x,y)cos[φ(x,y)+2π(n-1) / N],n=1,2,...,N Among them I n is the n-th sinusoidal grating image, n = 1, 2, ..., N represents the number of phase shift steps, N is the number of sinusoidal grating images, (x, y) represents the position of the image pixel, A(x, y) and B(x, y) represent the background light intensity and modulation amplitude, and 2π(n-1) / Ν is the initial phase of the n-th sinusoidal grating image; For image I n Apply the Hilbert transform and write it as We can get: Phase error Δφ caused by nonlinearity N It can be expressed as: Among them, φ actual is the actual calculated phase value, φ ideal is the ideal phase value, G is a parameter related to the gamma factor of the projector; For I n Hilbert transform The corresponding phase error It can be expressed as: Where φ Hactual The phase value is obtained through Hilbert transform.

Citation Information

Patent Citations

  • Second-order rational model projector calibration method based on phase assistance

    CN116608766A

  • Method and system for projector calibration

    EP3018903A2