Automatic calibration method for camera pitch angle and installation height

By using thin rods as calibration objects on the ground and using the perspective projection principle of camera imaging, the problem of low calibration accuracy of camera pitch angle and installation height in the prior art is solved, and high-precision automatic calibration is achieved, which is suitable for a wide range of application scenarios .

CN113628278BActive Publication Date: 2024-12-31NANJING AUTOMOBILE GROUP CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110854213.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-27
Publication Date
2024-12-31
Estimated Expiration
2041-07-27

AI Technical Summary

Technical Problem

The existing camera calibration methods have problems such as large identification errors, complex equipment, and limited application, making it difficult to achieve high-precision automatic calibration of camera pitch angle and installation height.

Method used

Using the thin rods on the ground as the calibration object, the perspective projection principle of camera imaging is used to adjust the height and position of the thin rods, measure their imaging position in the image, calculate the pitch angle and installation height of the camera to achieve automatic calibration.

Benefits of technology

It realizes high-precision calibration of camera pitch angle and installation height. The method is simple and easy to use and is suitable for various application scenarios, including on-board cameras and indoor robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113628278B_ABST
    Figure CN113628278B_ABST
Patent Text Reader

Abstract

The present invention discloses a calibration method for the pitch angle and height of a camera installation. A thin rod that can be placed on the ground and has an adjustable height is used as a calibration object. The thin rod is moved and its height is adjusted so that the image formed by the top of the thin rod in an image is located at a specific position of the image. Combined with the camera internal parameters, the calibration results of the pitch angle and height of the camera installation can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The invention belongs to the technical field of image data processing, and in particular relates to an automatic calibration method for a camera pitch angle and installation height. Background technology:

[0002] With the rapid economic development and continuous technological progress in my country, the application scope of machine vision has become more and more extensive. It can be said to be the soul window of industrial automation systems. From object / barcode recognition, product inspection, appearance size measurement to robot arm / transmission equipment positioning, and then to environmental perception, machine vision technology can be used. One of the basic tasks of vision is to calculate the geometric information of objects in three-dimensional space from the image information obtained by the camera, and thus reconstruct and identify the object. The relationship between the three-dimensional geometric position of a point on the surface of a spatial object and its corresponding point in the image is determined by the geometric model of camera imaging. These geometric model parameters are camera parameters. Under most conditions, these parameters must be obtained through experiments and calculations. Whether in image measurement or machine vision applications, the calibration of camera parameters is a very critical link. The accuracy of the calibration results and the stability of the algorithm directly affect the accuracy of the results produced by the camera. Therefore, doing a good job of camera calibration is the prerequisite for doing a good job in subsequent work, and improving the calibration accuracy is the focus of scientific research work.

[0003] At present, among the calibration methods that have been proposed, there is a method of using a two-dimensional code for calibration (such as CN 110378962A). This method is aimed at the calibration problem of vehicle-mounted cameras, and uses a camera to identify a two-dimensional code calibration plate, and determines the camera's posture information from the posture information of the two-dimensional code calibration plate. The disadvantage of this method is that the camera's recognition effect on the two-dimensional code is limited, there is a certain error, and the posture information of the two-dimensional code calibration plate is also difficult to obtain accurately; there is also a method of using a multi-degree-of-freedom motion platform for calibration (such as CN 108932737 A). This method is aimed at the calibration problem of vehicle-mounted cameras, and uses an inertial measurement unit and a camera to track the moving trajectory of the vehicle respectively, and determines the angle between the camera and the inertial measurement unit according to the offset of the tracking trajectory of the two, and obtains the pitch angle of the camera from the pitch angle of the inertial measurement unit. The disadvantage of this method is that it requires the use of a more complex calibration device, and the implementation process is difficult. There is also a method of using special points on the ground for calibration (for example, CN 109389650 B). This method aims at the calibration problem of vehicle-mounted cameras. By acquiring an image containing lane lines, the angle of the lane lines in the image is calculated, and then the camera calibration result is obtained. The disadvantage of this method is that its application scenario is relatively limited and not universal. The above defects are also problems that need to be solved urgently by technicians in this field.

[0004] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention:

[0005] The object of the present invention is to provide a simple, effective and widely used method for automatically calibrating the pitch angle and installation height of a camera, thereby overcoming the above-mentioned defects in the prior art.

[0006] To achieve the above objectives, the present invention provides a method for automatic calibration of camera pitch angles. Under the premise of knowing the intrinsic parameters of the camera, a thin pole with a preset height standing on the ground is used as a calibration object, and the perspective projection principle of camera imaging is used to calibrate the installation pitch angle of the camera.

[0007] It should be noted that: the thin pole in this application only needs to be able to stand on the ground and have a certain height, and there are no special requirements. It would be better if it is a telescopic pole with a height mark or bottom support, such as a tripod for photography or similar support poles.

[0008] The present invention calibrates the pitch angle and height of the camera installation through the imaging position of the thin rod-shaped calibration object in the image. The imaging effect of the calibration object is clear and accurate, and a calibration result with higher precision can be obtained. The present invention uses simple and easy-to-obtain calibration objects, the calibration principle is easy to understand, and the calibration process is easy to implement. The present invention does not have too many restrictions on the calibration environment and is widely applicable to various application scenarios. The intelligent sensing device for this method can be a vehicle working in an outdoor scene or a robot working in an indoor scene.

[0009] Preferably, in the above technical solution, the process of calibrating the camera installation pitch angle is divided into the following two steps:

[0010] Step 1: Place the thin rod used for calibration in the camera field of view and close to the camera, adjust the height and position of the thin rod so that the image formed by the top end of the thin rod in the image coincides with the main point of the image, record the height h1 of the thin rod at this time, and mark the position A′1 of the thin rod on the ground at this time;

[0011] Step 2: Place the thin rod used for calibration in the camera field of view and at a distance from the camera. Adjust the height and position of the thin rod so that the image formed by the top end of the thin rod in the image coincides with the principal point of the image. Record the height h2 of the thin rod at this time and mark the position A′2 of the thin rod on the ground at this time.

[0012] Through steps 1 and 2, we can get the heights h1 and h2 of the thin rods placed twice. By measuring the positions A′1 and A′2 of the thin rods placed twice, we can get the distance d. So the installation pitch angle of the camera is When h1 > h2, that is, when the camera optical axis is lower than the horizontal plane where the camera is located, θ is positive; when h1 < h2, that is, when the camera optical axis is higher than the horizontal plane where the camera is located, θ is negative.

[0013] Preferably, in the above technical solution, during the perspective projection process of camera imaging, let the camera coordinate system be O c -XYZ, and the origin O of the camera coordinate system c , that is, the camera optical center, is located inside the camera. The axis where X is located points to the right of the camera, the axis where Y is located points downward of the camera, and the axis where Z is located is the camera optical axis and points forward of the camera; let the camera imaging plane be S and the pixel coordinate system be O uv -UV. The origin O of the pixel coordinate system uv is located at the upper left vertex of the image. The U axis points to the right of the image along the width direction, and the V axis points downward of the image along the height direction; let the projection point of the point on the camera optical axis on the imaging plane, that is, the image principal point, have coordinates (u0, v0) in the pixel coordinate system, and the camera focal length be f; let any point p in the camera field of view have coordinates (x, y, z) in the camera coordinate system, the projection point of p on the imaging plane be p′, and the coordinates of p′ in the pixel coordinate system be (u, v), then there is

[0014] Equation 1. In Equation 1, f u = f / d u , f v = f / d v , d u 、d v are the physical sizes of each pixel along the U axis and V axis, and f u 、f v 、u0, and v0 are the camera internal parameters.

[0015] A method for automatically calibrating the installation height of a camera, on the premise of knowing the camera internal parameters, uses a thin rod with a preset height standing on the ground as a calibration object, and calibrates the installation pitch angle of the camera by using the perspective projection principle of camera imaging, and further calibrates the installation height of the camera by using the installation pitch angle.

[0016] Preferably, in the above technical solution, the process of calibrating the installation pitch angle of the camera is divided into the following two steps:

[0017] Step 1: Place the calibration thin rod within the camera field of view and close to the camera, adjust the height and position of the thin rod so that the image of the top endpoint of the thin rod in the image exactly coincides with the image principal point, record the height h1 of the thin rod at this time, and mark the position A′1 of the thin rod on the ground at this time;

[0018] Step 2: Place the calibration rod at a relatively far distance from the camera within the camera's field of view. Adjust the height and position of the rod so that the image of the top endpoint of the rod coincides exactly with the principal point of the image. Record the height h2 of the rod at this time, and mark the position A′2 of the rod on the ground at this time.

[0019] Through Step 1 and Step 2, the heights h1 and h2 of the rod when placed twice can be obtained. By measuring the positions A′1 and A′2 of the rod when placed twice, the spacing d can be obtained. Thus, the installation pitch angle of the camera is When h1 > h2, that is, when the optical axis of the camera is lower than the horizontal plane where the camera is located, θ is positive; when h1 < h2, that is, when the optical axis of the camera is higher than the horizontal plane where the camera is located, θ is negative.

[0020] Preferably, in the above technical solution, according to the installation pitch angle of the camera and the camera internal parameters, the projection point p′ on the imaging plane of the points on the camera contour line in the vertical plane where the camera optical axis is located can be obtained. a The pixel coordinates of are (u0, -f v tanθ + v0), then the process of calibrating the installation height of the camera is completed by the following steps:

[0021] Step 3: Place the calibration rod within the camera's field of view. Adjust the height and position of the rod so that the image of the top endpoint of the rod coincides exactly with p′ a coincides, and record the height h3 of the rod at this time.

[0022] Through Step 3, the installation height of the camera can be obtained as h = h3.

[0023] Preferably, in the above technical solution, in the perspective projection process of camera imaging, let the camera coordinate system be O c -XYZ, the origin O of the camera coordinate system c , that is, the camera optical center, is located inside the camera. The axis where X is located points to the right of the camera, the axis where Y is located points downward of the camera, and the axis where Z is located is the camera optical axis and points forward of the camera; let the camera imaging plane be S, and the pixel coordinate system be O uv -UV. The origin O of the pixel coordinate system uv is located at the upper left vertex of the image. The U axis points to the right of the image along the width direction, and the V axis points downward of the image along the height direction; let the coordinates of the projection point of the point on the camera optical axis on the imaging plane, that is, the principal point of the image, in the pixel coordinate system be (u0, v0), and the camera focal length be f; let the coordinates of any point p in the camera field of view in the camera coordinate system be (x, y, z), the projection point of p on the imaging plane be p′, and the coordinates of p′ in the pixel coordinate system be (u, v), then there is

[0024] Equation 1, in Equation 1, f u = f / du , f v = f / d v , d u , d v is the physical size of each pixel along the U-axis and V-axis, f u , f v , u0, v0 are the internal parameters of the camera.

[0025] An automatic calibration method for the pitch angle and installation height of a camera. Assume that the ground is an ideal plane and the left-right flip angle of the camera is zero. The origin O of the camera coordinate system c The projection point on the ground is O' c , restricted by factors such as device packaging and installation conditions, in many cases the projection point O' c Cannot be directly measured; assume that there is an adjustable-height thin rod standing on the ground within the camera's field of view. The top endpoint of the thin rod can be clearly imaged in the camera plane, and the projection point of this top endpoint on the ground is easy to measure; First, place the thin rod close to the camera, adjust the height and position of the thin rod so that the image of the top endpoint of the thin rod in the image coincides exactly with the principal point of the image. Assume that the height of the thin rod is h1 at this time, and the projection point of the top endpoint of the thin rod on the ground is A'1; Then place the thin rod far from the camera, adjust the height and position of the thin rod so that the image of the top endpoint of the thin rod in the image coincides exactly with the principal point of the image. Assume that the height of the thin rod is h2 at this time, and the projection point of the top endpoint of the thin rod on the ground is A'2; Assume that the distance between A'1 and A'2 is d, and the pitch angle of the camera is θ. Then according to the geometric relationship, there is

[0026]

[0027] So, the pitch angle of the camera is

[0028]

[0029] In Equation 3, when h1 > h2, that is, when the optical axis of the camera is below the horizontal plane where the camera is located, θ is positive; when h1 < h2, that is, when the optical axis of the camera is above the horizontal plane where the camera is located, θ is negative.

[0030] After obtaining the pitch angle of the camera, continue to use the aforementioned thin rod as a calibration object to calibrate the installation height h of the camera.

[0031] Within the camera's field of view, assume that in the vertical plane where the optical axis of the camera is located, that is, the O c -YZ plane, there is a point p a , and its coordinates in the camera coordinate system are (x a , y a , z a ), p a The projection point on the imaging plane is p' a , p'a The coordinates in the pixel coordinate system are (u a ,v a ), according to the camera imaging principle, we have

[0032]

[0033] Furthermore, there are

[0034]

[0035] Because p a Located in O c -In the YZ plane, there is x a =0, so

[0036] u a =u0 Formula 6,

[0037] Let p a The height is the same as the camera height, i.e. p a On the camera contour, according to the spatial geometric relationship, we have

[0038]

[0039] In Equation 7, θ is the camera pitch angle obtained in Equation 3, so

[0040] v a =-f v tanθ+v0 Equation 8,

[0041] Combining equation 6 and equation 8, p′ a The coordinates in the pixel coordinate system are

[0042]

[0043] In the above assumptions, no provision is made for p a The distance from the camera, that is, p a The distance from the camera does not affect p′ a Coordinates in the pixel coordinate system; Based on this, place the thin rod in the camera field of view, adjust the height and position of the thin rod, so that the pixel coordinates of the projection point of the top end of the thin rod on the imaging plane are (u0, -f v tanθ+v0), assuming the height of the thin rod is h3, then the camera height is h=h3 (Equation 10).

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] The camera installation pitch angle and height calibration method proposed in the present invention is simple and easy to implement and has high calibration result accuracy. The method is designed based on the camera imaging principle and spatial geometric relationship. The calibration principle is simple and reliable, and a relatively accurate camera installation pitch angle and height can be obtained. The calibration object used in the method is easy to obtain and has low complexity. The method is widely applicable and is applicable to monocular cameras, binocular cameras, distorted cameras, non-distorted cameras, etc. Description of the drawings:

[0046] Figure 1 For the camera imaging process;

[0047] Figure 2 For calibration principle;

[0048] Figure 3a For experimental environment;

[0049] Figure 3b The reference pitch angle for the camera;

[0050] Figure 3c is the camera reference height;

[0051] Figure 4a Pitch angle calibration step 1;

[0052] Figure 4b Pitch angle calibration step 2;

[0053] Figure 4c Pitch angle calibration step three;

[0054] Figure 5 Car-mounted camera installation pitch angle and height calibration experiment;

[0055] Figure 6a Camera installation height calibration step 1;

[0056] Figure 6b Camera installation height calibration step 2;

[0057] Figure 6c Camera installation height calibration step three. Specific implementation method:

[0058] The specific embodiments of the present invention are described in detail below, but it should be understood that the protection scope of the present invention is not limited by the specific embodiments.

[0059] Unless otherwise expressly stated, throughout the specification and claims, the term "comprise" or its variations such as "include" or "including" shall be understood to include the stated elements or components without excluding other elements or components. It should be noted that the calibration object in this application only needs to be able to stand on the ground and have a certain height, without any special requirements. It would be better if it is a telescopic pole with a height mark or bottom support, such as a tripod for photography or a similar support pole.

[0060] Example 1

[0061] Calibration principle Figure 1 As shown, in the perspective projection process of camera imaging, the camera coordinate system is assumed to be O c -XYZ, camera coordinate system origin O c , that is, the optical center of the camera, is located inside the camera, the X axis points to the right of the camera, the Y axis points to the bottom of the camera, and the Z axis is the optical axis of the camera and points to the front of the camera; let the camera imaging plane be S and the pixel coordinate system be O uv -UV, pixel coordinate system origin O uv Located at the upper left vertex of the image, the U axis points to the right of the image along the width direction, and the V axis points to the bottom of the image along the height direction; let the projection point of the point on the camera optical axis on the imaging plane, that is, the principal point of the image, have coordinates (u0, v0) in the pixel coordinate system, and the focal length of the camera is f; let the coordinates of any point p in the camera field of view in the camera coordinate system be (x, y, z), the projection point of p on the imaging plane be p′, and the coordinates of p′ in the pixel coordinate system be (u, v), then

[0062]

[0063] In formula (1), f u =f / d u , f v =f / d v , d u ,d v is the physical size of each pixel along the U and V axes, f u 、f v , u0, v0 are the camera internal parameters.

[0064] The invention is based on the camera imaging principle, utilizes the spatial geometric relationship involved in imaging objects in the camera field of view, and uses a thin rod that can be stood on the ground and has an adjustable height as a calibration object to calibrate the installation pitch angle and height of the camera.

[0065] like Figure 2 As shown, assuming that the ground is an ideal plane and the left and right flip angles of the camera are zero, the origin of the camera coordinate system is O c The projection point on the ground is O'c , limited by factors such as device packaging and installation conditions, in many cases, the projection point O' c cannot be directly measured; assume that there is an adjustable-height thin rod standing on the ground within the camera's field of view, and the top endpoint of the thin rod can be clearly imaged in the camera plane, and the projection point of this top endpoint on the ground is easy to measure; first, place the thin rod close to the camera, adjust the height and position of the thin rod so that the image of the top endpoint of the thin rod in the image exactly coincides with the principal point of the image. Let the height of the thin rod be h1 at this time, and the projection point of the top endpoint of the thin rod on the ground be A'1; then place the thin rod far from the camera, adjust the height and position of the thin rod so that the image of the top endpoint of the thin rod in the image exactly coincides with the principal point of the image. Let the height of the thin rod be h2 at this time, and the projection point of the top endpoint of the thin rod on the ground be A'2; assume the distance between A'1 and A'2 is d, and the camera pitch angle is θ. Then, according to geometric relationships, there is

[0066]

[0067] Thus, the camera pitch angle is

[0068]

[0069] In formula (3), when h1 > h2, that is, when the camera optical axis is lower than the horizontal plane where the camera is located, θ is positive; when h1 < h2, that is, when the camera optical axis is higher than the horizontal plane where the camera is located, θ is negative.

[0070] After obtaining the camera pitch angle, continue to use the aforementioned thin rod as a calibration object to calibrate the camera installation height h.

[0071] Within the camera's field of view, assume that in the vertical plane where the camera optical axis is located, that is, in the O c - YZ plane, there is a point p a , and its coordinates in the camera coordinate system are (x a , y a , z a ). The projection point of p a on the imaging plane is p' a , and the coordinates of p' a in the pixel coordinate system are (u a , v a ). According to the camera imaging principle, there is

[0072]

[0073] Further, there is

[0074]

[0075] Since p a is located at O c-In the YZ plane, there is x a =0, so

[0076] u a =u0 Formula (6),

[0077] Let p a The height is the same as the camera height, i.e. p a On the camera contour, according to the spatial geometric relationship, we have

[0078]

[0079] In formula (7), θ is the camera pitch angle obtained in formula (3), so

[0080] v a =-f v tanθ+v0 Formula (8),

[0081] Combining formula (6) and formula (8), p′ a The coordinates in the pixel coordinate system are

[0082]

[0083] In the above assumptions, no provision is made for p a The distance from the camera, that is, p a The distance from the camera does not affect p′ a Coordinates in the pixel coordinate system. Based on this, place the thin rod in the camera field of view, adjust the height and position of the thin rod, so that the pixel coordinates of the projection point of the top end of the thin rod on the imaging plane are (u0, -f v tanθ+v0), let the height of the thin rod be h3, then the camera height is

[0084] h=h3 Formula (10).

[0085] Example 2

[0086] In the experimental environment shown in Figure 3-a, the proposed calibration method is used to calibrate the camera's installation pitch angle and height. The black thin rod in the figure is the calibration object, and the height of the thin rod is adjustable. The camera to be calibrated is located at the lower left of the figure. The intrinsic parameter of the camera to be calibrated is f u =906.44 (pixels), f v =920.96 (pixels), u0 = 319 (pixels), v0 = 180 (pixels). Before calibration, as shown in Figure 3-b, the pitch angle of the camera is measured with an angle ruler as θ * =5.0°; as shown in Figure 3-c, the height of the camera is measured with a tape measure as h *=0.965m. In fact, the camera pitch angle and height obtained from the above measurements are not accurate, but can be used as a reference standard.

[0087] First, calibrate the camera installation pitch angle. According to the camera internal parameters, the coordinates of the image principal point in the pixel coordinate system are (319, 180). Mark the principal point in the camera image, and then perform the following steps:

[0088] Step 1: As shown in Figure 4-a (the red dot in the figure is the principal point of the image), according to the proposed calibration method, place the thin rod used for calibration in the camera field of view and close to the camera, adjust the height and position of the thin rod so that the image formed by the top end point of the thin rod in the image coincides with the principal point of the image, record the height of the thin rod at this time h1 = 0.900m, and mark the position of the thin rod on the ground at this time A′1.

[0089] Step 2: As shown in Figure 4-b (the red dot in the figure is the principal point of the image), according to the proposed calibration method, place the thin rod used for calibration in the camera field of view and at a distance from the camera, adjust the height and position of the thin rod so that the image formed by the top end point of the thin rod in the image coincides with the principal point of the image, record the height of the thin rod at this time h2 = 0.815m, and mark the position of the thin rod on the ground at this time A′2.

[0090] After completing steps 1 and 2, measure the distance between A′1 and A′2, d = 1.185 m. According to the proposed formula, the camera pitch angle is The deviation between the calibration value and the measured value is e θ =|θ * -θ|=0.9°.

[0091] Secondly, the camera installation height is calibrated. According to the camera installation pitch angle and the camera internal parameters, the projection point p′ of the point on the camera contour line on the imaging plane in the vertical plane where the camera optical axis is located is obtained. a The pixel coordinates are (319,114), mark the projection point in the camera image, and then perform the following steps:

[0092] Step 3: As shown in Figure 4-c (the green point in the figure is p′ a ), according to the proposed calibration method, place the thin rod for calibration in the camera field of view, adjust the height and position of the thin rod, so that the image of the top end of the thin rod in the image is exactly the same as p′ a Overlap and record the height of the thin rod at this time: h3 = 0.962m.

[0093] Through step three, the installation height of the camera can be obtained as h=h3.

[0094] After completing step 3, according to the proposed formula, the camera height is obtained as h = h3 = 0.962m. The deviation between this calibration value and the measured value is e h =|h * -h|=0.003m.

[0095] Example 3

[0096] Generally speaking, the installation position of the camera on the vehicle or other intelligent sensing equipment is rather special, and it is not easy to directly measure its pitch angle and height. Figure 5 In the experimental vehicle shown in the figure, the on-board camera is installed in the upper middle position of the front windshield of the vehicle. The proposed calibration method is used to calibrate the installation pitch angle and height of the on-board camera. The black thin rod in the figure is the calibration object, and the height of the thin rod is adjustable. The internal parameter of the camera to be calibrated is f u =946.15 (pixels), f v =948.23 (pixels), u0=327 (pixels), v0=173 (pixels).

[0097] First, calibrate the camera installation pitch angle. According to the camera internal parameters, the coordinates of the image principal point in the pixel coordinate system are (327, 173). Mark the principal point in the camera image, and then perform the following steps:

[0098] Step 1: As shown in Figure 6-a (the red dot in the figure is the principal point of the image), according to the proposed calibration method, place the thin rod used for calibration in the camera field of view and close to the camera, adjust the height and position of the thin rod so that the image formed by the top end of the thin rod in the image coincides with the principal point of the image, record the height of the thin rod at this time h1 = 1.810m, and mark the position of the thin rod on the ground at this time A′1;

[0099] Step 2: As shown in Figure 6-b (the red dot in the figure is the principal point of the image), according to the proposed calibration method, place the thin rod used for calibration in the camera field of view and far away from the camera, adjust the height and position of the thin rod so that the image formed by the top end of the thin rod in the image coincides with the principal point of the image, record the height of the thin rod at this time h2 = 1.850m, and mark the position of the thin rod on the ground at this time A′2;

[0100] After completing steps 1 and 2, the distance between A′1 and A′2 is measured as d = 4.210 m. According to the proposed formula, the camera pitch angle is obtained as The negative sign indicates that the camera optical axis is above the horizontal plane where the camera is located.

[0101] Secondly, the camera installation height is calibrated. According to the camera installation pitch angle and the camera internal parameters, the projection point p′ of the point on the camera contour line on the imaging plane in the vertical plane where the camera optical axis is located is obtained. aThe pixel coordinates are (327,181), mark the projection point in the camera image, and then perform the following steps:

[0102] Step 3: As shown in Figure 6-c (the green point in the figure is p′ a ), according to the proposed calibration method, place the thin rod for calibration in the camera field of view, adjust the height and position of the thin rod, so that the image of the top end of the thin rod in the image is exactly the same as p′ a Overlap and record the height of the thin rod at this time, h3 = 1.780m.

[0103] After completing step 3, according to the proposed formula, the camera height is obtained as h = h3 = 1.780 m.

[0104] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

Claims

1. A method for automatically calibrating the installation height of a camera, characterized in that: Under the premise of knowing the intrinsic parameters of the camera, a thin pole with a preset height standing on the ground is used as a calibration object. The camera's installation pitch angle is calibrated using the perspective projection principle of camera imaging, and the camera's installation height is further calibrated using the installation pitch angle. The process of calibrating the camera installation pitch angle is divided into the following two steps: Step 1: Place the thin rod used for calibration in the camera field of view and close to the camera, adjust the height and position of the thin rod so that the image formed by the top end of the thin rod in the image coincides with the main point of the image, record the height h1 of the thin rod at this time, and mark the position A′1 of the thin rod on the ground at this time; Step 2: Place the thin rod used for calibration in the camera field of view and at a distance from the camera. Adjust the height and position of the thin rod so that the image formed by the top end of the thin rod in the image coincides with the principal point of the image. Record the height h2 of the thin rod at this time and mark the position A′2 of the thin rod on the ground at this time. Through steps 1 and 2, we can get the heights h1 and h2 of the thin rods placed twice. By measuring the positions A′1 and A′2 of the thin rods placed twice, we can get the distance d. So the installation pitch angle of the camera is When h1>h2, that is, the camera optical axis is lower than the horizontal plane where the camera is located, θ is positive; when h1<h2, that is, the camera optical axis is higher than the horizontal plane where the camera is located, θ is negative; in the perspective projection process of camera imaging, the camera coordinate system is set to O c -XYZ, camera coordinate system origin O c , that is, the optical center of the camera, is located inside the camera, the X axis points to the right of the camera, the Y axis points to the bottom of the camera, and the Z axis is the optical axis of the camera and points to the front of the camera; let the camera imaging plane be S, and the pixel coordinate system be Pixel coordinate system origin Located at the upper left vertex of the image, the U axis points to the right of the image along the width direction, and the V axis points to the bottom of the image along the height direction; let the projection point of the point on the camera optical axis on the imaging plane, that is, the principal point of the image, have coordinates (u0, v0) in the pixel coordinate system, and the focal length of the camera is f; let the coordinates of any point p in the camera field of view in the camera coordinate system be (x, y, z), the projection point of P on the imaging plane be p′, and the coordinates of p′ in the pixel coordinate system be (u, v), then In formula 1, f m =f / d m , f v =f / d v , d m d v is the physical size of each pixel along the U and V axes, f m 、f v , u0, v0 are the camera internal parameters; according to the camera installation pitch angle and the camera internal parameters, the projection point p′ of the point on the camera contour line on the imaging plane in the vertical plane where the camera optical axis is located can be obtained a The pixel coordinates are (u0, -f v tanθ+v0), the process of calibrating the camera installation height is completed by the following steps: Step 3: Place the calibration rod in the camera field of view, and adjust the rod height and position so that the image of the rod’s top end in the image coincides with p′. a Overlap, record the height h3 of the thin rod at this time; Through step three, the installation height of the camera can be obtained as h=h3.