Disclosure of Invention
The embodiment of the invention provides a parameter calibration system and method of a binocular panoramic camera, which can be used for quickly calibrating parameters of the binocular panoramic camera by using a small and medium-sized system which is easy to assemble in a small space, and is simple and convenient to operate and flexible to assemble.
The first aspect of the embodiment of the invention discloses a parameter calibration system of a binocular panoramic camera, which comprises a calibration box body, a camera supporting rod, a characteristic pattern and a calibration host.
The calibration box body is used for providing a calibration space and comprises an upper plane, a lower plane, a left plane and a right plane which are respectively called as an upper plane, a lower plane, a left plane and a right plane; the camera supporting rod is used for supporting the binocular panoramic camera, is positioned in the center of the lower plane of the calibration box body and is perpendicular to the lower plane; the characteristic patterns are used for providing characteristic points required by parameter calibration and are positioned on the inner surfaces of the four planes of the calibration box body; the calibration host is used for controlling the binocular panoramic camera to shoot panoramic images, carrying out parameter calibration in the calibration box body after receiving the panoramic images shot by the binocular panoramic camera, and storing a calibration result in a storage unit of the binocular panoramic camera.
Preferably, the system further comprises a camera clamp, the camera clamp is used for fixing the binocular panoramic camera, the camera clamp is fixed on the camera supporting rod, and the optical center of the binocular panoramic camera coincides with the geometric center of the calibration box body.
Preferably, adjacent planes in the four planes of the calibration box body are perpendicular to each other, and planes separated from each other are parallel to each other.
Preferably, the characteristic patterns are multiple, and the distance between the characteristic patterns and the optical center of the binocular panoramic camera is equal.
Preferably, the characteristic points are included on the characteristic patterns and are stitching matching points of the binocular panoramic camera at different distances, and the calibration host calculates stitching parameters of the binocular panoramic camera at different distances according to the stitching matching points at different distances.
The embodiment of the invention provides a parameter calibration method of a binocular panoramic camera, which can be used for quickly calibrating parameters of the binocular panoramic camera by using a small and medium-sized system which is easy to assemble in a small space, and is simple and convenient to operate and flexible to assemble.
The second aspect of the embodiment of the invention discloses a parameter calibration method of a binocular panoramic camera, which comprises the following steps: step 1, placing a binocular panoramic camera on a camera clamp, and performing data connection on the binocular panoramic camera and a calibration host; step 2, the calibration host sends an instruction to control the binocular panoramic camera to take a picture, and the binocular panoramic camera transmits the shot panoramic image back to the computer; step 3, according to the shot panoramic image, the calibration host machine utilizes an image processing and nonlinear equation optimization solving method to calculate panoramic camera parameters and splicing parameters; and 4, writing the calculated camera parameters into a storage unit of the panoramic camera according to the form of the splicing parameters as a calibration result.
Preferably, step 3 comprises: filtering and denoising the shot panoramic original image; determining regions of the feature pattern using a circle detection method; determining corner points of rectangular butt joint in the characteristic patterns as characteristic points by using a corner point detection method in the characteristic pattern area; and (3) listing a nonlinear equation set by using the space coordinates of the characteristic points and the pixel coordinates of the same characteristic point in the binocular panoramic camera and combining a fisheye lens model and an image splicing model, and solving the equation set to obtain panoramic camera parameters and splicing parameters.
The embodiment of the invention provides a parameter calibration system and method of a binocular panoramic camera, which can be used for quickly calibrating parameters of the binocular panoramic camera by using a small and medium-sized system which is easy to assemble in a small space, and is simple and convenient to operate and flexible to assemble.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "including" and "having," and any variations thereof, in the description and claims of this invention and the above-described drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or system that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or system.
The embodiment of the invention provides a parameter calibration system and method of a binocular panoramic camera, which can be used for quickly calibrating parameters of the binocular panoramic camera by using a small and medium-sized system which is easy to assemble in a small space, and is simple and convenient to operate and flexible to assemble.
Referring to fig. 1, fig. 1 is a structural diagram of an embodiment of a parameter calibration system of a binocular panoramic camera according to an embodiment of the present invention. As shown in fig. 1, a parameter calibration system of a binocular panoramic camera disclosed in the embodiment of the present invention includes a calibration box 10, a calibration host 20, a camera support rod 30, and a feature pattern 40.
In the present embodiment, the calibration box 10 is used to provide a calibration space, and the calibration box includes four planes, namely, an upper plane, a lower plane, a left plane, and a right plane, and the adjacent planes in the four planes of the calibration box are perpendicular to each other and the planes separated from each other are parallel to each other, that is, the four planes are four upper, lower, left, and right sides of a rectangular solid, or four upper, lower, left, and right sides of a square solid if the edges are equal. That is, the calibration housing 10 provides a relatively small calibration space, which allows the calibration environment to be miniaturized.
The camera support rod 30 is used for supporting the binocular panoramic camera, and the camera support rod 30 is located at the center of the lower plane of the calibration box 10 and is perpendicular to the lower plane. Specifically, the camera support bar 30 serves two functions: one is to support a binocular panoramic camera so that the binocular panoramic camera can normally shoot images or videos; and secondly, the binocular panoramic camera is positioned at the center of the calibration box body, so that the integrity of the shot images is ensured.
In addition, in order to keep the binocular panoramic camera to more stably photograph images or videos, in general, a camera fixture 50 (not shown in fig. 1, but shown in fig. 2) is fixed on a camera support rod, the camera fixture 50 is used for fixing the binocular panoramic camera, and the camera fixture is fixed on the camera support rod, and the optical center of the binocular panoramic camera coincides with the geometric center of the calibration housing 10.
The characteristic patterns 40 are used for providing characteristic points required by parameter calibration, the characteristic patterns 40 are located on the inner surfaces of the four planes of the calibration box body 10, the characteristic patterns 40 are generally multiple, the distance between the characteristic patterns and the optical centers of the binocular panoramic cameras is equal, the characteristic points are included on the characteristic patterns and are stitching matching points of the binocular panoramic cameras at different distances, and the calibration host calculates stitching parameters of the binocular panoramic cameras at different distances according to the stitching matching points at different distances.
The calibration host 20 is configured to control the binocular panoramic camera to shoot panoramic images, perform parameter calibration in the calibration box after receiving the panoramic images shot by the binocular panoramic camera, and store a calibration result in a storage unit of the binocular panoramic camera. The calibration host 20 may be a computer, a computer host, a GPU, or other processor with operation processing capability.
To describe in more detail how the parameter calibration system of the binocular panoramic camera provided by the present invention implements parameter calibration, please refer to fig. 2, fig. 3 and fig. 4, wherein fig. 2 is a structural diagram of an embodiment of a calibration box 10 disclosed in an embodiment of the present invention, fig. 3 is a structural diagram of an embodiment of a cross-sectional view of the calibration box 10 disclosed in an embodiment of the present invention, and fig. 4 is an exemplary diagram of an embodiment of a feature pattern 40 disclosed in an embodiment of the present invention.
Referring to fig. 2, the calibration box 10, the camera support bar 30, the feature pattern 40, and the camera fixture 50 are shown. The camera support rod 30 is located at the center of the lower plane of the calibration box 10 and is perpendicular to the lower plane, the camera clamp 50 fixes the binocular panoramic camera, the camera clamp is fixed on the camera support rod, the optical center of the binocular panoramic camera coincides with the geometric center of the calibration box 10, the number of the characteristic patterns 40 is multiple, and fig. 2 shows 8 characteristic patterns.
In order to determine how many feature patterns are obtained, please refer to fig. 3, fig. 3 is a cross-sectional view of the calibration case 10, the feature patterns 40 are distributed on several groups of positions with equal distances between the inner surface and the optical center, in the drawing, 131 is a circumscribed circle of a cross-sectional rectangle of the calibration case 10, 133 is an inscribed circle of the cross-sectional rectangle, 132 is a circle with a radius between 123 and 121, according to the geometric relationship, the intersection point of the inscribed circle 133 and the inner wall may have 2 (non-equilateral rectangles) or 4 (squares), for convenience of description, we take a square as an example to describe the position arrangement method of the feature patterns 40, assume that the radius of the circumscribed circle 131 is R1, the radius of the inscribed circle 133 is R3, the radius of the circle 132 between the two is R2, and when the radius is equal to R1 or R3, there are 4 equidistant points from the center point O on the cross-section of the calibration case 10; when the radius R2 is between R1 and R3, there are 8 points on the cross-section of the calibration box 10 equidistant from the center point O. Thus, the number of the characteristic patterns 40 can be arranged according to the edge length of the calibration case 10.
After the arrangement position and the number of the feature patterns 40 are grasped, it is to be understood that the contents of the feature points included in the feature patterns can be specifically referred to fig. 4, and fig. 4 is an exemplary diagram of an embodiment of the feature patterns 40 disclosed in the embodiment of the present invention.
As shown in fig. 4, the outer contour of the feature pattern 40 is an ellipse, and the area a and the area B in the ellipse are made of different colors, for example, the area a is white and the area B is black. And the corner points of adjacent rectangular blocks in the area A are butted, and the difference of the characteristic patterns can be marked by increasing or reducing the number of the rectangular blocks according to the requirement.
According to the embodiment of the invention, the calibration box body 10, the camera support rod 30 and the characteristic pattern 40 in the implementation of the invention form a small and medium-sized system which is easy to assemble, the calibration host 20 controls the binocular panoramic camera to shoot images or videos to carry out rapid parameter calibration, and the calibration host is simple and convenient to operate and flexible to assemble.
Referring to fig. 5, fig. 5 is a flowchart illustrating an embodiment of a method for calibrating parameters of a binocular panoramic camera according to an embodiment of the present invention. The flow of the implementation method is realized based on the parameter calibration system of the binocular panoramic camera shown in fig. 1 or fig. 2, and the specific flow is as follows:
s500, placing a binocular panoramic camera on a camera clamp, and performing data connection on the binocular panoramic camera and a calibration host;
step S502, the calibration host sends an instruction to control the binocular panoramic camera to take a picture, and the binocular panoramic camera transmits the shot panoramic image back to the computer;
step S504, according to the shot panoramic image, the calibration host machine utilizes an image processing and nonlinear equation optimization solving method to calculate panoramic camera parameters and splicing parameters;
and S506, writing the calculated camera parameters into a storage unit of the panoramic camera according to the splicing parameter form as a calibration result.
In the embodiment of the invention, the emphasis is on the positions and the number of the characteristic patterns, so that the calibration host can be more efficient and accurate when the panoramic camera parameters and the splicing parameters are calculated.
In the embodiment of the invention, the calibration environment consisting of the calibration box body, the camera supporting rod, the camera clamp and the characteristic pattern can be used for quickly calibrating parameters of the binocular panoramic camera in a small space, and the method is simple and convenient to operate and flexible to assemble.
Referring to fig. 6, fig. 6 is a flowchart illustrating a method for calibrating parameters of a binocular panoramic camera according to an embodiment of the present invention, in step 3.
The step 3 specifically comprises the following steps:
s600, filtering and denoising a shot panoramic original image;
step S602, determining the area of the characteristic pattern by using a circle detection method;
step S604, determining corner points of rectangular butt joint in the feature pattern as feature points by using a corner point detection method in the feature pattern area;
and step S606, listing a nonlinear equation set by using the space coordinates of the feature points and the pixel coordinates of the same feature point in the binocular panoramic camera and combining the fisheye lens model and the image stitching model, and solving the equation set to obtain panoramic camera parameters and stitching parameters.
In the embodiment of the invention, the emphasis is on the positions and the number of the characteristic patterns, so that the calibration host can be more efficient and accurate when the panoramic camera parameters and the splicing parameters are calculated.
In the embodiment of the invention, the calibration environment consisting of the calibration box body, the camera supporting rod, the camera clamp and the characteristic pattern can be used for quickly calibrating parameters of the binocular panoramic camera in a small space, and the method is simple and convenient to operate and flexible to assemble.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The above embodiments of the present invention are described in detail, and the principle and the implementation of the present invention are explained by applying specific embodiments, and the above description of the embodiments is only used to help understanding the method of the present invention and the core idea thereof; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in view of the above, the content of the present specification should not be construed as a limitation to the present invention.