Camera calibration verification method and system, readable storage medium and computer equipment
In the camera calibration verification method, the camera center position is determined using the geometric constraint relationship of the camera imaging model, and multiple images are taken by rotating the camera, the problem of center offset and the inability to measure the actual distance is solved, and the triangulation method is improved accuracy.
Patent Information
- Application Number
- CN202411580533.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-07
AI Technical Summary
In the prior art, the exact position of the camera's optical center is offset by the influence of optical structure and components, and the actual distance between the optical center and the characteristic point cannot be directly measured, which affects the accuracy of the triangulation method.
By setting and debugging the experimental equipment, an experimental environment for triangulation method is formed, images containing targets A and B are taken, and the offset between the camera's optical center and the rotation center is obtained according to the geometric constraint relationship of the camera imaging model, and the camera is moved by moving the camera. The center of light coincides with the center of rotation and rotate the camera to capture multiple images to improve the accuracy of the triangulation method.
Accurately reconstruct the spatial position of the target feature points, and determine the camera's optical center position based on the geometric constraint relationship of the camera imaging model, which improves the measurement accuracy of depth information and improves the accuracy of the triangulation method.
Smart Images

Figure CN119478064A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of camera calibration, and in particular relates to a camera calibration verification method, system, readable storage medium and computer equipment. Background Art
[0002] Camera calibration is a process of calibrating the internal parameters of a camera. In order to effectively evaluate the accuracy of camera calibration, the triangulation method can be used to verify the camera calibration results. This method first uses a camera with known internal parameters to shoot two targets; then, the pixel coordinates of the feature points on the target are extracted on the image plane, and the spatial coordinates of the feature points on the target are reconstructed using the camera geometric model; finally, the reconstructed distance between the two feature points is calculated and compared with the actual distance, and the calibration accuracy of the camera is verified by the size of the relative error.
[0003] An image is a projection of the three-dimensional world on a two-dimensional plane. This process loses depth information. In order to reconstruct the spatial coordinates of the feature points on the target during triangulation, it is necessary to measure the distance from the optical center of the camera to the feature points. The optical center of the camera is usually located at the center of the lens, but in fact, due to the complex optical design of the lens, the exact position of the optical center may be slightly offset by the influence of the optical structure and components. In addition, the optical center is located inside the camera structure, and the actual distance from the optical center to the feature points cannot be directly measured. This affects the accuracy of the triangulation method and makes it impossible to accurately verify the calibration accuracy of the camera. Summary of the invention
[0004] The present invention provides a camera calibration verification method, system, readable storage medium and computer equipment, which are used to solve the problem that the exact position of the optical center in the existing camera shooting process is affected by the optical structure and components and is offset, and the problem that the actual distance from the optical center to the feature point cannot be directly measured.
[0005] The invention provides a camera calibration verification system for realizing a camera calibration verification method.
[0006] The present invention provides a computer-readable storage medium for implementing method steps of a camera calibration and verification method.
[0007] The present invention provides a computer device for implementing the method steps of a camera calibration verification method.
[0008] The present invention is achieved through the following technical solutions:
[0009] A camera calibration verification method, the method comprising the following steps:
[0010] Step 1: Set up and debug experimental equipment to form an experimental environment for triangulation method;
[0011] Step 2: Take an image containing target A and target B, and obtain the offset between the camera optical center and the rotation center according to the geometric constraint relationship of the camera imaging model;
[0012] Step 3: Move the camera according to the offset in step 2 so that the optical center of the camera coincides with the rotation center. Rotate the camera to take multiple images containing target A and target B, and conduct a triangulation experiment to improve the accuracy of the triangulation method.
[0013] Furthermore, the step 2 specifically includes the following steps:
[0014] Step 2.1: Take an image containing target A and target B;
[0015] Step 2.2: Perform sub-pixel feature point detection on the image to obtain the pixel coordinates of the feature points;
[0016] Step 2.3: Dedistort the pixel coordinates of the feature points to obtain the dedistorted pixel coordinates of the feature points;
[0017] Step 2.4: According to the similar triangle formed by the spatial coordinates of the feature point, the optical center of the camera, and the pixel coordinates of the dedistorted feature point, the distance from the optical center of the camera to the plane where the target is located is obtained;
[0018] Step 2.5: Measure the distance from the rotation center to the plane where the target is located, and subtract it from the distance from the camera optical center to the plane where the target is located to obtain the offset from the camera optical center to the rotation center.
[0019] Furthermore, the step 2.1 is specifically as follows: the camera is mechanically connected to the rotating platform through a clamp, the geometric center of the outer surface of the lens coincides with the rotation center, the rotating platform is adjusted so that the optical axis of the camera lens is perpendicular to the plane where the target is located, and the plane formed by the geometric center of the outer surface of the lens, the characteristic point of target A and the characteristic point of target B is perpendicular to the plane where the target is located;
[0020] Adjust the brightness of the experimental light source and capture an image containing target A and target B, making the captured image as clear as possible.
[0021] Furthermore, step 2.3 is specifically as follows: let the pixel coordinates of the feature points detected on the image be m dist is dist ,v dist ), the coordinates of the feature point in the imaging coordinate system are (x dist ,y dist ), on the undistorted image, the pixel coordinate m corresponding to the feature point is (u, v), and the coordinates of the imaging coordinate system are (x, y);
[0022] According to the conversion relationship between the image coordinate system and the imaging coordinate system, we can get:
[0023]
[0024] In the formula, f x 、f y are the focal lengths of the camera in the x and y directions of the imaging coordinate system, respectively; u0 and v0 are the principal point offsets of the camera in the x and y directions of the imaging coordinate system.
[0025] The obtained (x dist ,y dist ) as the initial value (x0,y0),
[0026]
[0027] The coordinates (x, y) of the dedistorted feature point imaging coordinate system can be obtained by repeatedly iterating the distortion model.
[0028]
[0029] Where k1, k2, k3, k4, k5, and k6 are radial distortion parameters, and p1 and p2 are tangential distortion parameters.
[0030] When the number of iterations or the iteration accuracy meets the requirement, the iteration is exited. n ,y n ) is used as the imaging coordinate system coordinate on the undistorted image and its coordinates are (x, y).
[0031] According to the conversion relationship between the image coordinate system and the imaging coordinate system,
[0032]
[0033] The pixel coordinates m of the dedistorted feature point are obtained through the dedistortion model as (u, v);
[0034] The de-distortion model includes a radial distortion model and a tangential distortion model;
[0035] Assume that the pixel coordinates of the feature points of target A and target B are detected as m Adist 、m Bdist They are (u Adist ,v Adist )、(u Bdist ,v Bdist ), dedistort the pixel coordinates of the feature points to obtain the dedistorted pixel coordinates of the feature points m A 、m B They are (u A ,v A )、(u B ,v B ).
[0036] Furthermore, the step 2.4 is specifically as follows: according to the pinhole imaging model, the feature point object point MA 、M B With the camera optical center O c The triangle formed and the pixel coordinates of the dedistorted feature points m A 、m B With the camera optical center O c The triangles formed are similar triangles, and the distance D from the optical center of the camera to the plane where the target is located can be obtained;
[0037]
[0038] Where L is the distance between the feature point of target A and the feature point of target B, D1 and D2 are respectively x 、f y The calculated distance from the optical center of the camera to the plane where the target is located;
[0039]
[0040] Where D is the average value of D1 and D2, that is, the distance from the optical center of the camera to the plane where the target is located.
[0041] Furthermore, the step 2.5 is specifically to obtain the distance d from the rotation center P to the plane where the target is located;
[0042] The distance D from the optical center of the camera to the plane where the target is located is subtracted from the distance d from the rotation center to the plane where the target is located to obtain the offset δ from the optical center of the camera to the rotation center;
[0043] δ=Dd (7).
[0044] Furthermore, the step 3 is specifically to rotate the camera to capture multiple images containing target A and target B, and the target should cover the entire field of view of the camera as much as possible;
[0045] Select a captured image for sub-pixel feature point detection, and obtain the pixel coordinates of the feature points of target A and target B respectively (u Adist ,v Adist )、(u Bdist ,v Bdist );
[0046] The pixel coordinates of the feature points are dedistorted to obtain the pixel coordinates of the dedistorted feature points of target A and target B respectively (u A ,v A )、(u B ,v B );
[0047] According to the internal parameters of the camera, the normalized camera coordinate system coordinates (X Acoff ,Y Acoff ,1)、(XBcoff ,Y Bcoff ,1);
[0048] Measure the distances from the rotation center to the feature points of target A and target B respectively, that is, obtain the distances from the camera optical center to the feature points of target A and target B, and obtain the depth information of the feature points;
[0049] The camera coordinate system coordinates A of the feature points of target A and target B can be reconstructed based on the depth information. c , B c ;
[0050] Then the reconstruction distance between the feature points of target A and target B is L′ AB ;
[0051] Calculate the relative error between the reconstructed distance and the actual distance of the feature points of target A and target B, and verify the calibration accuracy of the camera by the size of the relative error;
[0052] Calculate the relative error between the reconstructed distance and the actual distance of the feature points of target A and target B on all captured images, and take the arithmetic mean as the distance verification result of triangulation.
[0053] A camera calibration verification system, the system using the camera calibration verification method as described above,
[0054] The acquisition module is used to take images required for triangulation experiments;
[0055] A calculation module obtains the offset between the camera optical center and the rotation center according to the geometric constraint relationship of the camera imaging model;
[0056] Verification module, used to conduct triangulation experiments.
[0057] A computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0058] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the above method is implemented.
[0059] The beneficial effects of the present invention are:
[0060] The present invention accurately reconstructs the spatial position of the target feature points, determines the position of the camera optical center according to the geometric constraint relationship of the camera imaging model, improves the measurement accuracy of the depth information, and enhances the accuracy of the triangulation method. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a flow chart of the method of the present invention.
[0062] Figure 2 It is a schematic diagram of a camera calibration and verification system of the present invention.
[0063] Figure 3 It is a flow chart of the method for calculating the offset between the camera optical center and the rotation center of the present invention.
[0064] Figure 4 It is a schematic diagram of a similar triangle formed by the spatial coordinates of the feature points, the optical center of the camera, and the pixel coordinates of the dedistorted feature points of the present invention.
[0065] Figure 5 Schematic diagram of the triangulation system of the present invention.
[0066] Figure 6 It is a schematic diagram of the target posture photographed by the triangulation system of the present invention.
[0067] Figure 7 Schematic diagram of the camera calibration and verification system of the present invention.
[0068] Figure 8 It is a schematic diagram of a computer device of the present invention. DETAILED DESCRIPTION
[0069] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0070] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0071] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.
[0072] The following is attached to this application specification Figure 1-6, the technical solutions in the embodiments of the present application are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0073] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0074] Implementation Method 1
[0075] An embodiment of the present invention provides a camera calibration verification method, the method comprising the following steps:
[0076] Step 1: Setting up and debugging experimental equipment to form an experimental environment for the triangulation method, including: a camera, a rotating platform, a fixture, a target A, and a target B, wherein the camera has obtained internal parameters through camera calibration;
[0077] The camera is fixed by a clamp and mechanically connected to the rotating platform;
[0078] The rotating platform realizes rotation and translation of the rotation center through a servo mechanism;
[0079] The target A and the target B have the same characteristic pattern and at least one characteristic point, and the characteristic pattern includes but is not limited to a checkerboard, a circle, and a ring;
[0080] The target A and the target B are both planar targets, and the target A and the target B are coplanar.
[0081] Step 2: Take an image containing target A and target B, and obtain the offset between the camera optical center and the rotation center according to the geometric constraint relationship of the camera imaging model;
[0082] Step 3: Move the camera according to the offset in step 2 so that the optical center of the camera coincides with the rotation center. Rotate the camera to take multiple images containing target A and target B, and conduct a triangulation experiment to improve the accuracy of the triangulation method.
[0083] Furthermore, the step 2 specifically includes the following steps:
[0084] Step 2.1: Take an image containing target A and target B;
[0085] Step 2.2: Perform sub-pixel feature point detection on the image to obtain pixel coordinates of the feature points; use corresponding feature point detection algorithms for different pattern feature points, including but not limited to Harris detection algorithm, Shi-Tomasi detection algorithm, centroid method, and ellipse fitting method;
[0086] Step 2.3: Dedistort the pixel coordinates of the feature points to obtain the dedistorted pixel coordinates of the feature points;
[0087] Step 2.4: According to the similar triangle formed by the spatial coordinates of the feature point, the optical center of the camera, and the pixel coordinates of the dedistorted feature point, the distance from the optical center of the camera to the plane where the target is located is obtained;
[0088] Step 2.5: Measure the distance from the rotation center to the plane where the target is located, and subtract it from the distance from the camera optical center to the plane where the target is located to obtain the offset from the camera optical center to the rotation center.
[0089] Furthermore, the step 2.1 is specifically as follows: the camera is mechanically connected to the rotating platform through a clamp, the geometric center of the outer surface of the lens coincides with the rotation center, the rotating platform is adjusted so that the optical axis of the camera lens is perpendicular to the plane where the target is located, and the plane formed by the geometric center of the outer surface of the lens, the characteristic point of target A and the characteristic point of target B is perpendicular to the plane where the target is located;
[0090] Adjust the brightness of the experimental light source (if a reflective target is used, adjust the brightness of the experimental environment light source; if a transmissive target is used, adjust the brightness of the backlight source), and capture an image containing target A and target B, so that the captured image is as clear as possible.
[0091] Furthermore, step 2.3 is specifically as follows: let the pixel coordinates of the feature points detected on the image be m dist is dist ,v dist ), the coordinates of the feature point in the imaging coordinate system are (x dist ,y dist ), on the undistorted image, the pixel coordinate m corresponding to the feature point is (u, v), and the coordinate in the imaging coordinate system is (x, y); the pixel coordinates of the dedistorted feature point are obtained through the dedistortion model;
[0092] The de-distortion model includes a radial distortion model and a tangential distortion model;
[0093] Specifically, the pixel coordinates of the feature points are dedistorted by obtaining the following according to the conversion relationship between the image coordinate system and the imaging coordinate system:
[0094]
[0095] In the formula, f x 、f yare the focal lengths of the camera in the x and y directions of the imaging coordinate system, respectively; u0 and v0 are the principal point offsets of the camera in the x and y directions of the imaging coordinate system;
[0096] The obtained (x dist ,y dist ) as the initial value (x0,y0),
[0097]
[0098] The coordinates (x, y) of the dedistorted feature point imaging coordinate system can be obtained by repeatedly iterating the distortion model.
[0099]
[0100] Where k1, k2, k3, k4, k5, k6 are radial distortion parameters, and p1 and p2 are tangential distortion parameters;
[0101] When the number of iterations or the iteration accuracy is satisfied, the iteration is exited; the iterative (x n ,y n ) as the imaging coordinate system coordinates on the undistorted image is (x, y);
[0102] According to the conversion relationship between the image coordinate system and the imaging coordinate system,
[0103]
[0104] Through the above process, the pixel coordinates m of the dedistorted feature point can be obtained as (u, v);
[0105] Assume that the pixel coordinates of the feature points of target A and target B are detected as m Adist 、m Bdist They are (u Adist ,v Adist )、(u Bdist ,v Bdist ), dedistort the pixel coordinates of the feature points to obtain the dedistorted pixel coordinates of the feature points m A 、m B They are (u A ,v A )、(u B ,v B ).
[0106] Furthermore, the step 2.4 is specifically as follows: according to the pinhole imaging model, the feature point object point M A 、M B With the camera optical center O c The triangle formed and the pixel coordinates of the dedistorted feature points m A 、m B With the camera optical center O cThe triangles formed are similar triangles, and the distance D from the optical center of the camera to the plane where the target is located can be obtained;
[0107]
[0108] Where L is the distance between the feature point of target A and the feature point of target B, D1 and D2 are respectively x 、f y The calculated distance from the optical center of the camera to the plane where the target is located;
[0109]
[0110] Where D is the average value of D1 and D2, that is, the distance from the optical center of the camera to the plane where the target is located.
[0111] Furthermore, the step 2.5 is specifically to obtain the distance d from the rotation center P to the plane where the target is located;
[0112] The distance D from the optical center of the camera to the plane where the target is located is subtracted from the distance d from the rotation center to the plane where the target is located to obtain the offset δ from the optical center of the camera to the rotation center;
[0113] δ=Dd (7).
[0114] Furthermore, the step 3 is specifically as follows: the camera is mechanically connected to the rotating platform through a fixture, and the camera is moved according to the offset so that the optical center of the camera coincides with the rotation center; the brightness of the experimental light source is adjusted (if a reflective target is used, the brightness of the experimental environment light source is adjusted; if a transmissive target is used, the brightness of the backlight source is adjusted) to make the captured image as clear as possible;
[0115] The rotating camera takes multiple images containing target A and target B, and the target should cover the entire field of view of the camera as much as possible; in this embodiment, 12 images are taken in which the target is located in different areas of the image;
[0116] Select a captured image for sub-pixel feature point detection, and obtain the pixel coordinates of the feature points of target A and target B respectively (u Adist ,v Adist )、(u Bdist ,v Bdist );
[0117] The pixel coordinates of the feature points are dedistorted to obtain the pixel coordinates of the dedistorted feature points of target A and target B respectively (u A ,v A )、(u B ,v B );
[0118] According to the internal parameters of the camera, the normalized camera coordinate system coordinates (XAcoff ,Y Acoff ,1)、(X Bcoff ,Y Bcoff ,1);
[0119]
[0120]
[0121] In the formula, f x 、f y are the focal lengths of the camera in the x and y directions of the imaging coordinate system, respectively; u0 and v0 are the principal point offsets of the camera in the x and y directions of the imaging coordinate system;
[0122] Measure the distances from the rotation center to the feature points of target A and target B respectively, that is, obtain the distances from the camera optical center to the feature points of target A and target B, and obtain the depth information of the feature points according to formula (10);
[0123]
[0124] In the formula, are the distances from the optical center of the camera to the characteristic points of target A and target B, respectively, Ac , Z Bc They are the depth information of the feature points of target A and target B respectively;
[0125] The camera coordinate system coordinates A of the feature points of target A and target B can be reconstructed based on the depth information. c , B c ;
[0126]
[0127] Then the reconstruction distance L′ of the feature points of target A and target B is AB for:
[0128]
[0129] Calculate the relative error between the reconstructed distance and the actual distance of the feature points of target A and target B, and verify the calibration accuracy of the camera by the size of the relative error.
[0130]
[0131] Where, L AB is the actual distance between the feature points of target A and target B, ε is the relative error between the reconstructed distance and the actual distance between the feature points of target A and target B. The smaller ε is, the higher the camera calibration accuracy is.
[0132] Calculate the relative error between the reconstructed distance and the actual distance of the feature points of target A and target B on all captured images, and take the arithmetic mean as the distance verification result of triangulation.
[0133] Specifically,
[0134] Table 1 Experimental results of camera calibration verification method
[0136] Unit: mm
[0137]
[0138] In the prior art, due to the complex optical design of the lens, the exact position of the optical center may be slightly offset due to the influence of the optical structure and components. In addition, the optical center is located inside the camera structure, and the actual distance from the optical center to the feature point cannot be directly measured. These factors affect the accuracy of the triangulation method and make it impossible to accurately verify the calibration accuracy of the camera.
[0139] Implementation Method 2
[0140] An embodiment of the present invention provides a camera calibration verification system, wherein the system uses the camera calibration verification method described in Embodiment 1, and the system comprises:
[0141] The acquisition module is used to take images required for triangulation experiments;
[0142] A calculation module obtains the offset between the camera optical center and the rotation center according to the geometric constraint relationship of the camera imaging model;
[0143] Verification module, used to conduct triangulation experiments.
[0144] Implementation Method 3
[0145] An embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory is used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory and the processor are connected via a bus. Specifically, the processor implements any step in the first embodiment above by running the computer program stored in the memory.
[0146] It should be understood that in the embodiments of the present invention, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0147] The memory may include a read-only memory, a flash memory, and a random access memory, and provides instructions and data to the processor. A part or all of the memory may also include a nonvolatile random access memory.
[0148] It can be seen from the above that the electronic device provided in the embodiment of the present invention can implement a camera calibration verification method as described in embodiment 1 by running a computer program. In the triangulation experiment for verifying the camera calibration accuracy, in order to accurately reconstruct the spatial position of the target feature points, the camera optical center position is determined according to the geometric constraint relationship of the camera imaging model, thereby improving the measurement accuracy of the depth information and the accuracy of the triangulation method.
[0149] It should be understood that if the above-mentioned integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned implementation method, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method implementations when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0150] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest range consistent with the principles and novel features disclosed herein.
[0151] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the implementation method can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method implementation method, which will not be repeated here.
[0152] It should be noted that the methods and detailed examples provided in the above embodiments can be combined with the devices and equipment provided in the embodiments, and references can be made to each other, and no further details will be given.
[0153] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0154] In the embodiments provided by the present invention, it should be understood that the disclosed device / terminal equipment and method can be implemented in other ways. For example, the device / equipment implementation described above is only illustrative, for example, the division of the above modules or units is only a logical function division, and in actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0155] The above-mentioned embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above-mentioned embodiments, or replace some of the technical features therein by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A camera calibration verification method, characterized in that: The method comprises the following steps: Step 1: Set up and debug experimental equipment to form an experimental environment for triangulation method; Step 2: Take an image containing target A and target B, and obtain the offset between the camera optical center and the rotation center according to the geometric constraint relationship of the camera imaging model; Step 3: Move the camera according to the offset in step 2 so that the optical center of the camera coincides with the rotation center. Rotate the camera to take multiple images containing target A and target B, and conduct a triangulation experiment to improve the accuracy of the triangulation method.
2. A camera calibration verification method according to claim 1, characterized in that: The step 2 specifically includes the following steps: Step 2.1: Take an image containing target A and target B; Step 2.2: Perform sub-pixel feature point detection on the image to obtain the pixel coordinates of the feature points; Step 2.3: Dedistort the pixel coordinates of the feature points to obtain the dedistorted pixel coordinates of the feature points; Step 2.4: According to the similar triangle formed by the spatial coordinates of the feature point, the optical center of the camera, and the pixel coordinates of the dedistorted feature point, the distance from the optical center of the camera to the plane where the target is located is obtained; Step 2.5: Measure the distance from the rotation center to the plane where the target is located, and subtract it from the distance from the camera optical center to the plane where the target is located to obtain the offset from the camera optical center to the rotation center.
3. A camera calibration verification method according to claim 2, characterized in that: Specifically, the step 2.1 is as follows: the camera is mechanically connected to the rotating platform through a fixture, the geometric center of the outer surface of the lens coincides with the rotation center, the rotating platform is adjusted so that the optical axis of the camera lens is perpendicular to the plane where the target is located, and the plane formed by the geometric center of the outer surface of the lens, the characteristic point of target A and the characteristic point of target B is perpendicular to the plane where the target is located; Adjust the brightness of the experimental light source and capture an image containing target A and target B, making the captured image as clear as possible.
4. The camera calibration verification method according to claim 2, characterized in that: Step 2.3 is as follows: let the pixel coordinates of the feature points detected on the image be m dist is (udist, vdist), the coordinates of the feature point in the imaging coordinate system are (x dist ,y dist ), on the undistorted image, the pixel coordinate m corresponding to the feature point is (u, v), and the coordinates of the imaging coordinate system are (x, y); According to the conversion relationship between the image coordinate system and the imaging coordinate system, we can get: In the formula, f x 、f y are the focal lengths of the camera in the x and y directions of the imaging coordinate system, respectively; u0 and v0 are the principal point offsets of the camera in the x and y directions of the imaging coordinate system; The obtained (xdist, ydist) is used as the initial value (x0, y0), The coordinates (x, y) of the dedistorted feature point imaging coordinate system can be obtained by repeatedly iterating the distortion model. Where, k1, k2, k3, k4, k5, k6 are radial distortion parameters, and p1 and p2 are tangential distortion parameters; When the number of iterations or the iteration accuracy meets the requirement, the iteration is exited. n ,y n ) as the imaging coordinate system coordinates on the undistorted image is (x, y); According to the conversion relationship between the image coordinate system and the imaging coordinate system, we can get: The pixel coordinates m of the dedistorted feature point are obtained through the dedistortion model as (u, v); The de-distortion model includes a radial distortion model and a tangential distortion model; Assume that the pixel coordinates of the feature points of target A and target B are detected as m Adist 、m Bdist They are (u A dist,v A dist)、(u B dist,v B dist), dedistort the pixel coordinates of the feature points to obtain the dedistorted pixel coordinates of the feature points m A 、m B They are (u A ,v A )、(u B ,v B ).
5. The camera calibration verification method according to claim 2, characterized in that: The step 2.4 is specifically as follows: according to the pinhole imaging model, the feature point object point M A 、M B With the camera optical center O c The triangle formed and the pixel coordinates of the dedistorted feature points m A 、m B With the camera optical center O c The triangles formed are similar triangles, and the distance D from the optical center of the camera to the plane where the target is located can be obtained. Where L is the distance between the feature point of target A and the feature point of target B, D1 and D2 are respectively x 、f y The calculated distance from the camera optical center to the target plane, Where D is the average value of D1 and D2, that is, the distance from the optical center of the camera to the plane where the target is located.
6. A camera calibration verification method according to claim 2, characterized in that: The step 2.5 specifically includes obtaining the distance d from the rotation center P to the plane where the target is located; The distance D from the camera optical center to the target plane is subtracted from the distance d from the rotation center to the target plane to obtain the offset δ from the camera optical center to the rotation center. δ=Dd (7).
7. A camera calibration verification method according to claim 2, characterized in that: Specifically, the step 3 includes: rotating the camera to capture multiple images containing the target A and the target B, and the target should cover the entire field of view of the camera as much as possible; Select a captured image for sub-pixel feature point detection, and obtain the pixel coordinates of the feature points of target A and target B respectively (u Adist ,v Adist )、(u Bdist ,v Bdist ); The pixel coordinates of the feature points are dedistorted to obtain the pixel coordinates of the dedistorted feature points of target A and target B respectively (u A ,v A )、(u B ,v B ); According to the internal parameters of the camera, the normalized camera coordinate system coordinates (X Acoff ,Y Acoff ,1)、(X Bcoff ,Y Bcoff ,1); Measure the distances from the rotation center to the feature points of target A and target B respectively, that is, obtain the distances from the camera optical center to the feature points of target A and target B, and obtain the depth information of the feature points; The camera coordinate system coordinates A of the feature points of target A and target B can be reconstructed based on the depth information. c , B c ; Then the reconstruction distance between the feature points of target A and target B is L′ AB ; Calculate the relative error between the reconstructed distance and the actual distance of the feature points of target A and target B, and verify the calibration accuracy of the camera by the size of the relative error; Calculate the relative error between the reconstructed distance and the actual distance of the feature points of target A and target B on all captured images, and take the arithmetic mean as the distance verification result of triangulation.
8. A camera calibration verification system, characterized in that: The system uses the camera calibration verification method according to any one of claims 1 to 7, and the system includes: The acquisition module is used to take images required for triangulation experiments; A calculation module obtains the offset between the camera optical center and the rotation center according to the geometric constraint relationship of the camera imaging model; Verification module, used to conduct triangulation experiments.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Calibration method and system for three-dimensional imaging system based on rotating shaft and binocular camera
CN109118545A
Method, device and system for detecting surface machining quality of component
CN117664029A
Camera calibration method based on optical diffraction target
CN118710729A
Method and system for calibrating binocular camera, and electronic device and storage medium
WO2023045147A1
Cited By
Depth measurement method, camera calibration result evaluation method, equipment and storage medium
CN120685056A