Binocular microscope high-precision calibration method and system of orthogonal projection model
By combining an orthogonal projection model with a high-precision checkerboard calibration plate, the model incompatibility and accuracy bottleneck of traditional binocular microscope calibration methods are solved, achieving sub-pixel-level calibration accuracy and system stability, thus meeting the needs of precision positioning applications.
Patent Information
- Application Number
- CN202511158297.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-12-05
AI Technical Summary
Traditional binocular stereo vision calibration methods cannot be directly applied to binocular microscopes due to model incompatibility, constraint failure, and accuracy bottlenecks, failing to meet the requirements of high-precision applications.
An orthogonal projection model is adopted, combined with a high-precision checkerboard calibration board and linear least squares method. Through distortion correction and feature point detection, monocular intrinsic parameters and binocular extrinsic parameters are obtained. The LM algorithm is used for joint optimization to minimize pixel coordinate error, and the calibration accuracy is verified by standard parts.
It achieves sub-pixel level calibration accuracy, solves model compatibility and constraint failure issues, improves calibration accuracy and system stability, and meets the requirements of precision positioning.
Smart Images

Figure CN121074149A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of medical image processing, and in particular to a high-precision calibration method and system for a binocular microscope based on an orthogonal projection model. BACKGROUND
[0002] In precision positioning applications such as micro-nano assembly and biomedical microscopic observation, a binocular microscope can realize three-dimensional positioning by virtue of binocular stereo vision principles, and the calibration accuracy thereof directly affects the reconstruction accuracy and stability, and is a key link in the field of computer vision.
[0003] Traditional binocular stereo vision calibration relies on a perspective projection model (pinhole imaging model), while a binocular microscope adopts a parallel light imaging principle (infinite optical system), and there are fundamental differences between the two, which makes it difficult for traditional calibration methods to be directly applicable, and mainly faces the following problems:
[0004] Firstly, the models are incompatible. The parallel projection of the binocular microscope neglects the depth axis (Z axis) and only retains the translation vectors (t) in the X and Y directions, and thus cannot directly apply the epipolar constraint of traditional binocular vision.
[0005] Secondly, the constraint conditions are invalid. Traditional binocular calibration relies on epipolar constraint and coplanar assumption, but in the parallel projection of the microscope, the epipoles of the left and right images coincide, and the epipolar lines degenerate into the same straight line, so that the epipolar line constraint is invalid.
[0006] Thirdly, the precision bottleneck. Traditional methods rely on precision targets, but due to the limitations of depth of field and the difficulty of target processing, the calibration accuracy is difficult to reach the sub-pixel level, and cannot meet the needs of high-precision applications.
[0007] Therefore, there is an urgent need for a high-precision calibration method that adapts to the optical characteristics of the binocular microscope to solve the above problems and improve its application efficiency in the precision field. SUMMARY
[0008] Therefore, the embodiments of the present application provide a high-precision calibration method and system for a binocular microscope based on an orthogonal projection model, which at least partially solves the problems existing in the prior art.
[0009] In the first aspect, the embodiments of the present application provide a high-precision calibration method for a binocular microscope based on an orthogonal projection model, comprising: acquiring images of a calibration board at different inclination angles, estimating radial distortion coefficients (K1, K2) and tangential distortion coefficients (P1, P2) based on a distortion model of Zhang's calibration method, performing distortion correction on the images to obtain distortion-corrected images;
[0010] Based on the image after distortion correction, feature points on the calibration board are detected, pixel coordinates of the feature points and corresponding world coordinates thereof are acquired, monocular intrinsic parameters are obtained through linear least square fitting, including scaling factors (k x , k γ ) in X-axis and Y-axis directions and principal point parameters (X0, Y0);
[0011] Based on the monocular intrinsic parameters, multiple groups of images of the calibration board in the overlapping area of the binocular field of view are collected, a corresponding relationship of feature points of left and right cameras is established, and the extrinsic parameters (T L , T R ) of the left and right cameras are solved in combination with an optical axis angle constraint and a baseline direction constraint, wherein the extrinsic parameters include rotation matrices (R L , R R ) and translation vectors (t L , t R );
[0012] Based on the monocular intrinsic parameters and the binocular extrinsic parameters, L-M algorithm is used for joint optimization to minimize the projection error of the pixel coordinates;
[0013] Based on the optimized intrinsic and extrinsic parameters, the measurement accuracy of the system is verified by using a standard part, if the error is greater than or equal to 1 μm, the intrinsic and extrinsic parameters are adjusted and re-optimized until the error is less than 1 μm, and the calibration is completed.
[0014] According to a specific implementation manner of the embodiment of the application, the calculation model of the radial distortion coefficients (K1, K2) is as follows:
[0015]
[0016] wherein (x, y) is the normalized non-distortion coordinate, (x j , y j ) is the distorted coordinate, K1, K2 are the radial distortion coefficients, and r 2 =x 2 +y 2 ;
[0017] The calculation model of the tangential distortion coefficients (P1, P2) is as follows:
[0018]
[0019] According to a specific implementation manner of the embodiment of the application, the calibration board is a high-precision chessboard calibration board, and the corner positioning accuracy thereof is 0.05-0.1 pixels; and the feature points are the corners of the chessboard.
[0020] According to a specific implementation manner of the embodiment of the application, the relationship formula of the linear least square fitting is as follows:
[0021]
[0022] wherein, (u i , v i ) is the pixel coordinate of the feature point, (X w , i, Y w , i) is the world coordinate of the feature point.
[0023] According to a specific implementation manner of the embodiment of the application, the optical axis angle constraint is that the left and right camera optical axis angle is 60°, and the left and right target optical axis direction vectors and satisfy:
[0024] According to a specific implementation manner of the embodiment of the application, the external parameter (T L , T R ) is a 4x4 homogeneous transformation matrix,
[0025] wherein, R L , R R (3x3) is the rotation matrix of the left and right cameras, describing the rotation of the camera coordinate system relative to the world coordinate system, t L , t R (3x1) is the translation vector of the left and right cameras, describing the translation of the camera coordinate system origin relative to the world coordinate system origin, T L is the left camera external parameter, the transformation from itself to the world coordinate system, and the initial value is simplified to a unit matrix, T R is the right camera external parameter, the transformation of the right camera coordinate system relative to the world coordinate system, and contains the relative rotation and translation between the left and right cameras.
[0026] According to a specific implementation manner of the embodiment of the application, the optimization target of the L-M algorithm is to optimize T L , T R as follows:
[0027]
[0028] wherein, P C is the world coordinate of the feature point, P L , P R are the pixel coordinates of the feature points of the left and right cameras respectively.
[0029] According to a specific implementation manner of the embodiment of the application, the standard part is a step ruler, and the precision is verified by calculating the deviation between the three-dimensional coordinate measurement value of the step ruler feature point and the actual size.
[0030] According to a specific implementation of the present invention, the correspondence between the feature points of the left and right cameras is determined by matching the pixel coordinates P of the checkerboard corner points in the left and right camera images. L (u i,L ,v i,L ) and P R (u i,R ,v i,R Establishment, and the world coordinates of the feature points are P. c (X i,W ,Y i,W Z i,W ).
[0031] In a second aspect, embodiments of the present invention provide a binocular microscope system, comprising:
[0032] Dual-optical path module: includes two eyepieces, a beam splitter, and a high-magnification objective lens that are collinear with the camera's optical axis, used to form a beam and provide stereo vision;
[0033] Light source: LED light source, brightness adjustable, used to provide imaging light;
[0034] Precision stage: Placed on a vibration-damping platform, used to fix calibration plates or standard parts, and can be rotated or translated;
[0035] Focusing system: includes coarse focusing mechanism and fine focusing mechanism, used to adjust the distance between the objective lens and the sample;
[0036] Image imaging module: contains two symmetrically arranged cameras, parallel to the eyepiece optical path, used to convert optical images into digital signals;
[0037] Computational processing unit: used to implement the method described in the first aspect or any implementation of the first aspect.
[0038] The present invention has the following beneficial effects:
[0039] Adapting to the optical characteristics of microscopes and solving model compatibility issues: The orthogonal projection model is adopted, which conforms to the parallel light imaging principle of binocular microscopes. This avoids the calibration deviation caused by the mismatch between traditional perspective projection models and the optical characteristics of microscopes, and effectively solves problems such as model incompatibility and epipolar constraint failure.
[0040] Improve calibration accuracy to sub-pixel level: Combine a high-precision checkerboard calibration board (corner positioning accuracy reaches 0.05-0.1 pixels) and linear least squares method to achieve sub-pixel level intrinsic parameter estimation; introduce standard parts such as step rulers for absolute accuracy verification (error <1μm), break through the accuracy bottleneck of traditional methods, and meet the needs of precision positioning applications.
[0041] Reduce error accumulation, optimize calibration results: Through the joint calibration of internal and external parameters, the monocular internal parameters and binocular external parameters are combined for comprehensive calibration and verification, avoiding the error accumulation of traditional step-by-step calibration; L-M algorithm is used for joint optimization and closed-loop iteration mechanism, dynamically adjusting parameters, further improving the calibration accuracy.
[0042] Simplify the model and calculation, improve efficiency: The orthogonal projection model only needs to consider the first-order radial distortion and tangential distortion, greatly reducing the number of parameters and reducing the optimization complexity; the application of linear least squares method simplifies the internal parameter solving process and improves the calibration efficiency.
[0043] Enhance system stability and reliability: Through physical constraints (such as optical axis angle, baseline direction) and standard part verification, ensure the stability and consistency of the calibration results, reduce the influence of environmental interference and mechanical error on the results, make the binocular microscope more reliable in precise operation. BRIEF DESCRIPTION OF DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0045] Figure 1 is a schematic diagram of the structure of a binocular microscope system;
[0046] Figure 2 is a schematic diagram of the optical path of a binocular microscope system;
[0047] Figure 3 is a schematic diagram of the coordinate relationship of the orthogonal projection principle;
[0048] Figure 4 is a schematic diagram of the coordinate relationship between the checkerboard calibration plate and the camera;
[0049] Figure 5 is a schematic diagram of the coordinate relationship between the binocular camera and the checkerboard calibration plate;
[0050] Figure 6 is a schematic diagram of the calibration closed-loop optimization process. DETAILED DESCRIPTION
[0051] The embodiments of the present application will be described in detail below with reference to the drawings.
[0052] Reference Figures 1-6 , Figure 1is a schematic diagram of the structure of a binocular microscope system, showing the composition and connection relationship of the calculation processing unit, image acquisition, binocular observation, left camera, left eyepiece, right camera, right eyepiece, prism, objective lens, focusing system, target and precision stage. Figure 2 is a schematic diagram of the light path of a binocular microscope system, showing the direction of the light path. Figure 3 is a schematic diagram of the coordinate relationship of the orthogonal projection principle, including the camera coordinate system and the imaging plane P' coordinate system, reflecting the coordinate correspondence of the orthogonal projection. Figure 4 is a schematic diagram of the coordinate relationship between the checkerboard calibration board and the camera, showing the position of the checkerboard in the camera field of view, and the corresponding relationship between the feature points in the pixel coordinate system and the world coordinate system, including the camera optical center and other elements. Figure 5 is a schematic diagram of the coordinate relationship between the binocular camera and the checkerboard calibration board, showing the positional relationship between the left camera, the right camera and the checkerboard, including the correspondence between the left camera feature points, the right camera feature points and the world coordinates, as well as the left camera optical center, the right camera optical center and other elements. Figure 6 is a schematic diagram of the calibration closed-loop optimization process, showing the process from initial parameter and optimization of internal and external parameters, to verification using known size standard parts, by comparing the internal parameters and calculating the size with the actual size, to determine whether the internal parameters are equal and the size error is less than 1μm, and then to decide whether to complete the calibration or return to adjust the parameters.
[0053] The parallel light system of a binocular microscope usually consists of two eyepieces and an objective lens. The axes of the two eyepieces are parallel, and the light rays from the objective lens enter the eyepieces directly to form parallel light beams, thus forming two independent images in the eyepieces, suitable for fine operation
[0054] (1) Binocular light path control
[0055] Eyepiece: Binocular microscope has two independent eyepieces for binocular observation, providing stereoscopic vision effect. Each eyepiece contains a lens system for magnifying the image formed by the objective lens.
[0056] Prism: Located below the eyepiece, used to convert the inverted image to a right-angled image, allowing the observer to see a right-angled image
[0057] Objective lens: The objective lens is used to preliminarily magnify the sample, usually designed with high magnification to meet the needs of high-precision observation.
[0058] (2) Light source: LED light source with adjustable brightness, providing sufficient light for observation to ensure image clarity and contrast
[0059] (3) Hardware system
[0060] Precision stage: used to fix the sample, usually equipped with a rotating platform or a moving platform, the precision stage is placed on an anti-vibration table to avoid parameter drift caused by environmental interference.
[0061] Focusing system: including coarse focusing mechanism and fine focusing mechanism, for quickly and finely adjusting the distance between objective lens and sample to adjust focus and clarity, so that the image reaches the clearest state
[0062] (4) Image imaging module: contains two cameras parallel and symmetric to the two eyepiece optical axes, which converts optical image into digital signal for image storage, analysis and sharing. The double-camera design matches the binocular optical path and supports stereo image acquisition.
[0063] (5) Computing processing unit: realizes automatic analysis of images through algorithms, reduces manual operation, and improves efficiency and consistency.
[0064] Orthogonal projection mathematical model:
[0065] 1. Orthogonal projection principle: a projection method that projects a three-dimensional object onto a two-dimensional plane through parallel light rays, characterized by the fact that the projection line is perpendicular to the projection plane.
[0066] Referring to Figure 2 , assume there is a plane P`
[0067] Assume the image plane P (camera) coordinate system (three-dimensional coordinates): the origin is the camera optical center O c , the coordinates are marked as (X c , Y c ) (unit: mm), and the Z-axis is the optical axis (pointing to the shooting direction).
[0068] Imaging plane P` coordinate system (two-dimensional coordinates): the origin is the intersection of the optical axis and the imaging plane (principal point) O0, the coordinates are marked as (X0, Y0) (unit: mm), and the x and y axes are parallel to the X and Y axes of the camera coordinate system, respectively.
[0069] Pixel coordinate system (two-dimensional pixel coordinates): the origin is the upper left corner of the image, and the coordinates are marked as (u, v) (unit: pixels). The conversion between the pixel coordinate system and the image plane coordinate system needs to consider the physical size of the pixels.
[0070] When the image of the object is enlarged by k times, for all visible points of the object, the projection equation can be simplified as follows,
[0071] u = kX C + X0, v = kY C + Y0
[0072] That is, the camera coordinate system is converted to the pixel coordinate system (orthogonal projection model)
[0073]
[0074] Where, the principal point coordinate (X0, Y0): intersection of optical axis and image plane (pixel coordinate system), determines the translation of projection;
[0075] X-axis direction physical focal length to pixel scale conversion coefficient k x , Y-axis direction physical focal length to pixel scale conversion coefficient k y (Formula: k x = f / d x , k y = f / d y , f is the focal length of the camera, d x and d y are the physical dimensions of the camera pixels in the X and Y axis directions.
[0076] 2. Binocular microscopic geometric constraints:
[0077] Left camera coordinate system: the origin is the left camera optical center O L , the Z-axis is the optical axis direction, and its direction vector is
[0078] Right camera coordinate system: the origin is the right camera optical center O R , the Z-axis is the optical axis direction, and its direction vector is
[0079] World coordinate system: take the left camera coordinate system as the reference, that is, the origin of the world coordinate system coincides with the left camera optical center, O w = O L .
[0080] Optical axis angle constraint: binocular microscopic system needs to ensure that the optical axis angle of the two cameras is about 60°, and the optical axis direction vectors of the left and right objectives and need to meet: (assuming the direction vector is usually a unit vector), and
[0081] Perpendicular constraint: both optical axes are perpendicular to the imaging plane normal vector (perpendicular condition).
[0082] Baseline direction constraint: the translation vector is along the X-axis (perpendicular to the optical axis Z), which simplifies the disparity calculation.
[0083] Monocular camera intrinsic calibration
[0084] The core of monocular calibration is to correct the camera imaging model from "perspective projection" to "orthogonal projection", and estimate the distortion parameters and intrinsic parameters (scaling factor, principal point).
[0085] 1. Distortion correction: eliminate lens nonlinear errors
[0086] The high power objective lens of the microscope objective lens has significant radial distortion (lens spherical curvature is not uniform) and slight tangential distortion (lens elements are not collinear at the center), which needs to be eliminated by calibration in advance.
[0087] The images of the calibration board at different inclination angles (small range rotation) are collected, and the radial distortion coefficients (K1, K2) and tangential distortion coefficients (P1, P2) are estimated using the distortion model of Zhang's calibration method
[0088] (1) Radial distortion coefficients (K1, K2):
[0089]
[0090] Where (x, y) is the normalized non-distorted coordinate, (x j ,y j ) is the distorted coordinate, K1, K2 is the radial distortion coefficient, and K1 is the main influence under high power lens, r 2 =x 2 +y 2 .
[0091] (2) Tangential distortion coefficients (P1, P2):
[0092]
[0093] Where (x, y) is the normalized non-distorted coordinate, (x j ,y j ) is the distorted coordinate, P1, P2 is the radial distortion coefficient, and r 2 =x 2 +y 2
[0094] 2. Orthogonal projection parameter estimation: fitting scaling factor and principal point
[0095] (1) Prepare calibration object
[0096] A high-precision checkerboard calibration board is used (the corner points are positioned with small deviation under perspective transformation and high magnification, the precision can reach 0.05-0.1 pixels, which meets the micro-level precision requirement), and the world coordinates (X w ,Y w ,0) of each feature point on the calibration board are known (assuming the calibration board is in the plane Z w =0).
[0097] (2) Collect images
[0098] Take multiple images of the checkerboard calibration board to ensure that the calibration board has different poses (such as rotation, translation, but keep the planarity) in the image plane.
[0099] (3) Feature point detection and matching
[0100] From each set of corrected images (eliminate distortion), detect the chessboard calibration board corner points (feature points), get its pixel coordinates (u i ,v i ), and known its world coordinates (X w,i ,Y w,i )
[0101] The pixel coordinates of the corner points (u i ,v i ) and the corresponding world coordinates (X w,i ,Y w,i ) are matched one by one.
[0102] (4) Parameter estimation under orthogonal projection: fitting scaling factor and principal point
[0103] Under the orthogonal projection model, the conversion relationship from world coordinates to pixel coordinates is:
[0104]
[0105] By linear least squares fitting, solve k x ,k y ,X 0, Y0
[0106] For X direction: u i =k x ·X w,i +X0, linear regression about k x ,X0;
[0107] For Y direction: u i =k y ·Y w,i +Y0, linear regression about k y ,Y0;
[0108] Under the orthogonal projection, the fitted k x ,k y value, if k x ≈k y (no stretching distortion), if the difference is too large, check the mechanical error, and make physical adjustment.
[0109] Binocular external parameter calibration
[0110] The binocular microscopic system needs to ensure that the optical axes of the two cameras are about 60° apart. Take a reference system, and the calibration target of the binocular microscopic system is to obtain the external parameters T L ,T R of the left and right cameras (including rotation matrix R L ,R R and translation vector t L ,tR ), and the relative poses of the two cameras are calculated by the external parameters, finally satisfying the system constraints such as the optical axis angle and the baseline direction.
[0111] 1. Data acquisition and feature extraction: A high-precision checkerboard calibration plate is used, and the calibration plate is placed in the overlapping area of the binocular field of view. Multiple images are collected to ensure the diversity of the posture of the calibration plate. The corner points of the two cameras in the calibration plate image are detected, and the corresponding relationship between the left and right cameras is established.
[0112] 2. Correspondence of left and right camera relationship: The checkerboard corner points in the left and right camera images are detected respectively to obtain the pixel coordinates:
[0113] The checkerboard corner points (feature points) are detected from the left camera to obtain their pixel coordinates (u i,L ,v i,L ),
[0114] The checkerboard corner points (feature points) are detected from the right camera to obtain their pixel coordinates (u i,R ,v i,R ), and the world coordinates of the checkerboard corner points (feature points) are known as (X w,i ,Y w,i ,Z w,i ).
[0115] 3. Definition of the external parameters T L ,T R of the left and right cameras:
[0116] The external parameters T L ,T R are both 4x4 homogeneous transformation matrices, and the form is as follows:
[0117] Wherein:
[0118] R L ,R R (3x3): rotation matrix of left and right cameras, describing the rotation of camera coordinate system relative to world coordinate system;
[0119] t L ,t R (3x1): translation vector of left and right cameras, describing the translation of camera coordinate system origin relative to world coordinate system origin
[0120] T L : left camera external parameter, transformation from itself to world coordinate system, and the initial value can be simplified as a unit matrix.
[0121] T R : right camera external parameter, transformation of right camera coordinate system relative to world coordinate system, which contains the relative rotation and translation between left and right cameras.
[0122] 4、Extrinsic and coordinate transformation relationship:
[0123] The core role of extrinsic is to realize the conversion of three-dimensional points from the world coordinate system to the camera coordinate system:
[0124] Suppose the point P L (u i,L ,v i,L ) in the left camera coordinate system and the point P R (u i,R ,v i,R ) in the right camera coordinate system, and then according to the world coordinate system P c (X i,W ,Y i,W ,Z i,W ) of the feature point pose of the calibration board. Extrinsic T L ,T R are both 4x4 homogeneous transformation matrices (including rotation R L ,R R and translation t L ,t R ), which satisfy the relationship:
[0125] P L =T L *P c (three-dimensional coordinates in the left camera coordinate system)
[0126] P R =T R *P c (three-dimensional coordinates in the right camera coordinate system)
[0127] In the orthogonal projection model, the final requirement is the two-dimensional pixel coordinates, which are extracted by the projection matrix (ignoring the Z-axis degree of freedom) of the XY plane coordinates, and the projection matrix (2x4 matrix) is introduced into the above formula:
[0128] And
[0129] Substitute into it to get:
[0130]
[0131] Substitute P L ,P R ,P C coordinates to get:
[0132]
[0133] 5、Extrinsic equation
[0134] (1) Solution Basis: Using the characteristic points of the chessboard calibration board, and through the known world coordinates P c and the detected left and right camera pixel coordinates P L and P R Based on the above projection matrix relationships, a system of equations is established:
[0135] (2) Left camera external parameter T L The equation is: For each feature point, formula (1) expands to:
[0136] u i,L =R L [1,1]·X i,w +R L [1,2]·Y i,w +R L [1,3]·Z i,w +t L [1]…………Formula (3)
[0137] v i,L =R L [2,1]·X i,w +R L [2,2]·Y i,w +R L [2,3]·Z i,w +t L [2]…………Formula (4)
[0138] Among them, R L [a,b] represents the element in the a-th row and b-th column of the rotation matrix, t L [1],t L [2] is the translation vector t L In the X and Y components
[0139] (3) Right camera external parameter T R The equation is: For each feature point, formula (2) expands to:
[0140] u i,R =R R [1,1]·X i,w +R R [1,2]·Y i,w +R R [1,3]·Z i,w +t R [1]…………Formula (5)
[0141] v i,R =R R [2,1]·X i,w +R R[2,2]·Y i,w +R R [2,3]·Z i,w +t R [2] … … Equation (6)
[0142] where R R [a,b] represents the element of the rotation matrix in the a-th row and the b-th column, t R [1], t R [2] are translation vectors t R In the X, Y components
[0143] 6. External parameter solving:
[0144] (1) Constraint condition:
[0145] Optical axis angle: the optical axis angle of left and right cameras is 60°, which is constrained by the rotation matrix R,
[0146] Baseline direction: the translation vector t should be along the X direction of the imaging plane and perpendicular to the optical axis Z direction, which is simplified as: t = (t x , 0, 0), which ensures that the parallax is only generated by the X direction translation.
[0147] (2) Initial value estimation
[0148] In order to meet the accuracy requirements of the binocular microscopic system, the initial external parameters need to be estimated (simplified model):
[0149] ① The initial value of the left camera T L0
[0150] Taking the left camera coordinate system as the world coordinate system, O w = O L , so the initial value of the left camera external parameter T L can be simplified as the unit matrix i: the rotation matrix R L0 = I, and the translation vector t L0 = [0, 0, 0] T , that is
[0151] ② The initial value of the right camera T R0
[0152] According to the optical axis angle constraint of 60°, it is assumed that the rotation around the Y axis is 60°, that is:
[0153]
[0154] The initial value of the translation vector t R0 : the baseline is along the X direction, t R0 = (t x , 0, 0) (t x(Roughly estimated from the parallax of the left and right cameras)
[0155] (3) Nonlinear optimization (LM algorithm):
[0156] By setting the initial external parameter t L0 ,T R0 T was obtained by iterative calculation using the Levenberg-Marquardt (LM) algorithm. L ,T R That is, optimizing T L ,T R :
[0157]
[0158] (4) Relative pose relationship
[0159] Optimization yields T L ,T R Then, the relative poses of the left and right cameras (i.e., the transformation of the right camera relative to the left camera) can be obtained through the inverse operation of the transformation matrix:
[0160]
[0161] Among them, T L→R : Pose transformation matrix of the right camera relative to the left camera (4×4 homogeneous matrix)
[0162] Left camera extrinsic matrix T L The inverse matrix,
[0163] T R The extrinsic parameter matrix (4×4 homogeneous matrix) of the right camera represents the transformation from the right camera coordinate system to the world coordinate system.
[0164] R: Relative rotation matrix (3×3), describing the rotation relationship of the right camera relative to the left camera.
[0165] The left camera rotation matrix R L The inverse matrix R
[0166] t: Relative translation vector (3×1), describing the translation relationship of the right camera relative to the left camera, derived from... It is a relative translation vector, reflecting the spatial attitude relationship between the two cameras.
[0167] System error verification and iterative optimization
[0168] After calibration, the accuracy needs to be verified through 3D measurement, and the parameters need to be iteratively optimized.
[0169] 1. Verification principle:
[0170] Use a standard piece with known physical size (step gauge) to verify the absolute accuracy of the three-dimensional measurement of the system. The parameters such as step height and plane spacing of the step gauge are precisely calibrated and can be used as "true value" to compare with the system calculation results.
[0171] 2. Operation steps:
[0172] (1) Place the step gauge in the overlapping area of the binocular field of view to ensure that each step surface is clearly imaged on the left and right cameras.
[0173] (2) Use the calibrated binocular external parameters (T L ,T R ) and monocular internal parameters (k y ,k y ,X 0, Y0) to calculate the three-dimensional coordinates of the feature points (such as step edges) on the step gauge through binocular stereo matching.
[0174] (3) Calculate the three-dimensional coordinates of the step gauge through the binocular microscopic system, calculate the deviation between the measured value and the actual size of the standard piece, and require the error to be <1 μm.
[0175] 3. Iterative optimization:
[0176] If the verification error exceeds the threshold value, the binocular external parameters or monocular internal parameters need to be adjusted to form an iterative closed loop.
[0177] 4. The final calibration parameters need to be saved:
[0178] (1) Monocular parameters: scaling factors k x ,k y , principal points (X 0, Y0) of the left and right cameras
[0179] (2) Binocular parameters: binocular camera external parameters T L ,T R .
[0180] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed by the present application can be easily thought of by those skilled in the art, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A high-precision calibration method for a binocular microscope using an orthogonal projection model, characterized in that, include: Images of the calibration plate at different tilt angles are acquired. The radial distortion coefficients (K1, K2) and tangential distortion coefficients (P1, P2) are estimated based on the distortion model of Zhang's calibration method. The images are then distorted to obtain the distorted images. Based on the distortion-corrected image, feature points on the calibration board are detected, and their pixel coordinates and corresponding world coordinates are obtained. Monocular intrinsic parameters, including scaling factors (k) in the X and Y axes, are then fitted using linear least squares. x k γ And the principal point parameters (X0, Y0); Based on the aforementioned monocular intrinsic parameters, multiple sets of images of the calibration board in the binocular field of view overlap area are acquired, the correspondence between feature points of the left and right cameras is established, and the extrinsic parameters (T) of the left and right cameras are solved by combining the optical axis angle constraint and baseline direction constraint. L T R ), where the extrinsic parameters include the rotation matrix (R). L R R Translation vector (t) L , t R ); Based on the above monocular intrinsic and binocular extrinsic parameters, the LM algorithm is used for joint optimization to minimize the projection error of pixel coordinates; Based on the optimized internal and external parameters, the system measurement accuracy is verified using standard parts. If the error is ≥1μm, the internal and external parameters are adjusted and re-optimized until the error is <1μm, thus completing the calibration.
2. The method according to claim 1, characterized in that, The calculation model for the radial distortion coefficients (K1, K2) is as follows: Where (x,y) are the normalized, distortion-free coordinates, (x... j ,y j ) represents the distorted coordinates, K1 and K2 are the radial distortion coefficients, and r 2 =x 2 +y 2 ; The calculation model for the tangential distortion coefficients (P1, P2) is as follows:
3. The method according to claim 2, characterized in that, The calibration board is a high-precision checkerboard calibration board with a corner point positioning accuracy of 0.05-0.1 pixels; the feature points are the corner points of the checkerboard.
4. The method according to claim 2, characterized in that, The relationship for the linear least squares fitting is: Among them, (u i v i (X) represents the pixel coordinates of the feature point. w i, Y w ,i) represents the world coordinates of the feature point.
5. The method according to claim 1, characterized in that, The optical axis angle constraint is as follows: the optical axis angle between the left and right cameras is 60°, and the optical axis direction vectors of the left and right targets are... and satisfy:
6. The method according to claim 5, characterized in that, The external parameter (T) L T R ) is a 4×4 homogeneous transformation matrix. Among them, R L ,R R (3x3) is the rotation matrix for the left and right cameras, describing the rotation of the camera coordinate system relative to the world coordinate system, t L ,t R (3x1) represents the translation vectors of the left and right cameras, describing the translation of the camera coordinate system origin relative to the world coordinate system origin. L For the extrinsic parameters of the left camera, the transformation from itself to the world coordinate system is simplified to the identity matrix, T. R The extrinsic parameter of the right camera is the transformation of the right camera coordinate system relative to the world coordinate system, which includes the relative rotation and translation between the left and right cameras.
7. The method according to claim 6, characterized in that, The optimization objective of the LM algorithm is to optimize T. L ,T R The following errors apply: Among them, P C Let P be the world coordinates of the feature point. L P R These are the pixel coordinates of the feature points of the left and right cameras, respectively.
8. The method according to claim 1, characterized in that, The standard component is a step ruler. The accuracy is verified by calculating the deviation between the three-dimensional coordinate measurement values of the feature points of the step ruler and the actual size.
9. The method according to claim 1, characterized in that, The correspondence between the feature points of the left and right cameras is determined by matching the pixel coordinates P of the checkerboard corner points in the left and right camera images. L (u i,L ,v i,L ) and P R (u i,R ,v i,R Establishment, and the world coordinates of the feature points are P. c (X i,W ,Y i,W Z i,W ).
10. A binocular microscope system, characterized in that, include: Dual-eye path module: Includes two eyepieces, a prism and a high-magnification objective lens, used to form a beam and provide stereo vision; Light source: LED light source, brightness adjustable, used to provide imaging light; Precision stage: Placed on a vibration-damping platform, used to fix calibration plates or standard parts, and can be rotated or translated; Focusing system: includes coarse focusing mechanism and fine focusing mechanism, used to adjust the distance between the objective lens and the sample; Image imaging module: contains two symmetrically arranged cameras, parallel to the eyepiece, used to convert optical images into digital signals; Computational processing unit: used to implement the method described in any one of claims 1-9.