Camera mirror image calibration method and system
By applying the Scheimpflug principle and intelligent calibration algorithm in the camera, combined with an automated calibration system, the problem of complex adjustment and unstable effect in mirror reflection scenes is solved, and high-quality and consistent image capture is achieved.
Patent Information
- Application Number
- CN202411797533.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-25
AI Technical Summary
The adjustment process of traditional cameras in mirror-reflecting scenes is complicated and the effect is unstable, making it difficult to ensure the clarity and consistency of the image.
Using the Scheimpflug principle, the clarity and consistency of the image is ensured by adjusting the position and angle of the camera and mirror. Combining intelligent calibration algorithms and automated calibration systems, real-time monitoring and adjustment of images are achieved.
Significantly improves the clarity of captured images through mirror reflection, ensuring that every part of the image is clearly focused, improving the quality and consistency of image capture, simplifying the adjustment process and improving efficiency.
Smart Images

Figure CN119697495A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera calibration, and in particular to a camera mirror calibration method and system. Background Art
[0002] In many camera applications, especially in scenes where images need to be captured through mirror reflection, ensuring that the camera can focus correctly and obtain a clear image is a technical challenge. Traditional adjustment methods often rely on experience, lack of systematicity and scientificity, resulting in a complex adjustment process and unstable results. Reference is made to a telecentric lens, camera and detection equipment with Chinese patent publication number CN221101137U and a projector calibration method based on Sham's law with Chinese patent publication number CN113160339B. Among them, the projector calibration method based on Sham's law in CN113160339B improves the calibration accuracy and imaging quality of the projector by means of bidirectional multi-frequency multi-step phase shift method, imaging model construction, two-step calibration method and LM algorithm optimization, thereby solving the problems of projector calibration and imaging quality. Summary of the invention
[0003] The present invention solves the problem that the traditional adjustment process is complicated and the effect is unstable in the scene where images are captured by mirror reflection, and proposes a camera mirror calibration method and system, which uses the reflection principle of the mirror in combination with the camera to ensure the clarity and consistency of the image, and realizes image calibration and quality detection through tilt and position adjustment based on the Scheimpflug principle.
[0004] In order to achieve the above objectives, the following technical solutions are proposed: A camera mirror calibration method comprises the following steps: S1, obtain the position and angle of the mirror and camera; S2, adjusting the relative positions of the mirror and the camera until the mirror text plane, the lens plane and the sensor plane intersect at one point; S3, use the laser aligner to adjust the position of the mirror and camera, and monitor the image output by the camera in real time until a clear image is obtained.
[0005] The present invention monitors the image output by the camera in real time and adjusts the tilt and offset of the camera until the text in the image is clearly visible and there is no out-of-focus phenomenon. Based on the Scheimpflug principle, the present invention ensures that the image reflected by the mirror into the camera can remain clear by adjusting the position and angle of the camera and the mirror, thereby improving the quality and consistency of image capture.
[0006] As a preference, the method comprises the following steps: S4, using the intelligent calibration algorithm to determine whether the acquired image is clear, if so, the position adjustment of the mirror and the camera is completed, if not, the position of the mirror and the camera is adjusted according to the image clarity and the image focus position.
[0007] Preferably, the specific process of the intelligent calibration algorithm to determine whether the acquired image is clear is as follows: S41, preprocessing the image; S42, performing edge detection on the preprocessed image to extract edge information; S43, obtaining a text area in the image and identifying edges of the text; S44, using an image sharpness function to obtain the clarity of the image, if the clarity of the image reaches a set value, the image is considered to be clear.
[0008] The detailed process of judging whether the acquired image is clear is as follows: S41, image acquisition: the camera acquires the image reflected by the mirror, and the system pre-processes the image to remove noise and enhance contrast; S42, edge detection: Use classic edge detection algorithms such as the Canny operator to extract edge information in the image. At this time, the system will detect areas with high gradient changes in the image, and the edge detection results will be used for subsequent focus analysis; S43, text area recognition: The system automatically detects the text area in the image through the OCR (optical character recognition) algorithm. This process includes locating the text area in the reflected image and identifying the edges of the text. The recognized text area will be further used to adjust the focus position during the calibration process; S44, image clarity analysis: Use image sharpness functions, such as Laplacian transformation function, to evaluate the clarity of the image. The clearer the image, the higher the sharpness value; conversely, the blurry image has a lower sharpness value. Based on the clarity analysis results, the system determines whether the current camera is in focus. At this time, the focus judgment is based on the clarity score of the entire image or key areas (such as text areas); S45, focus adjustment: When the system detects that the text or edges in the image are blurred, the focus module of the camera is automatically triggered to adjust the relative position and angle between the camera and the mirror. The system continuously collects images and performs clarity analysis to gradually optimize the focal length and position of the camera until every part of the image can be clearly focused. It is determined whether the sharpness and focus of the recognized image meet the preset standards. If not, the image is considered to be unclear. If so, the image is considered to be clear. When the system recognizes that the sharpness and focus of the image meet the preset standards, the algorithm stops adjusting and saves the current camera configuration parameters. The present invention develops an intelligent calibration algorithm that uses image processing technology to automatically detect and identify text and edges in reflected images. The algorithm analyzes the image clarity and focus position and automatically adjusts the relative position of the camera and the mirror. Combined with machine learning technology, the calibration parameters are gradually optimized to improve calibration accuracy and efficiency.
[0009] Preferably, the specific steps of determining whether the acquired image is clear are as follows: determining whether the sharpness and focus of the recognized image meet preset standards, if so, the image is considered clear, if not, the image is considered unclear.
[0010] Preferably, the edge detection uses the Canny operator.
[0011] Preferably, the S43 specifically adopts an optical character recognition algorithm to locate the text area and recognize the text edge.
[0012] Preferably, the image sharpness function adopts a Laplacian transformation function.
[0013] Preferably, when the mirror is fixed, S2 specifically includes the following steps: S201, aiming the camera at the text area reflected by the mirror; S202, adjusting the tilt angle of the camera so that the lens plane is substantially parallel to the sensor plane; S203, calibrating the tilt angle and vertical angle of the camera until the mirror text plane, the lens plane and the sensor plane intersect at one point.
[0014] In the present invention, in front of a mirror with a fixed position, the S2 specifically includes the following steps: S201, adjusting the camera to aim at the text area reflected by the mirror; S202, preliminarily adjusting the tilt angle of the camera so that the sensor plane of the camera is substantially parallel to the lens plane; S203, by fine-tuning the tilt angle and vertical angle of the camera, ensure that the intersection point of the three planes of the Scheimpflug principle is formed, that is, ensure that the text plane, the lens plane and the sensor plane intersect at one point.
[0015] Preferably, when the mirror moves, S2 specifically includes the following steps: S211, fix the position of the camera; S212, adjusting the angle of the mirror so that the text image reflected by the mirror enters the field of view of the camera; S213, accurately measure and adjust the tilt angle and position of the mirror; S214, calibrating the tilt angle of the camera until the mirror text plane, the lens plane and the sensor plane intersect at one point.
[0016] The present invention is in a movable mirror system, and S2 specifically comprises the following steps: S211, first fix the position of the camera; S212, then adjusting the angle of the mirror so that the text image reflected by the mirror can enter the field of view of the camera; S213, use a laser aligner or ruler to accurately measure and adjust the tilt angle and position of the mirror; S214, calibrating the tilt angle of the camera to ensure that the intersection point of the three planes of the Scheimpflug principle is formed, that is, ensuring that the text plane, the lens plane and the sensor plane intersect at one point.
[0017] A camera mirror calibration system, applicable to the above-mentioned camera mirror calibration method, comprising: A stepper motor with a built-in gyroscope and accelerometer to control the movement of the camera; Mechanical gripper to control the tilt angle of the camera; The computer control module obtains the image taken by the camera to judge the clarity, controls the operation of the stepper motor and the mechanical gripper according to the clarity, and controls the movement and tilt angle of the camera.
[0018] The present invention realizes automatic adjustment of the position and angle of the camera and the mirror by installing a stepper motor and a sensor, monitors and feedbacks the image clarity in real time through a computer control module, presets multiple calibration programs, is applicable to different application scenarios, and realizes rapid calibration. The present invention automatically adjusts the translation, tilt and rotation angles of the camera to ensure that the text and edge areas are located in the best position in the image. By dynamically calculating the relative angle and position of the camera and the mirror, the system can provide real-time feedback and make adjustments to ensure image clarity in different scenarios.
[0019] The beneficial effects of the present invention are: it can significantly improve the clarity of images captured by mirror reflection. By adopting the Scheimpflug principle, it is ensured that every part of the image can be in focus, and it is applicable to a variety of scenes that require imaging through mirror reflection. The use of auxiliary tools makes the adjustment process more accurate and simple. The application of the automated calibration system and the intelligent calibration algorithm further improves the efficiency and accuracy of the calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a schematic diagram of the position relationship between the mirror and the camera of the present invention.
[0021] Figure 2 This is a schematic diagram of the Scheimpflug principle. DETAILED DESCRIPTION
[0022] Embodiment 1: This embodiment provides a camera mirror calibration method, comprising the following steps: S1, first obtain the position and relative angle of the mirror and camera. Determine the position and angle of the mirror so that the text can be reflected by the mirror to the camera. Figure 1 , the angle θ between the mirror plane and the horizontal plane is equal to the angle between the mirror plane and the text plane. According to the law of reflection of light, the angle between the mirror text plane and the mirror plane is equal to θ.
[0023] S2, according to the acquired positions and relative angles of the mirror and the camera, adjusting the relative positions of the camera and the mirror so that the lens plane, the sensor plane and the mirror text plane intersect at one point to realize the Scheimpflug principle; According to the Scheimpflug principle, the focus plane (the plane where the point that can be clearly imaged is located, or called the object plane), the lens plane, and the imaging plane all intersect on a straight line. The plane diagram is referenced Figure 2 In the plane diagram, the three red dotted lines represent three planes. These three straight lines intersect at the same point. Under normal circumstances, the lens plane is parallel to the imaging plane, and the focus plane is also parallel to the lens plane, so the front and rear limits of the depth of field range are naturally parallel to the lens plane. When the lens is not parallel to the imaging plane, the focus plane, lens plane, and imaging plane intersect at the same point, and the front and rear limits of the depth of field range will also intersect at the same point, so the depth of field range is a wedge-shaped space. Using this principle, adjust the tilt angle of the camera so that the camera's sensor plane, lens plane, and reflected text plane intersect at one point.
[0024] According to the Sham principle, the lens plane, sensor plane and object plane (in this case, the plane reflecting the text) must intersect at one point to ensure that the entire image is in sharp focus. Figure 1 , the following is the Sham angle estimation formula: β=arctan(χ·tan(α)) Wherein: α is the angle between the object plane and the mirror plane. In the present invention, since the virtual image obtained in the camera is reflected, the angle between the mirror text plane and the mirror plane is equal to α; the angle between the text plane and the sensor plane is γ, the angle between the mirror plane and the horizontal plane is θ, and β is the inclination angle of the lens plane relative to the sensor plane.
[0025] π-γ-α=2θ+β χ is the ratio of focal lengths, χ=f / f', where f is the object distance and f' is the image distance.
[0026] According to the lens formula: the object distance and image distance have the following relationship: f is the object distance, f′ is the image distance, and F is the focal length of the lens.
[0027] The focal length F of the lens and the object distance f can be used to calculate the image distance f′.
[0028] The Sham angle estimation formula can be transformed into: By determining the angle γ between the text plane and the sensor plane, the angle θ between the mirror plane and the horizontal plane, the focal length F of the lens and the distance f from the object to the lens, the angle β at which the lens plane is tilted relative to the sensor plane can be calculated using Newton's method or the bisection method.
[0029]
[0030] Adjust the camera's pan position: pan the camera so that it is aimed at the text area reflected by the mirror.
[0031] The translation distance can be calculated by the following formula: x=d o tan(β) Where: x is the translation distance of the camera, β is the angle of the mirror relative to the camera.
[0032] S3, monitor the image output by the camera in real time, and use a laser aligner or a ruler to adjust the position of the camera and the mirror until the camera outputs a clear image.
[0033] S4, using the intelligent calibration algorithm to determine whether the acquired image is clear, if not, adjusting the position of the camera and the mirror according to the image focus position and the image clarity, if yes, the position adjustment of the camera and the mirror is completed. The detailed process of the present invention for determining whether the acquired image is clear is as follows: S41, image acquisition: the camera acquires the image reflected by the mirror, and the system pre-processes the image to remove noise and enhance contrast; S42, edge detection: Use classic edge detection algorithms such as the Canny operator to extract edge information in the image. At this time, the system will detect areas with high gradient changes in the image, and the edge detection results will be used for subsequent focus analysis; S43, text area recognition: The system automatically detects the text area in the image through the OCR (optical character recognition) algorithm. This process includes locating the text area in the reflected image and identifying the edges of the text. The recognized text area will be further used to adjust the focus position during the calibration process; S44, image clarity analysis: Use image sharpness functions, such as Laplacian transformation function, to evaluate the clarity of the image. The clearer the image, the higher the sharpness value; conversely, the blurry image has a lower sharpness value. Based on the clarity analysis results, the system determines whether the current camera is in focus. At this time, the focus judgment is based on the clarity score of the entire image or key areas (such as text areas); S45, focus adjustment: When the system detects that the text or edges in the image are blurred, the focus module of the camera is automatically triggered to adjust the relative position and angle between the camera and the mirror. The system continuously collects images and performs clarity analysis to gradually optimize the focal length and position of the camera until every part of the image can be clearly focused. It is determined whether the sharpness and focus of the recognized image meet the preset standards. If not, the image is considered to be unclear. If so, the image is considered to be clear. When the system recognizes that the sharpness and focus of the image meet the preset standards, the algorithm stops adjusting and saves the current camera configuration parameters. The present invention develops an intelligent calibration algorithm that uses image processing technology to automatically detect and identify text and edges in reflected images. The algorithm analyzes the image clarity and focus position and automatically adjusts the relative position of the camera and the mirror. Combined with machine learning technology, the calibration parameters are gradually optimized to improve calibration accuracy and efficiency.
[0034] The present invention monitors the image output by the camera in real time and adjusts the tilt and offset of the camera until the text in the image is clearly visible and there is no out-of-focus phenomenon. Based on the Scheimpflug principle, the present invention ensures that the image reflected by the mirror into the camera can remain clear by adjusting the position and angle of the camera and the mirror, thereby improving the quality and consistency of image capture.
[0035] The main difference from CN221101137U is that the core innovation of the present invention is to use the reflection principle of the mirror in combination with the camera to ensure the clarity and consistency of the image. This is fundamentally different from the configuration of optical elements in the traditional telecentric lens design.
[0036] The main difference from CN113160339B is: the application fields are different. The present invention is mainly used for camera image calibration and image quality improvement under different lighting environments. A projector calibration method based on Scham's law is mainly used in the field of 3D structured light measurement to solve the problems of projector calibration and imaging quality. The technical means are different. The method based on the Scheimpflug principle of the present invention realizes image calibration and quality detection through tilt and position adjustment. A projector calibration method based on Scham's law improves the calibration accuracy and imaging quality of the projector by means of bidirectional multi-frequency multi-step phase shift method, imaging model construction, two-step calibration method and LM algorithm optimization.
[0037] This embodiment also proposes a camera mirror calibration system, which adopts the above-mentioned camera mirror calibration method. First, a horizontal light source board is built, which provides uniform and stable lighting to ensure the clear display of the target chart. The specially designed chart has a focal length ratio χ (χ=f / f', f is the object distance, f' is the image distance), which can accurately reflect the resolution and sharpness distribution of each area of the image, so as to analyze the imaging effect, and then a high-precision stepper motor with a gyroscope and an acceleration sensor is installed on the camera adjustment platform to accurately control the movement and angle of the camera. The stepper motor can sense the tilt angle and moving speed of the camera in real time, ensure that the camera stably reaches the preset optimal imaging position, and automatically tilts to the optimal angle that meets the Sham principle. Driven by the stepper motor, the photosensitive chip platform (CMOS or CCD sensor) of the camera is accurately moved to the target focus position. The sensor feeds back angle and position information in real time to ensure that the platform is adjusted to the target angle. The combination of the gyroscope and the acceleration sensor ensures the stability during the adjustment process and avoids the influence of jitter or offset on the imaging quality. This system uses a mechanical gripper to automatically adjust the tilt angle of the lens, ensuring that the lens and sensor angles are adjusted to the optimal "Sham angle" according to the Sham principle, so that the lens, sensor and object plane intersect at the same point. The computer control module is electrically connected to the stepper motor and the mechanical gripper, and obtains the image taken by the camera for clarity judgment, and then controls the mechanical gripper and stepper motor to work according to the clarity, and controls the movement and tilt angle of the camera. This system uses image sharpness analysis software to monitor and adjust the imaging effect in real time to ensure that the image sharpness of each area reaches the set threshold. After the lens and sensor angles are adjusted, they are fixed with a special fast-curing glue to ensure that the adjusted relative position is maintained for a long time, improving the stability and durability of the system. The high strength and durability of the glue ensure the long-term reliability of the system in high-precision imaging applications.
[0038] The present invention realizes automatic adjustment of the position and angle of the camera and the mirror by installing a stepper motor and a sensor, monitors and feedbacks the image clarity in real time through a computer control module, presets multiple calibration programs, is applicable to different application scenarios, and realizes rapid calibration. The present invention automatically adjusts the translation, tilt and rotation angles of the camera to ensure that the text and edge areas are located in the best position in the image. By dynamically calculating the relative angle and position of the camera and the mirror, the system can provide real-time feedback and make adjustments to ensure image clarity in different scenarios.
[0039] Embodiment 2: This embodiment optimizes S2 on the basis of embodiment 1 and proposes a camera mirror calibration method, comprising the following steps: S1, first obtain the position and relative angle of the mirror and the camera. Determine the position and angle of the mirror so that the text can be reflected into the camera through the mirror. Figure 1 , the angle θ between the mirror plane and the horizontal plane is equal to the angle between the mirror plane and the text plane. According to the law of reflection of light, the angle between the mirror text plane and the mirror plane is equal to θ.
[0040] S2, according to the acquired positions and relative angles of the mirror and the camera, adjusting the relative positions of the camera and the mirror so that the lens plane, the sensor plane and the mirror text plane intersect at one point to realize the Scheimpflug principle; In the present invention, in front of a mirror with a fixed position, the S2 specifically includes the following steps: S201, adjusting the camera to aim at the text area reflected by the mirror; S202, preliminarily adjusting the tilt angle of the camera so that the sensor plane of the camera is substantially parallel to the lens plane; S203, by fine-tuning the tilt angle and vertical angle of the camera, ensure that the intersection point of the three planes of the Scheimpflug principle is formed, that is, ensure that the text plane, the lens plane and the sensor plane intersect at one point.
[0041] According to the Scheimpflug principle, the focus plane (the plane where the point that can be clearly imaged is located, or called the object plane), the lens plane, and the imaging plane all intersect on a straight line. The plane diagram is referenced Figure 2In the plane diagram, the three red dotted lines represent three planes. These three straight lines intersect at the same point. Under normal circumstances, the lens plane is parallel to the imaging plane, and the focus plane is also parallel to the lens plane, so the front and rear limits of the depth of field range are naturally parallel to the lens plane. When the lens is not parallel to the imaging plane, the focus plane, lens plane, and imaging plane intersect at the same point, and the front and rear limits of the depth of field range will also intersect at the same point, so the depth of field range is a wedge-shaped space. Using this principle, adjust the tilt angle of the camera so that the camera's sensor plane, lens plane, and reflected text plane intersect at one point.
[0042] According to the Sham principle, the lens plane, sensor plane and object plane (in this case, the plane reflecting the text) must intersect at one point to ensure that the entire image is in sharp focus. Figure 1 , the following is the Sham angle estimation formula: β=arctan(χ·tan(α)) Wherein: α is the angle between the object plane and the mirror plane. In the present invention, since the virtual image obtained in the camera is reflected, the angle between the mirror text plane and the mirror plane is equal to α; the angle between the text plane and the sensor plane is γ, the angle between the mirror plane and the horizontal plane is θ, and β is the inclination angle of the lens plane relative to the sensor plane.
[0043] π-γ-α=2θ+β χ is the ratio of focal lengths, χ=f / f', where f is the object distance and f' is the image distance.
[0044] According to the lens formula: the object distance and image distance have the following relationship: f is the object distance, f′ is the image distance, and F is the focal length of the lens.
[0045] The focal length F of the lens and the object distance f can be used to calculate the image distance f′.
[0046] The Sham angle estimation formula can be transformed into: By determining the angle γ between the text plane and the sensor plane, the angle θ between the mirror plane and the horizontal plane, the focal length F of the lens and the distance f from the object to the lens, the angle β at which the lens plane is tilted relative to the sensor plane can be calculated using Newton's method or the bisection method.
[0047]
[0048] Adjust the camera's pan position: pan the camera so that it is aimed at the text area reflected by the mirror.
[0049] The translation distance can be calculated by the following formula: x=d o tan(β) Where: x is the translation distance of the camera, β is the angle of the mirror relative to the camera.
[0050] S3, monitor the image output by the camera in real time, and use a laser aligner or a ruler to adjust the position of the camera and the mirror until the camera outputs a clear image.
[0051] S4, using the intelligent calibration algorithm to determine whether the acquired image is clear, if not, adjusting the position of the camera and the mirror according to the image focus position and the image clarity, if yes, the position adjustment of the camera and the mirror is completed. The detailed process of the present invention for determining whether the acquired image is clear is as follows: S41, image acquisition: the camera acquires the image reflected by the mirror, and the system pre-processes the image to remove noise and enhance contrast; S42, edge detection: Use classic edge detection algorithms such as the Canny operator to extract edge information in the image. At this time, the system will detect areas with high gradient changes in the image, and the edge detection results will be used for subsequent focus analysis; S43, text area recognition: The system automatically detects the text area in the image through the OCR (optical character recognition) algorithm. This process includes locating the text area in the reflected image and identifying the edges of the text. The recognized text area will be further used to adjust the focus position during the calibration process; S44, image clarity analysis: Use image sharpness functions, such as Laplacian transformation function, to evaluate the clarity of the image. The clearer the image, the higher the sharpness value; conversely, the blurry image has a lower sharpness value. Based on the clarity analysis results, the system determines whether the current camera is in focus. At this time, the focus judgment is based on the clarity score of the entire image or key areas (such as text areas); S45, focus adjustment: When the system detects that the text or edges in the image are blurred, the focus module of the camera is automatically triggered to adjust the relative position and angle between the camera and the mirror. The system continuously collects images and performs clarity analysis to gradually optimize the focal length and position of the camera until every part of the image can be clearly focused. It is determined whether the sharpness and focus of the recognized image meet the preset standards. If not, the image is considered to be unclear. If so, the image is considered to be clear. When the system recognizes that the sharpness and focus of the image meet the preset standards, the algorithm stops adjusting and saves the current camera configuration parameters. The present invention develops an intelligent calibration algorithm that uses image processing technology to automatically detect and identify text and edges in reflected images. The algorithm analyzes the image clarity and focus position and automatically adjusts the relative position of the camera and the mirror. Combined with machine learning technology, the calibration parameters are gradually optimized to improve calibration accuracy and efficiency.
[0052] The present invention monitors the image output by the camera in real time and adjusts the tilt and offset of the camera until the text in the image is clearly visible and there is no out-of-focus phenomenon. Based on the Scheimpflug principle, the present invention ensures that the image reflected by the mirror into the camera can remain clear by adjusting the position and angle of the camera and the mirror, thereby improving the quality and consistency of image capture.
[0053] The main difference from CN221101137U is that the core innovation of the present invention is to use the reflection principle of the mirror in combination with the camera to ensure the clarity and consistency of the image. This is fundamentally different from the configuration of optical elements in the traditional telecentric lens design.
[0054] The main difference from CN113160339B is: the application fields are different. The present invention is mainly used for camera image calibration and image quality improvement under different lighting environments. A projector calibration method based on Scham's law is mainly used in the field of 3D structured light measurement to solve the problems of projector calibration and imaging quality. The technical means are different. The method based on the Scheimpflug principle of the present invention realizes image calibration and quality detection through tilt and position adjustment. A projector calibration method based on Scham's law improves the calibration accuracy and imaging quality of the projector by means of bidirectional multi-frequency multi-step phase shift method, imaging model construction, two-step calibration method and LM algorithm optimization.
[0055] This embodiment also proposes a camera mirror calibration system, which adopts the above-mentioned camera mirror calibration method. First, a horizontal light source board is built, which provides uniform and stable lighting to ensure the clear display of the target chart. The specially designed chart has a focal length ratio χ (χ=f / f', f is the object distance, f' is the image distance), which can accurately reflect the resolution and sharpness distribution of each area of the image, so as to analyze the imaging effect, and then a high-precision stepper motor with a gyroscope and an acceleration sensor is installed on the camera adjustment platform to accurately control the movement and angle of the camera. The stepper motor can sense the tilt angle and moving speed of the camera in real time, ensure that the camera stably reaches the preset optimal imaging position, and automatically tilts to the optimal angle that meets the Sham principle. Driven by the stepper motor, the photosensitive chip platform (CMOS or CCD sensor) of the camera is accurately moved to the target focus position. The sensor feeds back angle and position information in real time to ensure that the platform is adjusted to the target angle. The combination of the gyroscope and the acceleration sensor ensures the stability during the adjustment process and avoids the influence of jitter or offset on the imaging quality. This system uses a mechanical gripper to automatically adjust the tilt angle of the lens, ensuring that the lens and sensor angles are adjusted to the optimal "Sham angle" according to the Sham principle, so that the lens, sensor and object plane intersect at the same point. The computer control module is electrically connected to the stepper motor and the mechanical gripper, and obtains the image taken by the camera for clarity judgment, and then controls the mechanical gripper and stepper motor to work according to the clarity, and controls the movement and tilt angle of the camera. This system uses image sharpness analysis software to monitor and adjust the imaging effect in real time to ensure that the image sharpness of each area reaches the set threshold. After the lens and sensor angles are adjusted, they are fixed with a special fast-curing glue to ensure that the adjusted relative position is maintained for a long time, improving the stability and durability of the system. The high strength and durability of the glue ensure the long-term reliability of the system in high-precision imaging applications.
[0056] The present invention realizes automatic adjustment of the position and angle of the camera and the mirror by installing a stepper motor and a sensor, monitors and feedbacks the image clarity in real time through a computer control module, presets multiple calibration programs, is applicable to different application scenarios, and realizes rapid calibration. The present invention automatically adjusts the translation, tilt and rotation angles of the camera to ensure that the text and edge areas are located in the best position in the image. By dynamically calculating the relative angle and position of the camera and the mirror, the system can provide real-time feedback and make adjustments to ensure image clarity in different scenarios.
[0057] Embodiment 3: This embodiment optimizes S2 on the basis of embodiment 1 and proposes a camera mirror calibration method, comprising the following steps: S1, first obtain the position and relative angle of the mirror and the camera. Determine the position and angle of the mirror so that the text can be reflected into the camera through the mirror. Figure 1 , the angle θ between the mirror plane and the horizontal plane is equal to the angle between the mirror plane and the text plane. According to the law of reflection of light, the angle between the mirror text plane and the mirror plane is equal to θ.
[0058] S2, according to the acquired positions and relative angles of the mirror and the camera, adjusting the relative positions of the camera and the mirror so that the lens plane, the sensor plane and the mirror text plane intersect at one point to realize the Scheimpflug principle; in a movable mirror system of the present invention, S2 specifically includes the following steps: S211, first fix the position of the camera; S212, then adjusting the angle of the mirror so that the text image reflected by the mirror can enter the field of view of the camera; S213, use a laser aligner or ruler to accurately measure and adjust the tilt angle and position of the mirror; S214, calibrating the tilt angle of the camera to ensure that the intersection point of the three planes of the Scheimpflug principle is formed, that is, ensuring that the text plane, the lens plane and the sensor plane intersect at one point.
[0059] According to the Scheimpflug principle, the focus plane (the plane where the point that can be clearly imaged is located, or called the object plane), the lens plane, and the imaging plane all intersect on a straight line. The plane diagram is referenced Figure 2 In the plane diagram, the three red dotted lines represent three planes. These three straight lines intersect at the same point. Under normal circumstances, the lens plane is parallel to the imaging plane, and the focus plane is also parallel to the lens plane, so the front and rear limits of the depth of field range are naturally parallel to the lens plane. When the lens is not parallel to the imaging plane, the focus plane, lens plane, and imaging plane intersect at the same point, and the front and rear limits of the depth of field range will also intersect at the same point, so the depth of field range is a wedge-shaped space. Using this principle, adjust the tilt angle of the camera so that the camera's sensor plane, lens plane, and reflected text plane intersect at one point.
[0060] According to the Sham principle, the lens plane, sensor plane and object plane (in this case, the plane reflecting the text) must intersect at one point to ensure that the entire image is in sharp focus. Figure 1 , the following is the Sham angle estimation formula: β=arctan(x·tan(α)) Wherein: α is the angle between the object plane and the mirror plane. In the present invention, since the virtual image obtained in the camera is reflected, the angle between the mirror text plane and the mirror plane is equal to α; the angle between the text plane and the sensor plane is γ, the angle between the mirror plane and the horizontal plane is θ, and β is the inclination angle of the lens plane relative to the sensor plane.
[0061] π-γ-α=2θ+β χ is the ratio of focal lengths, χ=f / f', where f is the object distance and f' is the image distance.
[0062] According to the lens formula: the object distance and image distance have the following relationship: f is the object distance, f′ is the image distance, and F is the focal length of the lens.
[0063] The focal length F of the lens and the object distance f can be used to calculate the image distance f′.
[0064] The Sham angle estimation formula can be transformed into: By determining the angle γ between the text plane and the sensor plane, the angle θ between the mirror plane and the horizontal plane, the focal length F of the lens and the distance f from the object to the lens, the angle β at which the lens plane is tilted relative to the sensor plane can be calculated using Newton's method or the bisection method.
[0065]
[0066] Adjust the camera's pan position: pan the camera so that it is aimed at the text area reflected by the mirror.
[0067] The translation distance can be calculated by the following formula: x=d o tan(β) Where: x is the translation distance of the camera, β is the angle of the mirror relative to the camera.
[0068] S3, monitor the image output by the camera in real time, and use a laser aligner or a ruler to adjust the position of the camera and the mirror until the camera outputs a clear image.
[0069] S4, using the intelligent calibration algorithm to determine whether the acquired image is clear, if not, adjusting the position of the camera and the mirror according to the image focus position and the image clarity, if yes, the position adjustment of the camera and the mirror is completed. The detailed process of the present invention for determining whether the acquired image is clear is as follows: S41, image acquisition: the camera acquires the image reflected by the mirror, and the system pre-processes the image to remove noise and enhance contrast; S42, edge detection: Use classic edge detection algorithms such as the Canny operator to extract edge information in the image. At this time, the system will detect areas with high gradient changes in the image, and the edge detection results will be used for subsequent focus analysis; S43, text area recognition: The system automatically detects the text area in the image through the OCR (optical character recognition) algorithm. This process includes locating the text area in the reflected image and identifying the edges of the text. The recognized text area will be further used to adjust the focus position during the calibration process; S44, image clarity analysis: Use image sharpness functions, such as Laplacian transformation function, to evaluate the clarity of the image. The clearer the image, the higher the sharpness value; conversely, the blurry image has a lower sharpness value. Based on the clarity analysis results, the system determines whether the current camera is in focus. At this time, the focus judgment is based on the clarity score of the entire image or key areas (such as text areas); S45, focus adjustment: When the system detects that the text or edges in the image are blurred, the focus module of the camera is automatically triggered to adjust the relative position and angle between the camera and the mirror. The system continuously collects images and performs clarity analysis to gradually optimize the focal length and position of the camera until every part of the image can be clearly focused. It is determined whether the sharpness and focus of the recognized image meet the preset standards. If not, the image is considered to be unclear. If so, the image is considered to be clear. When the system recognizes that the sharpness and focus of the image meet the preset standards, the algorithm stops adjusting and saves the current camera configuration parameters. The present invention develops an intelligent calibration algorithm that uses image processing technology to automatically detect and identify text and edges in reflected images. The algorithm analyzes the image clarity and focus position and automatically adjusts the relative position of the camera and the mirror. Combined with machine learning technology, the calibration parameters are gradually optimized to improve calibration accuracy and efficiency.
[0070] The present invention monitors the image output by the camera in real time and adjusts the tilt and offset of the camera until the text in the image is clearly visible and there is no out-of-focus phenomenon. Based on the Scheimpflug principle, the present invention ensures that the image reflected by the mirror into the camera can remain clear by adjusting the position and angle of the camera and the mirror, thereby improving the quality and consistency of image capture.
[0071] The main difference from CN221101137U is that the core innovation of the present invention is to use the reflection principle of the mirror in combination with the camera to ensure the clarity and consistency of the image. This is fundamentally different from the configuration of optical elements in the traditional telecentric lens design.
[0072] The main difference from CN113160339B is: the application fields are different. The present invention is mainly used for camera image calibration and image quality improvement under different lighting environments. A projector calibration method based on Scham's law is mainly used in the field of 3D structured light measurement to solve the problems of projector calibration and imaging quality. The technical means are different. The method based on the Scheimpflug principle of the present invention realizes image calibration and quality detection through tilt and position adjustment. A projector calibration method based on Scham's law improves the calibration accuracy and imaging quality of the projector by means of bidirectional multi-frequency multi-step phase shift method, imaging model construction, two-step calibration method and LM algorithm optimization.
[0073] This embodiment also proposes a camera mirror calibration system, which adopts the above-mentioned camera mirror calibration method. First, a horizontal light source board is built, which provides uniform and stable lighting to ensure the clear display of the target chart. The specially designed chart has a focal length ratio χ (χ=f / f', f is the object distance, f' is the image distance), which can accurately reflect the resolution and sharpness distribution of each area of the image, so as to analyze the imaging effect, and then a high-precision stepper motor with a gyroscope and an acceleration sensor is installed on the camera adjustment platform to accurately control the movement and angle of the camera. The stepper motor can sense the tilt angle and moving speed of the camera in real time, ensure that the camera stably reaches the preset optimal imaging position, and automatically tilts to the optimal angle that meets the Sham principle. Driven by the stepper motor, the photosensitive chip platform (CMOS or CCD sensor) of the camera is accurately moved to the target focus position. The sensor feeds back angle and position information in real time to ensure that the platform is adjusted to the target angle. The combination of the gyroscope and the acceleration sensor ensures the stability during the adjustment process and avoids the influence of jitter or offset on the imaging quality. This system uses a mechanical gripper to automatically adjust the tilt angle of the lens, ensuring that the lens and sensor angles are adjusted to the optimal "Sham angle" according to the Sham principle, so that the lens, sensor and object plane intersect at the same point. The computer control module is electrically connected to the stepper motor and the mechanical gripper, and obtains the image taken by the camera for clarity judgment, and then controls the mechanical gripper and stepper motor to work according to the clarity, and controls the movement and tilt angle of the camera. This system uses image sharpness analysis software to monitor and adjust the imaging effect in real time to ensure that the image sharpness of each area reaches the set threshold. After the lens and sensor angles are adjusted, they are fixed with a special fast-curing glue to ensure that the adjusted relative position is maintained for a long time, improving the stability and durability of the system. The high strength and durability of the glue ensure the long-term reliability of the system in high-precision imaging applications.
[0074] The present invention realizes automatic adjustment of the position and angle of the camera and the mirror by installing a stepper motor and a sensor, monitors and feedbacks the image clarity in real time through a computer control module, presets multiple calibration programs, is applicable to different application scenarios, and realizes rapid calibration. The present invention automatically adjusts the translation, tilt and rotation angles of the camera to ensure that the text and edge areas are located in the best position in the image. By dynamically calculating the relative angle and position of the camera and the mirror, the system can provide real-time feedback and make adjustments to ensure image clarity in different scenarios.
Claims
1. A camera mirror calibration method, characterized in that: The following steps are involved: S1, obtain the position and angle of the mirror and camera; S2, adjusting the relative positions of the mirror and the camera until the mirror text plane, the lens plane and the sensor plane intersect at one point; S3, use the laser aligner to adjust the position of the mirror and camera, and monitor the image output by the camera in real time until a clear image is obtained.
2. A camera mirror calibration method according to claim 1, characterized in that: The following steps are involved: S4, using the intelligent calibration algorithm to determine whether the acquired image is clear, if so, the position adjustment of the mirror and the camera is completed, if not, the position of the mirror and the camera is adjusted according to the image clarity and the image focus position.
3. A camera mirror calibration method according to claim 2, characterized in that: The specific process of the intelligent calibration algorithm to determine whether the acquired image is clear is as follows: S41, preprocessing the image; S42, performing edge detection on the preprocessed image to extract edge information; S43, obtaining a text area in the image and identifying edges of the text; S44, obtaining the clarity of the image using an image sharpness function. If the clarity of the image reaches a set value, the image is considered to be clear.
4. A camera mirror calibration method according to claim 2, characterized in that: The specific steps of determining whether the acquired image is clear are as follows: determining whether the sharpness and focus of the recognized image meet the preset standards, if so, the image is considered clear, if not, the image is considered unclear.
5. A camera mirror calibration method according to claim 3, characterized in that: The edge detection uses the Canny operator.
6. A camera mirror calibration method according to claim 3, characterized in that: The S43 specifically uses an optical character recognition algorithm to locate the text area and recognize the text edge.
7. A camera mirror calibration method according to claim 3, characterized in that: The image sharpness function adopts the Laplacian transformation function.
8. A camera mirror calibration method according to any one of claims 1 to 7, characterized in that: When the mirror is fixed, S2 specifically includes the following steps: S201, aiming the camera at the text area reflected by the mirror; S202, adjusting the tilt angle of the camera so that the lens plane is substantially parallel to the sensor plane; S203, calibrating the tilt angle and vertical angle of the camera until the mirror text plane, the lens plane and the sensor plane intersect at one point.
9. A camera mirror calibration method according to any one of claims 1 to 7, characterized in that: When the mirror moves, S2 specifically includes the following steps: S211, fix the position of the camera; S212, adjusting the angle of the mirror so that the text image reflected by the mirror enters the field of view of the camera; S213, accurately measure and adjust the tilt angle and position of the mirror; S214, calibrating the tilt angle of the camera until the mirror text plane, the lens plane and the sensor plane intersect at one point.
10. A camera mirror calibration system, applicable to the camera mirror calibration method according to claim 1, characterized in that: include: A stepper motor with a built-in gyroscope and accelerometer to control the movement of the camera; Mechanical gripper to control the tilt angle of the camera; The computer control module obtains the image taken by the camera to judge the clarity, controls the operation of the stepper motor and the mechanical gripper according to the clarity, and controls the movement and tilt angle of the camera.
Citation Information
Patent Citations
A projector calibration method based on Sham's law
CN113160339B
Telecentric lens, camera and detection equipment
CN221101137U