A method for adjusting the installation angle of a vehicle-mounted camera based on visual geometry
By adjusting the installation angle of the vehicle-mounted camera using visual geometry methods and aligning the virtual crosshair with the actual target's crosshair, the problem of the inability to adjust the installation angle of the vehicle-mounted camera was solved, achieving high-precision and low-cost camera angle adjustment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI QIANCHEN AUTOMOBILE TECH CO LTD
- Filing Date
- 2023-09-06
- Publication Date
- 2026-07-24
AI Technical Summary
In the existing technology, the installation angle of vehicle-mounted cameras is fixed when the vehicle leaves the factory, and it is impossible to make precise and rapid adjustments in a low-cost experimental environment to meet the needs of different installation angles.
A visual geometry-based method is used to determine the target installation angle of the camera and adjust the target position so that the five points, including the optical center of the camera and the crosshair of the target, are coplanar. The camera angle is then adjusted using the pixel coordinates of the virtual crosshair to achieve precise alignment of the camera installation angle.
It enables high-precision and rapid adjustment of the camera installation angle under low-cost conditions to meet the needs of subsequent experiments. It requires few tools, is low-cost, easy to operate, and is suitable for multiple adjustments.
Smart Images

Figure CN117141387B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle-mounted camera installation technology, and in particular to a method for adjusting the installation angle of a vehicle-mounted camera based on visual geometry. Background Technology
[0002] The installation angle of a typical vehicle camera is fixed at the factory, and engineers cannot adjust it. It is assumed that the installation angle is already within the acceptable error range of the target installation angle, requiring only more precise extrinsic parameter calibration of its existing fixed pose. However, due to the needs of actual vehicle testing, when adjusting the camera to different installation angles for the same vehicle for subsequent experiments, adjusting the installation angle of the vehicle camera to within the allowable error range of the target angle becomes a primary problem to solve.
[0003] Therefore, there is an urgent need for a method to adjust the installation angle of vehicle cameras based on visual geometry. Summary of the Invention
[0004] The purpose of this invention is to provide a method for adjusting the installation angle of a vehicle-mounted camera based on visual geometry, so as to solve the problems in the prior art and enable the camera installation angle to be adjusted more accurately and quickly in a low-cost experimental environment.
[0005] This invention provides a method for adjusting the mounting angle of an in-vehicle camera based on visual geometry, comprising:
[0006] Determine the target installation angle for the camera;
[0007] Adjust the target position so that the five points—the camera optical center, the perpendicular from the camera optical center to the ground, the target crosshair, the perpendicular from the target crosshair to the ground, and the perpendicular from the target crosshair to the line connecting the camera optical center and the ground—are coplanar.
[0008] Based on the adjusted target position and the target installation angle of the camera, the pixel coordinates of the virtual crosshair are obtained according to the world coordinate system coordinates of the target's crosshair.
[0009] Adjust the camera angle based on the pixel coordinates of the virtual crosshair so that the virtual crosshair aligns with the actual crosshair of the target.
[0010] The method for adjusting the mounting angle of an in-vehicle camera based on visual geometry, as described above, preferably includes determining the target mounting angle of the camera, specifically comprising:
[0011] Determine the target's downward pitch angle ψ° and the target's outward deflection angle θ°.
[0012] The method for adjusting the mounting angle of a vehicle-mounted camera based on visual geometry, as described above, preferably involves adjusting the target position so that five points—the camera's optical center, the perpendicular from the camera's optical center to the ground, the target's crosshair, the perpendicular from the target's crosshair to the ground, and the perpendicular from the target's crosshair to the line connecting the camera's optical center and the ground—are coplanar. Specifically, this includes:
[0013] Select a point O on the target as the crosshair;
[0014] Determine the foot of the perpendicular from the optical center of the camera to the ground, and mark it as point A;
[0015] Draw a line AE parallel to the vehicle's centerline through point A;
[0016] Determine point B from point A and parallel line AE, so that... Furthermore, the angle yaw between line AB and line AE is θ°, where Z is set manually;
[0017] Place a spirit level on line AB, aligning the vertical center of the target with point B, which is determined by point A and the parallel line AE, so that the vertical green light from the spirit level passes through the vertical center line of the target.
[0018] The method for adjusting the mounting angle of a vehicle-mounted camera based on visual geometry, as described above, preferably includes obtaining the pixel coordinates of the virtual crosshair based on the world coordinate system coordinates of the target's crosshair, according to the adjusted target position and the camera's target mounting angle. Specifically, this includes:
[0019] Based on the adjusted target position, measure the height difference |CD| between the camera optical center and the target crosshair.
[0020] Based on the height difference |CD| between the optical center of the camera and the crosshair of the target, determine the ordinate Y of the target's crosshair in the world coordinate system.
[0021] Based on the distance |AB| between the perpendicular from the camera's optical center to the ground and the perpendicular from the target's crosshair to the ground, determine the vertical coordinate Z of the target's crosshair in the world coordinate system.
[0022] Determine the rotation matrix between the world coordinate system and the camera coordinate system based on the target installation angle of the camera;
[0023] The pixel coordinates of the virtual crosshair are obtained based on the camera's intrinsic parameter matrix, the Y and Z coordinates of the target's crosshair in the world coordinate system, and the rotation and translation matrices between the world coordinate system and the camera coordinate system.
[0024] The method for adjusting the mounting angle of a vehicle-mounted camera based on visual geometry, as described above, preferably includes determining the ordinate Y of the target's crosshair in the world coordinate system based on the height difference CD between the camera's optical center and the target's crosshair.
[0025] The ordinate Y of the target's crosshair in the world coordinate system is determined using the following formula:
[0026] Y = |CD|;
[0027] The step of determining the vertical coordinate Z of the target's crosshair in the world coordinate system based on the distance AB between the perpendicular from the camera's optical center to the ground and the perpendicular from the target's crosshair to the ground specifically includes:
[0028] The vertical coordinate Z of the target's reticle in the world coordinate system is determined using the following formula:
[0029] Z = |AB|.
[0030] The method for adjusting the mounting angle of a vehicle-mounted camera based on visual geometry, as described above, preferably includes obtaining the pixel coordinates of the virtual crosshair based on the camera's intrinsic parameter matrix, the ordinate Y and ordinate Z of the target's crosshair in the world coordinate system, and the rotation and translation matrices between the world coordinate system and the camera coordinate system. Specifically, this includes:
[0031] Based on the camera's intrinsic parameter matrix, the ordinate (Y) and ordinate (Z) of the target's crosshair in the world coordinate system, and the rotation and translation matrices between the world coordinate system and the camera coordinate system, the pixel coordinates of the virtual crosshair are calculated using the following formula.
[0032]
[0033] in, This represents the intrinsic parameter matrix of the camera.
[0034]
[0035] This represents the translation matrix from the world coordinate system to the camera coordinate system.
[0036] R 3×3 This represents the rotation matrix between the world coordinate system and the camera coordinate system, obtained by transforming the rotation vector [row,yaw,pitch]=[0°,θ°,-ψ°]. Row represents the target roll angle of the camera, yaw represents the target yaw angle of the camera, and pitch represents the target pitch angle of the camera.
[0037] The method for adjusting the mounting angle of a vehicle-mounted camera based on visual geometry, as described above, preferably includes the following: Adjusting the camera angle according to the pixel coordinates of the virtual crosshair so that the virtual crosshair aligns with the actual crosshair of the target.
[0038] Loosen all the nuts on the camera bracket;
[0039] Based on the pixel coordinates (u,v) of the virtual crosshair, draw the virtual crosshair in real time at the camera screen (u,v);
[0040] Adjust the camera angle so that the virtual crosshair aligns with the actual crosshair of the target.
[0041] Tighten all the nuts on the camera bracket.
[0042] This invention provides a method for adjusting the installation angle of a vehicle-mounted camera based on visual geometry. It utilizes visual geometry principles to generate a virtual crosshair based on the camera's ideal installation parameters. The camera's installation angle is adjusted by aligning the virtual crosshair with the actual target's crosshair, correcting its parameters to within the allowable error range for subsequent calibration and use. This method does not rely on a specific target pattern, processes data in real-time, requires few tools, has low implementation costs, and is easy to operate. It eliminates the need for re-machining of molds such as camera mounting brackets, and is not a one-time molding and solidification process; it allows for multiple adjustments to the desired target installation angle, resulting in high adjustment accuracy. Attached Figure Description
[0043] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described below with reference to the accompanying drawings, wherein:
[0044] Figure 1 A flowchart illustrating an embodiment of the vehicle-mounted camera installation angle adjustment method based on visual geometry provided by the present invention;
[0045] Figure 2 A diagram illustrating the adjustment of the target position;
[0046] Figure 3 This is a schematic diagram showing the relative positions of the virtual crosshair and the target's crosshair.
[0047] Figure 4 This diagram illustrates how to adjust the camera angle so that the virtual crosshair aligns with the actual crosshair of the target. Detailed Implementation
[0048] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. The descriptions of the exemplary embodiments are merely illustrative and are in no way intended to limit the present disclosure or its application or use. The present disclosure may be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided so that the present disclosure will be thorough and complete, and will fully express the scope of the disclosure to those skilled in the art. It should be noted that, unless specifically stated otherwise, the relative arrangement of components and steps, the composition of materials, numerical expressions, and values set forth in these embodiments should be interpreted as exemplary only and not as limiting.
[0049] The terms “first,” “second,” and similar terms used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different parts. Terms such as “including” or “contains” mean that the element preceding the term encompasses the element listed after it, and do not exclude the possibility of encompassing other elements as well. Terms such as “above” and “below” are used only to indicate relative positional relationships; when the absolute position of the described object changes, this relative positional relationship may also change accordingly.
[0050] In this disclosure, when a specific component is described as being located between a first component and a second component, an intermediary component may or may not be present between the specific component and the first or second component. When a specific component is described as connecting to other components, the specific component may be directly connected to the other components without having an intermediary component, or it may not be directly connected to the other components but may have an intermediary component.
[0051] All terms used in this disclosure (including technical or scientific terms) have the same meaning as understood by one of ordinary skill in the art to which this disclosure pertains, unless otherwise specifically defined. It should also be understood that terms defined in a general dictionary, such as a dictionary, should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or highly formalized meaning, unless expressly defined herein.
[0052] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, they should be considered part of the specification.
[0053] For the external parameter calibration of the camera to meet the requirements, the camera must be installed correctly. For camera brackets with adjustable mounting angles, this invention can quickly and conveniently adjust the camera's mounting angle to within the allowable error range for calibration and subsequent use.
[0054] like Figure 1 As shown, the method for adjusting the installation angle of a vehicle-mounted camera based on visual geometry provided in this embodiment includes the following steps in actual execution:
[0055] Step S1: Determine the target installation angle of the camera.
[0056] Specifically, such as Figure 2 As shown, the target's downward pitch ψ° and the target's outward deflection angle θ° are determined.
[0057] Step S2: Adjust the target position so that the five points—the camera optical center, the perpendicular from the camera optical center to the ground, the target crosshair, the perpendicular from the target crosshair to the ground, and the perpendicular from the target crosshair to the line connecting the camera optical center and the ground—are coplanar.
[0058] like Figure 2 As shown, in one embodiment of the vehicle-mounted camera installation angle adjustment method based on visual geometry of the present invention, step S2 may specifically include:
[0059] Step S21: Select a point O on the target as the crosshair;
[0060] Step S22: Determine the perpendicular from the camera's optical center to the ground and mark it as point A.
[0061] Step S23: Draw a line AE parallel to the vehicle's centerline through point A.
[0062] Step S24: Determine point B from point A and the parallel line AE, so that... Furthermore, the angle yaw between line AB and line AE is θ°, where Z is set manually.
[0063] Step S25: Place a level on line AB and align the vertical center of the target with point B, which is determined by point A and the parallel line AE, so that the longitudinal green light of the level passes through the vertical center line of the target.
[0064] By accurately placing the target through steps S21-S25, it is ensured that the five points of ABOCD are coplanar. In other embodiments of the present invention, other methods can be used to place the target to make the five points of ABOCD coplanar.
[0065] Step S3: Based on the adjusted target position and the target installation angle of the camera, obtain the pixel coordinates of the virtual crosshair according to the world coordinate system coordinates of the target crosshair.
[0066] In one embodiment of the vehicle-mounted camera installation angle adjustment method based on visual geometry of the present invention, step S3 may specifically include:
[0067] Step S31: Based on the adjusted target position, measure the height difference CD between the camera optical center and the target crosshair.
[0068] Step S32: Determine the ordinate Y of the target's crosshair in the world coordinate system based on the height difference CD between the camera's optical center and the target's crosshair.
[0069] Specifically, the ordinate Y in the world coordinate system of the target's reticle is determined using the following formula:
[0070] Y = |CD|.
[0071] Step S33: Determine the vertical coordinate Z of the target's crosshair in the world coordinate system based on the distance AB between the perpendicular from the camera's optical center to the ground and the perpendicular from the target's crosshair to the ground.
[0072] Specifically, the vertical coordinate Z of the target's reticle in the world coordinate system is determined using the following formula:
[0073] Z = |AB|.
[0074] Step S34: Determine the rotation matrix between the world coordinate system and the camera coordinate system based on the target installation angle of the camera.
[0075] Step S35: Based on the camera's intrinsic parameter matrix, the vertical coordinates Y and Z of the target's crosshair in the world coordinate system, and the rotation and translation matrices between the world coordinate system and the camera coordinate system, obtain the pixel coordinates of the virtual crosshair.
[0076] Specifically, based on the camera's intrinsic parameter matrix, the ordinate (Y) and ordinate (Z) of the target's crosshair in the world coordinate system, and the rotation and translation matrices between the world coordinate system and the camera coordinate system, the pixel coordinates of the virtual crosshair are calculated using the following formula.
[0077]
[0078] in, The intrinsic parameter matrix of the camera is a known quantity.
[0079] The measurement can be obtained after the target is placed in the preset position.
[0080] This represents the translation matrix from the world coordinate system to the camera coordinate system. The translation matrix in the camera extrinsic parameter matrix represents the transformation relationship between the camera's position and orientation in the world coordinate system, that is, the amount of translation the camera makes from the origin to its current position. This translation matrix contains the translation components of the camera along the X, Y, and Z axes, describing the distance the camera moves along each axis from the origin of the world coordinate system. Since the origin of both the world coordinate system and the camera coordinate system is point C, there is only rotation between the world coordinate system and the camera coordinate system, no translation; therefore, the translation vector is a zero vector.
[0081] R 3×3 This represents the rotation matrix between the world coordinate system and the camera coordinate system, obtained by transforming the rotation vector [row, yaw, pitch] = [0°, θ°, -ψ°]. `row` represents the target roll angle of the camera, typically 0°. In some embodiments of this invention, the roll angle `row` can be adjusted simultaneously if needed; this invention does not specifically limit this. `yaw` represents the target outward deflection angle of the camera, and `pitch` represents the target downward pitch angle of the camera. The rotation matrix in the camera extrinsic parameter matrix represents the transformation relationship of the camera's orientation and facing in the world coordinate system, i.e., the angle and axis of rotation from the original facing to the current facing. This rotation matrix includes the angle of rotation around a specific axis, describing the camera's rotational transformation in three-dimensional space.
[0082] Formula (1) can be used to transform a 3D point from the world coordinate system to the camera pixel coordinate system. After determining the 3D coordinates of the crosshair in the world coordinate system, the 2D coordinates of the crosshair in the pixel coordinate system of the camera image can be calculated using formula (1). Figure 3 As shown, taking the target installation angle of the camera facing forward on the right side of the vehicle [row,yaw,pitch]=[0°,47°,-25°] as an example, the pixel coordinates (u,v) of the target's crosshair in the world coordinate system [X,Y,Z,1] are calculated using formula (1), where,
[0083] Step S4: Adjust the camera angle according to the pixel coordinates of the virtual crosshair so that the virtual crosshair is aligned with the actual crosshair of the target.
[0084] In one embodiment of the vehicle-mounted camera installation angle adjustment method based on visual geometry of the present invention, step S4 may specifically include:
[0085] Step S41: Loosen all the nuts on the camera bracket.
[0086] Step S42: Draw the virtual crosshair in real time at the camera screen (u,v) based on the pixel coordinates (u,v) of the virtual crosshair.
[0087] Step S43: Adjust the camera angle so that the virtual crosshair is aligned with the actual crosshair of the target.
[0088] Step S44: Tighten all nuts on the camera bracket.
[0089] The vehicle-mounted camera installation angle adjustment method based on visual geometry provided in this invention utilizes visual geometry principles to generate a virtual crosshair based on the camera's ideal installation parameters. The installation angle of the camera is adjusted by aligning the virtual crosshair with the actual target crosshair, correcting its parameters to within the allowable error range for subsequent calibration and use. This method does not rely on a specific target pattern, processes data in real time, requires few tools, has low implementation costs, and is easy to operate. It does not require re-machining of molds such as camera mounting brackets, is not a one-time molding and solidification process, and can be adjusted multiple times for the required target installation angle. The adjustment accuracy is high.
[0090] The embodiments of this disclosure have now been described in detail. To avoid obscuring the concept of this disclosure, some details known in the art have not been described. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein based on the above description.
[0091] While specific embodiments of this disclosure have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments or equivalent substitutions can be made to some technical features without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.
Claims
1. A method for adjusting the mounting angle of a vehicle-mounted camera based on visual geometry, characterized in that, include: Determine the target installation angle for the camera; Adjust the target position so that the five points—the camera optical center, the perpendicular from the camera optical center to the ground, the target crosshair, the perpendicular from the target crosshair to the ground, and the perpendicular from the target crosshair to the line connecting the camera optical center and the ground—are coplanar. Based on the adjusted target position and the target installation angle of the camera, the pixel coordinates of the virtual crosshair are obtained according to the world coordinate system coordinates of the target's crosshair. Adjust the camera angle based on the pixel coordinates of the virtual crosshair so that the virtual crosshair aligns with the actual crosshair of the target. Determining the target installation angle of the camera specifically includes: Determine the target's downward pitch ψ° and the target's outward deflection angle θ°; The adjustment of the target position to ensure that five points—the camera optical center, the perpendicular from the camera optical center to the ground, the target crosshair, the perpendicular from the target crosshair to the ground, and the perpendicular from the target crosshair to the line connecting the camera optical center and the ground—are coplanar specifically includes: Select a point O on the target as the crosshair; Determine the foot of the perpendicular from the optical center C of the camera to the ground, and mark it as point A; Draw a line AE parallel to the vehicle's centerline through point A; Determine point B from point A and parallel line AE, so that... Furthermore, the angle yaw between line AB and line AE is θ°, where Z is set manually; The pitch angle between line OC and line AB is ψ°; Place a spirit level on line AB, aligning the vertical center of the target with point B, which is determined by point A and the parallel line AE, so that the vertical green light from the spirit level passes through the vertical center line of the target.
2. The method for adjusting the installation angle of a vehicle-mounted camera based on visual geometry according to claim 1, characterized in that, The process of obtaining the pixel coordinates of the virtual crosshair based on the adjusted target position and the camera's target installation angle, according to the world coordinate system coordinates of the target's crosshair, specifically includes: Based on the adjusted target position, measure the height difference |CD| between the camera optical center and the target crosshair. Based on the height difference |CD| between the optical center of the camera and the crosshair of the target, determine the ordinate Y of the target's crosshair in the world coordinate system. Based on the distance |AB| between the perpendicular from the camera's optical center to the ground and the perpendicular from the target's crosshair to the ground, determine the vertical coordinate Z of the target's crosshair in the world coordinate system. Determine the rotation matrix between the world coordinate system and the camera coordinate system based on the target installation angle of the camera; The pixel coordinates of the virtual crosshair are obtained based on the camera's intrinsic parameter matrix, the Y and Z coordinates of the target's crosshair in the world coordinate system, and the rotation and translation matrices between the world coordinate system and the camera coordinate system.
3. The method for adjusting the installation angle of a vehicle-mounted camera based on visual geometry according to claim 2, characterized in that, The step of determining the ordinate Y of the target's crosshair in the world coordinate system based on the height difference |CD| between the camera's optical center and the target's crosshair specifically includes: The ordinate Y of the target's crosshair in the world coordinate system is determined using the following formula: Y = |CD|; The step of determining the vertical coordinate Z of the target's crosshair in the world coordinate system based on the distance |AB| between the foot of the perpendicular from the camera's optical center to the ground and the foot of the perpendicular from the target's crosshair to the ground specifically includes: The vertical coordinate Z of the target's reticle in the world coordinate system is determined using the following formula: Z = |AB|.
4. The method for adjusting the installation angle of a vehicle-mounted camera based on visual geometry according to claim 3, characterized in that, The pixel coordinates of the virtual crosshair are obtained based on the camera's intrinsic parameter matrix, the ordinate Y and ordinate Z of the target's crosshair in the world coordinate system, and the rotation and translation matrices between the world coordinate system and the camera coordinate system. Specifically, this includes: Based on the camera's intrinsic parameter matrix, the ordinate (Y) and ordinate (Z) of the target's crosshair in the world coordinate system, and the rotation and translation matrices between the world coordinate system and the camera coordinate system, the pixel coordinates of the virtual crosshair are calculated using the following formula. , in, This represents the intrinsic parameter matrix of the camera. This represents the translation matrix from the world coordinate system to the camera coordinate system. R 3×3 This represents the rotation matrix between the world coordinate system and the camera coordinate system, obtained by transforming the rotation vector [row,yaw,pitch]=[0°,θ°,-ψ°]. Row represents the target roll angle of the camera, yaw represents the target yaw angle of the camera, and pitch represents the target pitch angle of the camera.
5. The method for adjusting the installation angle of a vehicle-mounted camera based on visual geometry according to claim 1, characterized in that, The step of adjusting the camera angle based on the pixel coordinates of the virtual crosshair to align and coincide with the actual crosshair of the target specifically includes: Loosen all the nuts on the camera bracket; Based on the pixel coordinates of the virtual crosshair, draw the virtual crosshair in real time on the camera screen; Adjust the camera angle so that the virtual crosshair aligns with the actual crosshair of the target. Tighten all the nuts on the camera bracket.