Elliptical shadow-based light source calibration method

By adopting a light source calibration method based on elliptical shadows and a binocular measurement system, the problem of inaccurate light source calibration in small field of view and microscopic scenes is solved, achieving high-precision light source position calibration, which is suitable for 3D reconstruction and measurement.

CN119741363BActive Publication Date: 2025-10-21SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411810695.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-10-21
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

In small field of view or microscopic scenes, the calibration results of traditional light source calibration methods are inaccurate and the application scenarios are limited. In particular, the extraction error of highlight points on the surface of mirror materials is large, and the selection of the pose of the calibrated object is limited.

Method used

An elliptical shadow-based light source calibration method is adopted. By preparing a target plane and a standard sphere, an elliptical shadow image of the standard sphere on the target plane is captured. The light source parameters are calculated using ellipse fitting, and iterative optimization is performed in conjunction with a binocular measurement system to improve the accuracy of the light source position.

Benefits of technology

It improves the accuracy and precision of light source calibration in small field of view and microscopic scenes, reduces errors, expands the application scenarios of photometric stereo method, and is suitable for object shape reconstruction and measurement under complex conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741363B_ABST
    Figure CN119741363B_ABST
Patent Text Reader

Abstract

The application discloses a light source calibration method based on an elliptical shadow, which comprises the following steps: preparing a target plane and a standard ball, calibrating the parameters of a camera by using the target plane, and placing the standard ball on the target plane; lighting an irradiation light source to make the irradiation light source irradiate the standard ball, so that the standard ball presents an elliptical shadow on the target plane, and the target plane is shot to obtain a target image; obtaining a target region after image processing of the shot target image, and calculating parameter data of the target region by using an elliptical fitting method; calculating the spatial position of the irradiation light source based on the geometric relationship by using the parameter data; measuring the irradiation light source by using a binocular measurement system, and optimizing the spatial position of the irradiation light source by using the measurement result, so that the method can be used in a small field of view and a micro scene, the fitting precision is improved, the error is reduced, and the accuracy of the light source calibration result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional modeling, and in particular to a light source calibration method based on elliptical shadows. Background Art

[0002] Photometric stereo is a technique that reconstructs the three-dimensional shape of an object's surface from multiple images taken under varying lighting conditions. Due to its high precision and minimal equipment requirements, it is widely used in industries such as industry, medicine, and agriculture. However, in small fields of view or microscopic scenes, the accuracy of the light source position cannot be guaranteed due to limitations in calibration methods, resulting in low 3D reconstruction accuracy.

[0003] In the prior art, there are two methods for calibrating the position of photometric stereo light sources:

[0004] The first method, light source reflection calibration, uses a highly reflective mirror material (such as a plane mirror or ceramic standard sphere) to calibrate the light source position. The light source creates a bright reflective spot on the surface of the mirror material. The camera captures the location of this reflective spot and, based on the reflection geometry, infers the light source's direction and position.

[0005] The second method, shadow projection calibration, uses multiple calibration objects of known geometric shapes (such as metal needles of known length) placed within the illumination range of the light source and captures the shadows cast by these calibration objects at different positions. Using an imaging perspective model, the direction and position of the light source are inferred from the intersection points of multiple light rays in space.

[0006] However, these two methods still have defects when applied to small fields of view and microscopic scenes: In the light source reflection calibration method, it is necessary to capture the reflection highlights of the light source on the mirror material and calculate the light source position based on the principles of geometric optics. However, the highlights formed on the surface of the mirror material are usually not of standard geometric shapes, and the extracted highlight contours have errors and low fitting accuracy, resulting in inaccurate light source calibration results. In addition, in small fields of view and microscopic scenes, the position selection of the calibration object is subject to spatial constraints, and the angles of the reflected light are too close, which also leads to inaccurate light source calibration results. Summary of the Invention

[0007] The embodiment of the present invention provides a light source calibration method based on elliptical shadows, aiming to solve the problems of inaccurate calibration results and limited application scenarios of traditional light source calibration methods.

[0008] An embodiment of the present invention provides a light source calibration method based on elliptical shadows, comprising:

[0009] Prepare a target plane and a standard sphere, use the target plane to calibrate the camera parameters, and place the standard sphere on the target plane;

[0010] Lighting up an illumination light source so that the illumination light source illuminates the standard sphere, causing the standard sphere to present an elliptical shadow on the target plane, and photographing the target plane to obtain a target image;

[0011] The captured target image is processed to obtain a target area, and parameter data of the target area is calculated using an ellipse fitting method;

[0012] Calculating the spatial position of the illumination light source based on the geometric relationship using the parameter data;

[0013] The illumination light source is measured using a binocular measurement system, and the spatial position of the illumination light source is optimized using the measurement results.

[0014] Furthermore, the parameter data of the target area is calculated using an ellipse fitting method, including:

[0015] Performing ellipse fitting on the target area to obtain the coordinates of two vertices, the semi-major axis length a, and the semi-minor axis length b of the target area;

[0016] The semi-major axis length a and the semi-minor axis length b are used to calculate the semi-focal length c and the focal coordinates F1 and F2 of the target area.

[0017] Furthermore, the calculating of the spatial position of the illumination light source based on the geometric relationship using the parameter data includes:

[0018] Solve the following equations to calculate the spatial position of the illumination light source:

[0019]

[0020] Among them, x a 、y a 、z a Represents the coordinates of a vertex; x b 、y b 、z b represents the coordinates of another vertex; x, y, z represent the spatial position of the illumination light source; a represents the semi-major axis length; b represents the minor-major axis length; c represents the semi-focal length; r represents the radius of the standard sphere; Represents the normal vector corresponding to the triangular plane formed by the two vertex coordinates and the illumination light source.

[0021] Furthermore, an annular structure consisting of a plurality of marking points is provided on the target plane, and the standard ball is placed in the annular structure.

[0022] Furthermore, the illumination light source includes a plurality of illumination light sources, and the binocular measurement system is used to measure the illumination light sources, and the measurement results are used to optimize the spatial position of the illumination light sources, including:

[0023] The binocular measurement system is used to obtain the relative position relationship between the different illumination light sources, and the spatial position is iteratively optimized using the relative position relationship to obtain a final light source calibration result.

[0024] Furthermore, the method of obtaining the relative position relationship between the different illumination light sources by using a binocular measurement system includes:

[0025] Using the binocular measurement system to sequentially acquire two light source images after each of the illumination light sources is turned on, and preprocessing the two light source images to obtain two image preprocessing results; wherein the binocular measurement system includes two cameras;

[0026] Taking each of the illumination light sources as a key point, and matching the two image preprocessing results with the corresponding key point;

[0027] Using a binocular stereo matching algorithm, a disparity value between two image preprocessing results of the binocular measurement system is calculated;

[0028] The relative position relationship between the different illumination light sources is calculated using the parallax values.

[0029] Furthermore, the calculating of the relative position relationship between the different illumination light sources using the parallax values ​​includes:

[0030] The depth value is calculated according to the following formula:

[0031]

[0032] Wherein, Z represents the depth from the illumination light source to the camera; f represents the focal length of the camera; B represents the baseline distance between the two cameras; and d represents the parallax value.

[0033] Furthermore, the iterative optimization of the spatial position using the relative position relationship to obtain a final light source calibration result includes:

[0034] Inputting the spatial position as an initial value into the optimization system;

[0035] The spatial position is iterated using the relative position as a constraint condition to obtain the final light source calibration result.

[0036] Furthermore, before the step of sequentially acquiring two light source images after each of the illumination light sources is turned on using the binocular measurement system, the method further includes:

[0037] Each camera in the binocular measurement system is calibrated using a calibration plate to obtain the intrinsic and extrinsic parameters of each camera. The landmarks on the calibration plate are then used as key points to perform epipolar correction on the binocular measurement system so that the two light source images are aligned to achieve stereo matching.

[0038] Furthermore, the plurality of illumination light sources form an annular illumination circle.

[0039] An embodiment of the present invention provides a light source calibration method based on elliptical shadows, comprising preparing a target plane and a standard sphere, using the target plane to calibrate camera parameters, and placing the standard sphere on the target plane; lighting an illumination light source so that the illumination light source illuminates the standard sphere so that the standard sphere presents an elliptical shadow on the target plane, and photographing the target plane to obtain a target image; performing image processing on the photographed target image to obtain a target area, and using an elliptical fitting method to calculate parameter data of the target area; using the parameter data to calculate the spatial position of the illumination light source based on a geometric relationship; using a binocular measurement system to measure the illumination light source, and then using the measurement results to optimize the spatial position of the illumination light source. In this way, the method can be used in small fields of view and microscopic scenes, while improving fitting accuracy, reducing errors, and improving the accuracy of light source calibration results. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 A schematic diagram of a flow chart of a light source calibration method based on elliptical shadows provided in an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of a scene illustrating a light source calibration method based on elliptical shadows provided by an embodiment of the present invention;

[0043] Figure 3 A schematic diagram of a target image provided by an embodiment of the present invention;

[0044] Figure 4 A schematic diagram illustrating the Dandelin double-sphere model provided in an embodiment of the present invention;

[0045] Figure 5 A schematic diagram of a target area provided by an embodiment of the present invention;

[0046] Figure 6 A triangle diagram illustrating the application of Heron's formula according to an embodiment of the present invention;

[0047] Figure 7 A schematic diagram of a scene of a binocular measurement system provided by an embodiment of the present invention;

[0048] Figure 8 A comparison diagram of the spatial position of the illumination light source and the light source calibration result provided by an embodiment of the present invention;

[0049] Figure 9 A practical application diagram of a light source calibration method based on elliptical shadows provided by an embodiment of the present invention Figure 1 ;

[0050] Figure 10 A practical application diagram of a light source calibration method based on elliptical shadows provided by an embodiment of the present invention Figure 2 ;

[0051] Figure 11 A practical application diagram of a light source calibration method based on elliptical shadows provided by an embodiment of the present invention Figure 3 . DETAILED DESCRIPTION

[0052] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. 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.

[0053] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0054] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0055] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0056] Combine Figure 1 and Figure 3 As shown, the embodiment of the present invention provides a light source calibration method based on elliptical shadows, comprising the following steps S101 to S105:

[0057] S101, preparing a target plane and a standard sphere, using the target plane to calibrate camera parameters, and placing the standard sphere on the target plane;

[0058] S102, lighting an illumination light source so that the illumination light source illuminates the standard sphere, causing the standard sphere to present an elliptical shadow on the target plane, and photographing the target plane to obtain a target image;

[0059] S103, performing image processing on the captured target image to obtain a target area, and using an ellipse fitting method to calculate parameter data of the target area;

[0060] S104: Calculate the spatial position of the illumination light source using the parameter data based on geometric relationships.

[0061] S105 , measuring the illumination light source using a binocular measurement system, and optimizing the spatial position of the illumination light source using the measurement result.

[0062] In step S101, a target plane is selected, along with a standard sphere of known radius. The target plane is first photographed in at least three different positions to calibrate the camera parameters and obtain its intrinsic and extrinsic parameters and distortion coefficients. The standard sphere is then placed on the target plane, ensuring stable contact with the target plane so that subsequent shadows cast by light sources are projected onto the target plane.

[0063] In step S102, the calibrated light source (which can be an LED) is illuminated so that it directly illuminates the calibration sphere and the target plane. During this process, it is necessary to ensure that the illuminating light source is single and free of interference, so that the calibration sphere casts an elliptical shadow on the target plane. A camera is then used to capture the calibration sphere and the target plane to obtain a target image.

[0064] In step S103, the captured target image is input into the image processing system for preprocessing. This includes using Gaussian filtering to smooth the image and suppress noise, while preserving edge information as little as possible. The image is then dedistorted using the distortion coefficients obtained during camera calibration. Canny edge detection is used, and the extracted shadows are binarized to eliminate the influence of the captured background. An ellipse fitting algorithm is then used to mathematically model the target area to obtain its parameter data.

[0065] In step S104, using the parameter data obtained by ellipse fitting, based on the principles of geometric optics and the known size relationship between the standard sphere and the target plane, the spatial position of the illumination light source can be derived by simultaneous equations.

[0066] In step S105, the two cameras can be calibrated separately using a calibration plate, and the marking points of the calibration plate can be used as key points to perform epipolar correction on the binocular measurement system. Then, the binocular measurement system can be used to measure the illumination light source, and the measurement results can be used to optimize the spatial position of the illumination light source.

[0067] Combine Figure 4 and Figure 5 As shown, in one embodiment, step S103 includes:

[0068] Performing ellipse fitting on the target area to obtain the coordinates of two vertices, the semi-major axis length a, and the semi-minor axis length b of the target area;

[0069] The semi-major axis length a and the semi-minor axis length b are used to calculate the semi-focal length c and the focal coordinates F1 and F2 of the target area.

[0070] In this embodiment, before fitting the target region, it is necessary to prove that the target region is a standard ellipse, which can be demonstrated using the Dandelin double-sphere model, as follows:

[0071] Consider the standard sphere as a sphere S1 inscribed in a cone. The target plane is then considered a plane π tangent to sphere S1, with the point of tangency being F1. This plane intersects the cone to form an edge E. Any point on edge E is designated as point P. Now construct another sphere S2 tangent to both the cone and plane π. The point of tangency between sphere S2 and plane π is F2. Connecting point P to the cone's vertex yields a generatrix, tangent to the two spheres at points Q and T, respectively. The theorem states that line segments drawn from a point outside the sphere and tangent to the sphere are of equal length, so PF1 = PQ and PF2 = PT. Therefore, we can obtain:

[0072] PF1+PF2=PQ+PT=QT

[0073] Since QT is a constant, it can be proved that the distance from any point on the edge E to the two tangent points F1 and F2 is a constant. From the definition of an ellipse, we can know that the edge E is an ellipse and F1 and F2 are the foci of the ellipse.

[0074] Then, the captured target image is processed by image processing methods, and the shadow area formed by the standard sphere projection is extracted using Canny edge detection. The extracted target area is mathematically modeled using the ellipse fitting algorithm. During the fitting process, the geometric characteristics of the ellipse are used to optimize the boundary of the target area, and the coordinates of the two vertices of the ellipse, the semi-major axis length a, and the semi-minor axis length b can be obtained. From the geometric relationship of the ellipse, it can be seen that the semi-focal length c satisfies c 2 =a 2 -b 2 , the semi-focal length c can be calculated from a and b, and the focus coordinates F1 and F2 of the ellipse can be obtained.

[0075] In one embodiment, an annular structure consisting of a plurality of marking points is provided on the target plane, and the standard ball is placed in the annular structure.

[0076] In this embodiment, a plurality of evenly distributed marking points are provided on the target plane, and these marking points together form an annular structure. The arrangement of the marking points can be optimized according to actual needs, and high-contrast patterns (such as dots, crosses or rectangles, etc.) are usually adopted to facilitate clear identification during image processing. The spacing between the marking points and the annular radius should be determined according to the size of the target and the usage scenario to ensure that the marking points are recognizable at different viewing angles. A standard sphere of known radius is placed in the central area of ​​the annular structure.

[0077] Combine Figure 6 As shown, in one embodiment, step S104 includes:

[0078] Solve the following equation to calculate the spatial position of the illumination light source:

[0079]

[0080] Among them, x a 、y a 、z a Represents the coordinates of a vertex; x b 、y b 、z b represents the coordinates of another vertex; x, y, z represent the spatial position of the illumination light source; a represents the semi-major axis length; b represents the minor-major axis length; c represents the semi-focal length; r represents the radius of the standard sphere; Represents the normal vector corresponding to the triangular plane formed by the two vertex coordinates and the illumination light source.

[0081] In this embodiment, the normal vector in the triangular plane formed by vertices A, B and the center S1 is It can be found that in the triangular plane, the vertices of the triangular plane are the light source O(x,y,z), the vertex A(x a ,y a ,z a ), vertex B(x b ,y b ,z b ), the distances from vertex A to light source O and from vertex B to light source O are a+c+u and a-c+u respectively, which can be expressed by Heron's formula as

[0082]

[0083] Since the radius r of the inscribed circle of the triangle is known, the area of ​​the triangle can be expressed as:

[0084] S OAB =r[(u)+(a+c)+(ac)]=r(2a+u)

[0085] The value of u can be calculated:

[0086]

[0087] Substituting u into the equation,

[0088]

[0089] The spatial position of the irradiating light source can be obtained by calculation.

[0090] Combine Figure 7 and Figure 8 As shown, in one embodiment, the illumination light source includes multiple light sources, and the step S105 includes:

[0091] The binocular measurement system is used to obtain the relative position relationship between the different illumination light sources, and the spatial position is iteratively optimized using the relative position relationship to obtain a final light source calibration result.

[0092] In this embodiment, a binocular measurement system is used to measure the relative positions of light sources. The binocular camera system simultaneously captures images of each illuminated light source, then processes the images to calculate the relative positions of the different light sources. Based on the obtained relative positions of the different light sources and the preliminary spatial positions of the light sources obtained through ellipse fitting, an iterative optimization algorithm is used to precisely adjust the light source positions. The spatial coordinates of the light sources are continuously updated until the error reaches a preset threshold or converges to an optimal solution. During this process, the relative positions of the different light sources are used as constraints to ensure the accuracy of the light source calibration. After this iterative optimization process, the final spatial positions of the light sources are obtained, which constitute the final light source calibration results.

[0093] In one embodiment, the obtaining of the relative positional relationship between the different illumination light sources using a binocular measurement system includes:

[0094] Using the binocular measurement system to sequentially acquire two light source images after each of the illumination light sources is turned on, and preprocessing the two light source images to obtain two image preprocessing results; wherein the binocular measurement system includes two cameras;

[0095] Taking each of the illumination light sources as a key point, and matching the two image preprocessing results with the corresponding key point;

[0096] Using a binocular stereo matching algorithm, a disparity value between two image preprocessing results of the binocular measurement system is calculated;

[0097] The relative position relationship between the different illumination light sources is calculated using the parallax values.

[0098] In this embodiment, two cameras in a binocular measurement system sequentially capture two images of each light source after it is illuminated. Each time a light source is illuminated, the two cameras capture images of the light source's location in the scene, resulting in a pair of synchronized light source images. These two light source images undergo preprocessing, which includes denoising, distortion correction, and image enhancement to improve image quality and ensure the accuracy of subsequent matching. Denoising removes image noise using algorithms such as high-pass and low-pass filtering. Distortion correction uses camera calibration parameters to geometrically correct the image and eliminate lens distortion. The resulting image is the preprocessing result, which is used for subsequent light source matching and disparity calculation.

[0099] Furthermore, each illuminating light source is considered a key point and matched based on its position in the two preprocessed images. The matching process includes the following steps: The light source's position is calibrated in both images as a key point; for each key point, the corresponding region in the image is searched and matched using image features (such as corners, edges, or color information). During the matching process, the exact position of the same light source in the two images is ensured, which is usually achieved using a feature matching algorithm (such as SIFT, SURF, or ORB).

[0100] Furthermore, after completing the key point matching, the binocular stereo matching algorithm is used to calculate the disparity value between the two pre-processed images. The disparity value refers to the difference in the position of the same object in the two images, which is usually obtained by calculating the horizontal or vertical distance of the corresponding pixels. The binocular stereo matching algorithm can adopt traditional block matching (BlockMatching), global optimization algorithm (such as graph cut optimization), or image pyramid-based algorithm (such as SAD, BM or SGM algorithm, etc.). Through these algorithms, the disparity value of each key point is calculated. The calculated disparity value is combined with the internal and external parameters of the camera to further calculate the relative position relationship between different illumination sources.

[0101] In one embodiment, the calculating the relative position relationship between the different illumination light sources using the parallax values ​​includes:

[0102] The depth value is calculated according to the following formula:

[0103]

[0104] Wherein, Z represents the depth from the illumination light source to the camera; f represents the focal length of the camera; B represents the baseline distance between the two cameras; and d represents the parallax value.

[0105] In this embodiment, the depth value obtained by calculation can realize the conversion from the two-dimensional information of the image to the three-dimensional spatial position, and provide spatial data for the subsequent calculation of the relative position relationship between light sources.

[0106] In one embodiment, the iterative optimization of the spatial position using the relative position relationship to obtain a final light source calibration result includes:

[0107] Inputting the spatial position as an initial value into the optimization system;

[0108] The spatial position is iterated using the relative position as a constraint condition to obtain the final light source calibration result.

[0109] In this embodiment, the spatial position is input into the optimization system as the initial value. The initial value includes the position coordinates of each illuminating light source in three-dimensional space. During the optimization process, the relative positional relationships between the different illuminating light sources are input into the optimization system as constraints. These relative positional relationships include geometric information such as the relative distance, angle, and direction between the light sources, which can be obtained through a binocular measurement system. The relative positional relationships provide the geometric relationship between the light sources, ensuring that the optimization system does not deviate from the actual light source configuration and that the relative positions of the light sources remain consistent, thereby improving the accuracy of the calibration results. Based on the initial value and the constraints, an optimization algorithm is used to iteratively optimize the spatial position. The optimization algorithm can use a least squares method, a nonlinear optimization algorithm (such as the Levenberg-Marquardt algorithm), or other algorithm suitable for the scenario. During the optimization process, the goal is to minimize the error function so that the spatial position of the light source is as close to the actual position as possible while satisfying the constraints. After several iterative optimizations, the precise spatial position of the light source can be obtained as the final light source calibration result.

[0110] In one embodiment, before the step of sequentially acquiring two light source images after each of the illumination light sources is turned on using the binocular measurement system, the method includes:

[0111] Each camera in the binocular measurement system is calibrated using a calibration plate to obtain the intrinsic and extrinsic parameters of each camera. The landmarks on the calibration plate are then used as key points to perform epipolar correction on the binocular measurement system so that the two light source images are aligned to achieve stereo matching.

[0112] In this embodiment, before formal image acquisition, each camera in the binocular measurement system is calibrated using a calibration target. The calibration target is typically a standard plate, such as a checkerboard calibration target or an origin array calibration target, with known geometric dimensions and a precise distribution of calibration points. The purpose of calibration is to obtain the intrinsic and extrinsic parameters and distortion coefficients of each camera. After calibrating the two cameras, the target's landmarks serve as key points for epipolar correction of the binocular measurement system. This ensures that the geometric relationship between the two cameras in the binocular camera system and their optical properties are precisely matched to obtain accurate depth information and achieve stereo matching.

[0113] The calibration can be performed as follows:

[0114] Place the standard calibration plate at different positions and angles in the measurement scene to ensure that both cameras can capture the marked points on the calibration plate;

[0115] Use two cameras to capture multiple images of the calibration plate to ensure that the markers at different perspectives are covered;

[0116] The coordinates of the marker points are extracted through image processing algorithms, and combined with calibration algorithms (such as Zhang Zhengyou calibration method, stereo calibration method, etc.), the intrinsic and extrinsic parameters of the camera are calculated.

[0117] Specifically, intrinsic calibration involves determining camera parameters such as focal length, principal point position, and distortion coefficient. These parameters are calculated by taking multiple measurements of markers of known geometric dimensions on a standard calibration plate and combining them with the camera's imaging characteristics. Extrinsic calibration involves determining the relative position between two cameras, including baseline distance and rotation angle. Extrinsic parameters represent the position and orientation of two cameras relative to the same coordinate system. By repeatedly photographing the calibration plate, the relative position and orientation of the cameras are calculated.

[0118] After completing the calibration of intrinsic and extrinsic parameters, the calibration results are verified by applying them to a known test scene. The accuracy of the calibration results is typically checked by comparing them with known reference values ​​(such as the position of a known object on a standard plane) to ensure that the camera's geometric and optical characteristics are accurately modeled. If the calibration results meet the expected accuracy, the binocular measurement system can be officially used for image acquisition and depth calculation during the light source calibration process. If large errors are found, recalibration is required until a sufficiently accurate calibration result is obtained.

[0119] In one embodiment, the plurality of illumination light sources form an annular illumination circle.

[0120] In this embodiment, multiple illumination light sources are evenly arranged in a plane or space to form an annular structure. The design of the annular structure can be flexibly adjusted according to actual application requirements. For example, a circular, elliptical, or other geometrically shaped annular configuration can be selected. The position of each light source relative to the other light sources has a fixed geometric spacing, ensuring that a uniform illumination area is formed during illumination. The configuration of the annular illumination circle helps to achieve uniform and symmetrical illumination distribution, and is particularly suitable for scenes that require precise light source calibration. In this structure, the illumination direction of all light sources is basically the same, making the relative position relationship between the light sources clearer.

[0121] In summary, this paper proposes a simplified light source calibration method designed to improve the accuracy of photometric stereo calibration while simplifying equipment requirements and operational procedures. This method requires only a target plane and a standard sphere of known radius to complete the calibration. Specifically, the standard sphere is placed on the target plane and the position of the light source is determined by capturing the elliptical image formed by the standard sphere under illumination.

[0122] Unlike traditional high-light point calibration methods, which require at least two different poses for calibration, the calibration method presented in this paper can accurately determine the light source's position with just a single image. Furthermore, the calibration results are further optimized by integrating it with a binocular measurement system. The binocular measurement system models the light source and utilizes previous calibration results for spatial optimization, ensuring that the light source position is more precise and highly consistent with the actual position, thereby improving the accuracy of photometric stereo reconstruction results.

[0123] Combine Figures 9 to 11 As shown, this invention not only simplifies equipment requirements and operational steps, but also enables precise light source position calibration in constrained environments. Thanks to the introduction of binocular measurement system optimization, this method ensures high-precision light source calibration even in small fields of view and microscopic scenes, expanding the application of photometric stereo to enable 3D reconstruction and measurement of object morphology under more complex conditions. Figure 9 Grayscale images of the same object taken under different light sources when reconstructing the object using photometric stereo. Figure 10 A real image of an object reconstructed using a near-field photometric stereo model established using the light source position obtained by the light source calibration method of the present invention. Figure 11 It is a surface normal map reconstructed from a near-field photometric stereo model established by optimizing the light source position using the light source calibration method of the present invention.

[0124] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

[0125] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

Claims

1. A light source calibration method based on elliptical shadows, characterized in that: include: Prepare a target plane and a standard sphere, use the target plane to calibrate the camera parameters, and place the standard sphere on the target plane; Lighting up an illumination light source so that the illumination light source illuminates the standard sphere, causing the standard sphere to present an elliptical shadow on the target plane, and photographing the target plane to obtain a target image; The captured target image is processed to obtain a target area, and parameter data of the target area is calculated using an ellipse fitting method; Calculating the spatial position of the illumination light source based on the geometric relationship using the parameter data; The illumination light source is measured using a binocular measurement system, and the spatial position of the illumination light source is optimized using the measurement results.

2. The light source calibration method based on elliptical shadows according to claim 1, characterized in that: The method of calculating the parameter data of the target area using an ellipse fitting method includes: Performing ellipse fitting on the target area to obtain the coordinates of two vertices, the semi-major axis length a, and the semi-minor axis length b of the target area; The semi-major axis length a and the semi-minor axis length b are used to calculate the semi-focal length c and the focal coordinates F1 and F2 of the target area.

3. The light source calibration method based on elliptical shadows according to claim 2, characterized in that: The step of calculating the spatial position of the illumination light source based on the geometric relationship using the parameter data includes: Solve the following equation to calculate the spatial position of the illumination light source: Among them, x a 、y a 、z a Represents the coordinates of a vertex; x b 、y b 、z b represents the coordinates of another vertex; x, y, z represent the spatial position of the illumination light source; a represents the semi-major axis length; b represents the semi-minor axis length; c represents the semi-focal length; r represents the radius of the standard sphere; Represents the normal vector corresponding to the triangular plane formed by the two vertex coordinates and the illumination light source.

4. The light source calibration method based on elliptical shadows according to claim 1, characterized in that: An annular structure consisting of a plurality of marking points is provided on the target plane, and the standard ball is placed in the annular structure.

5. The light source calibration method based on elliptical shadows according to claim 1, characterized in that: The illumination light sources include a plurality of illumination light sources, and the binocular measurement system is used to measure the illumination light sources, and the measurement results are used to optimize the spatial positions of the illumination light sources, including: The binocular measurement system is used to obtain the relative position relationship between the different illumination light sources, and the spatial position is iteratively optimized using the relative position relationship to obtain a final light source calibration result.

6. The light source calibration method based on elliptical shadows according to claim 5, characterized in that: The method of obtaining the relative position relationship between the different illumination light sources by using a binocular measurement system includes: Using the binocular measurement system to sequentially acquire two light source images after each of the illumination light sources is turned on, and preprocessing the two light source images to obtain two image preprocessing results; wherein the binocular measurement system includes two cameras; Taking each of the illumination light sources as a key point, and matching the two image preprocessing results with the corresponding key point; Using a binocular stereo matching algorithm, a disparity value between two image preprocessing results of the binocular measurement system is calculated; The relative position relationship between the different illumination light sources is calculated using the parallax values.

7. The light source calibration method based on elliptical shadows according to claim 6, characterized in that: The calculating and obtaining the relative position relationship between the different illumination light sources by using the parallax values ​​includes: The depth value is calculated according to the following formula: Wherein, Z represents the depth from the illumination light source to the camera; f represents the focal length of the camera; B represents the baseline distance between the two cameras; and d represents the parallax value.

8. The light source calibration method based on elliptical shadows according to claim 5, characterized in that: The iterative optimization of the spatial position by using the relative position relationship to obtain a final light source calibration result includes: Inputting the spatial position as an initial value into the optimization system; The spatial position is iterated using the relative position as a constraint condition to obtain the final light source calibration result.

9. The light source calibration method based on elliptical shadows according to claim 6, characterized in that: Before the step of sequentially acquiring two light source images after each of the illumination light sources is turned on using the binocular measurement system, the method includes: Each camera in the binocular measurement system is calibrated using a calibration plate to obtain the intrinsic and extrinsic parameters of each camera. The landmarks on the calibration plate are then used as key points to perform epipolar correction on the binocular measurement system so that the two light source images are aligned to achieve stereo matching.

10. The light source calibration method based on elliptical shadows according to claim 5, characterized in that: The plurality of illumination light sources form an annular illumination circle.

Citation Information

Patent Citations

  • Real point light source direction calculating and virtualization method based on single photography ball image

    CN105046685A

  • Synchronous calibration method for camera and light source in photometric stereoscopic vision system

    CN114241059A