A positioning method based on camera mechanical aiming
Through the positioning method based on camera mechanical aiming, the three-dimensional coordinates of the target point are calculated using the camera rotation and angle sensor, which solves the problems of low accuracy and high parameters requirements in the existing visual positioning methods, and achieves a high-precision and reliable positioning effect.
Patent Information
- Application Number
- CN201910781664.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-22
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2039-08-22
AI Technical Summary
In practical applications, existing monocular and binocular visual positioning methods have problems such as low accuracy and high matching of camera internal parameters and feature points, and it is necessary to overcome the deformation caused by the camera ball lens.
Using a positioning method based on camera mechanical aiming, two cameras are arranged in a distributed manner, and the camera's rotation and angle sensors are used to shield the imaging chip, retain only vertical and horizontal narrow strips, record the azimuth and inclination angles, and calculate the three-dimensional coordinates of the target point.
It realizes high-precision positioning, does not rely on the internal parameters of the camera, avoids cumbersome calculations of feature point matching, and avoids deformation problems through optical center aiming. The method is reliable and has high accuracy, and is suitable for a variety of usage environments.
Smart Images

Figure CN112419418B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a positioning method based on mechanical aiming of a camera. Background Art
[0002] Visual positioning is an economical positioning method. Currently, it is mostly achieved by monocular positioning and binocular positioning, but both methods are not ideal in actual use.
[0003] Monocular positioning is to use a single camera to locate the target. The principle is the principle of pinhole imaging, such as Figure 1 As shown in the figure, since this method uses the internal angle and distance parameters of the camera for calculation, the internal parameters of each camera need to be accurately calibrated. In theory, the geometric correspondence between objects is only valid if the similar triangles are perpendicular to the imaging surface, so complex algorithms are needed for correction. These methods are difficult to obtain accurate solutions. Some algorithms also need to use external reference dimensions, which requires the camera to be accurately fixed in the same position. Any changes in position such as angle and height will cause positioning failure. Therefore, it has not been well applied in engineering practice.
[0004] Binocular vision positioning relies on the principle of binocular stereo vision ( Figure 2 It is based on the parallax principle and uses an imaging device to obtain two images of the object to be measured from different positions. The three-dimensional geometric information of the object is obtained by calculating the position deviation between corresponding points of the images.
[0005] Binocular stereo vision fuses the images obtained by two cameras and observes the difference between them, so that we can obtain a clear sense of depth, establish the correspondence between features, and correspond the image points of the same physical point in different images. We call this difference a disparity image. In practical applications, there are two difficulties that are difficult to overcome. The first is that the physical parameters of the two cameras must be completely consistent, including motion parameters, so that comparison can be made. The second is that the two cameras need to aim at the same feature point of the object, and the selection of feature points by the machine is still a difficult problem that needs to be overcome.
[0006] At the same time, the above two methods also need to overcome the deformation caused by the camera spherical lens. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide a positioning method based on mechanical aiming of a camera. The method uses a video camera to perform precise aiming, thereby providing the angle value of the camera position relative to the target point, and the three-dimensional coordinates of the target point can be obtained through the distance parameter between the two cameras.
[0008] The technical solution adopted by the present invention is: a positioning method based on mechanical aiming of a camera, which comprises the following steps:
[0009] Step 1: Distribute two cameras in the space of the target point, determine the coordinates of the two cameras, and capture the target point;
[0010] Step 2: Shield the imaging chip in the camera, leaving only a vertical narrow strip through the center of the sensor. Rotate the camera horizontally, insert the target point into the vertical strip and record the azimuth to obtain the azimuth between the two cameras and the target point.
[0011] Step 3: Shield the imaging chip in the camera, leaving only a narrow horizontal strip passing through the center of the sensor. Rotate the camera vertically, insert the target point into the horizontal strip and record the inclination angle to obtain the inclination angle between the two cameras and the target point.
[0012] Step 4: Calculate the three-dimensional coordinates of the object to be located based on the coordinates of the two cameras and the inclination and azimuth angles between the two cameras and the target point.
[0013] The three-dimensional coordinate calculation method in step 4 is:
[0014] First, establish a mathematical model:
[0015] The two cameras are camera A and camera B. The spatial coordinates of camera A are x1, y1, z1, and the spatial coordinates of camera B are x2, y2, z2. The projection A' of point A on the horizontal plane is the origin of the spatial rectangular coordinate system, and the projection B' of point B on the horizontal plane is B'. Connect A' and B' as the x-axis to establish a spatial rectangular coordinate system. The target point of the object to be located is C, and its spatial coordinates are x0, y0, z0. Its projection on the horizontal plane is C. ′ ; Then the azimuth angle of camera A to the target point is ∠YA′C′, the inclination angle is ∠A′AC, and the azimuth angle of camera B to the target point is ∠YB′C′, the inclination angle is ∠B′BC;
[0016] Then calculate the spatial coordinates of C:
[0017] Suppose 90-∠YA′C′=α, 90-∠YB′C′=β, ∠A′C′B′=γ, ∠A′AC=θ, |A′B′|=l,|A′C′|=m,|C′B′|=n
[0018] According to the distance formula between two points on a plane
[0019]
[0020] According to the law of sines:
[0021]
[0022] γ=180-α-β
[0023] sinr=sin(α+β)
[0024]
[0025]
[0026] According to the slope formula
[0027]
[0028] |A′D|=z1tanθ (5)
[0029] z0=|C′C|,z1=|A′A|,|C′D|=|A′D|-m
[0030] but
[0031] According to the similar triangle theorem:
[0032] but We can get:
[0033]
[0034] have to:
[0035]
[0036]
[0037] but
[0038]
[0039] in:
[0040] Furthermore, the vertical narrow strips in step 2 are determined based on pixels and accuracy.
[0041] Furthermore, the horizontal narrow strips in step 3 are determined based on pixels and accuracy.
[0042] Furthermore, the camera includes a camera body, an angle sensor arranged on the camera body, and a rotating device for driving the camera body to rotate horizontally and vertically.
[0043] The positive effects of the present invention are as follows: the method provided by the present invention is to accurately aim through a camera, thereby providing an angle value of the camera position relative to the intended positioning point, and through the distance parameter between the two cameras, the three-dimensional coordinates of the object to be measured can be obtained. There is no need to rely on the internal parameters of the camera, nor is there a need for tedious calculations of accurate matching feature points. At the same time, since the aiming passes through the optical center, no deformation will occur. The method of the present invention is reliable and highly accurate, and can be promoted in various use environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a schematic diagram of the principle of pinhole imaging in the prior art;
[0045] Figure 2 It is a schematic diagram of binocular stereo vision principle in the prior art;
[0046] Figure 3 This is a schematic diagram of the camera structure of the present invention;
[0047] Figure 4 A schematic diagram of the principle of aiming for the present invention;
[0048] Figure 5 is a flow chart of the method of the present invention;
[0049] Figure 6 A schematic diagram of the principle of determining the azimuth angle for the present invention;
[0050] Figure 7 A schematic diagram of the principle of determining the inclination angle of the present invention;
[0051] Figure 8 This is a schematic diagram of the present invention after positioning is completed;
[0052] Fig. 9 A schematic diagram of a spatial rectangular coordinate system is established for the present invention;
[0053] Fig.10 This is a schematic diagram of the slope formula. DETAILED DESCRIPTION
[0054] As attached Figure 3As shown, the camera used in the present invention includes a camera body 302, an angle sensor 301 arranged on the camera body 302, and a rotating device for driving the camera body 302 to rotate horizontally and longitudinally. The rotating device includes a longitudinal rotating motor 303, a longitudinal rotating motor output shaft 305, a horizontal rotating motor 304, and a horizontal rotating motor output shaft 306. The longitudinal rotating motor 303 is located below the camera body 302. The longitudinal rotating motor output shaft 305 is fixedly connected to the camera body 302 to enable the camera to rotate longitudinally. The horizontal rotating motor 304 is located below the longitudinal rotating motor 303. The horizontal rotating motor output shaft 306 is fixedly connected to the longitudinal rotating motor 303 to enable the camera to rotate horizontally. The camera 302 can be a normal light camera or an infrared camera. The camera is used for aiming components. The longitudinal rotating motor provides the camera with vertical rotation, and the resulting angle is the inclination angle. The horizontal rotating motor provides the camera with horizontal rotation, and the resulting angle is the azimuth angle. Two cameras are used, which are distributed and arranged in the space to be positioned. The two cameras maintain a certain distance and record the spatial coordinates of the two cameras.
[0055] The aiming principle of the present invention is a mechanical aiming method of three points in one line, as shown in the attached Figure 4 That is, through the rotation of the camera, the target point 401, the focus 402 and the center of the imaging chip 403 are located on the same straight line. That is, the target point is aimed. During the aiming process, the angle sensor provides accurate azimuth and inclination. The three-dimensional coordinates of the target point can be obtained by adding the azimuth and inclination of the two cameras.
[0056] As attached Figure 5 As shown, the specific steps of the present invention are:
[0057] S01: Two cameras capture the object to be located, which can be completed by image recognition technology.
[0058] S02: The azimuth and inclination of the object are initially obtained through the principle of pinhole imaging, which helps to quickly determine the direction of camera rotation.
[0059] S03: Shield the rest of the imaging chip (photosensitive device such as CCD or CMOS) in the camera, leaving only a vertical narrow strip through the center of the sensor. Determine the width of the narrow strip according to the different pixels and different accuracy requirements. The width is measured in pixels. The camera rotates horizontally, puts the object into the vertical strip, aims at it, and records the azimuth, as shown in the attached figure. Figure 6 shown.
[0060] S04: Shield the rest of the imaging chip (photosensitive device such as CCD or CMOS) in the camera, leaving only a narrow horizontal strip through the center of the sensor. Determine the width of the narrow strip according to the different pixels and the different accuracy requirements. The width is measured in pixels. The camera is rotated vertically, and the object is inserted into the horizontal strip to aim and record the inclination angle, such as Figure 7 .
[0061] S05: The entire aiming process is completed. At this time, the positioned object is located at the center of the imaging chip, and the optical center and the focus are on the same straight line. Figure 8 .
[0062] S06: Calculate the coordinates of the target point according to a mathematical formula.
[0063] Since the coordinates of camera A and camera B are known, the coordinates of the target point can be calculated as follows.
[0064] (1) Establishment of mathematical model
[0065] Camera A, spatial coordinates are x1, y1, z1, camera B spatial coordinates are x2, y2, z2. The projection A' of point A on the horizontal plane is the origin of the spatial rectangular coordinate system, and the projection B' of point B on the horizontal plane is connected to A' and B' as the x-axis to establish a spatial rectangular coordinate system as follows Fig. 9 C is the target point to be positioned, with coordinates of x0, y0, z0. Its projection on the horizontal plane is C′.
[0066] Through the aiming mechanism and angle measurement, it is known that the azimuth angle ∠YA′C′ and the inclination angle ∠A′AC of camera A aimed at the target point, and the azimuth angle ∠YB′C′ and the inclination angle ∠B′BC of camera B to the target point.
[0067] Aiming at the target point means that the target point image is projected to the center of the sensor through the optical center and focus of the camera lens. In this way, the photosensitive center of the sensor, the optical center of the camera and the target point form a straight line. The three-point-one-line optical aiming method is adopted.
[0068] (2) Calculation
[0069] Given the coordinates of point A (x1, y1, z1) and point B (x2, y2, z2), point A aims at target point C with an azimuth of ∠YA′C′ and an inclination of ∠A′AC. Point B aims at target point C with an azimuth of ∠YB′C′ and an inclination of ∠B′BC. Find: coordinates of point C (x0, y0, z0)
[0070] For the convenience of calculation, let 90-∠YA′C′=α, 90-∠YB′C′=β
[0071] , ∠A′C′B′=γ, ∠A′AC=θ, α and β are known.
[0072] Assume: |A′B′|=l,|A′C′|=m,|C′B′|=n
[0073] According to the distance formula between two points on a plane |AB|=√(x1-x2) 2 +(y1-y2) 2
[0074]
[0075] According to the law of sines:
[0076]
[0077] γ=180-α-β
[0078] sin r = sin(α+β)
[0079]
[0080]
[0081] According to the slope formula, Fig.10 :
[0082]
[0083] |A′D|=z1tanθ (5)
[0084] Depend on Fig. 9 It can be seen that z0=|C′C|, z1=|A′A|,|C′D|=|A′D|-m
[0085] but
[0086] According to the similar triangle theorem:
[0087] but We can get:
[0088]
[0089] Depend on Fig. 9
[0090] have to:
[0091]
[0092]
[0093] but
[0094]
[0095] in:
[0096] Point C was successfully located.
[0097] The present invention does not need to rely on the internal parameters of the camera, nor does it need to accurately match the tedious calculation of feature points, and since the aiming passes through the optical center, no deformation will occur. The method is reliable and has high precision, and can be promoted in various use environments.
Claims
1. A positioning method based on mechanical aiming of a camera, characterized in that It includes the following steps: Step 1: Distribute two cameras in the space of the target point, determine the coordinates of the two cameras, and capture the target point; Step 2: Shield the photosensitive area of part of the imaging chip in the camera, leaving only a vertical narrow strip passing through the center of the sensor. Rotate the camera horizontally, fit the target point into the vertical strip and record the azimuth to obtain the azimuth between the two cameras and the target point. Step 3: Shield the photosensitive area of part of the imaging chip in the camera, leaving only a narrow horizontal strip passing through the center of the sensor. Rotate the camera vertically, insert the target point into the horizontal strip and record the inclination angle to obtain the inclination angle between the two cameras and the target point. Step 4: Calculate the three-dimensional coordinates of the object to be located based on the coordinates of the two cameras and the inclination and azimuth angles between the two cameras and the target point; The three-dimensional coordinate calculation method is: First, establish a mathematical model: The two cameras are camera A and camera B, the spatial coordinates of camera A are x1, y1, z1, and the spatial coordinates of camera B are x2, y2, z2; the projection A' of point A on the horizontal plane is the origin of the spatial rectangular coordinate system, and the projection B' of point B on the horizontal plane is B'. Connect A' and B' as the x-axis to establish a spatial rectangular coordinate system. The target point of the object to be located is C, and its spatial coordinates are x0, y0, z0, and its projection on the horizontal plane is C'; then the azimuth angle ∠YA'C' and the inclination angle ∠A'AC of camera A to the target point, and the azimuth angle ∠YB'C' and the inclination angle ∠B'BC of camera B to the target point; Then calculate the spatial coordinates of C: Suppose 90-∠YA′C′=α, 90-∠YB′C′=β, 90-∠A′B′C′=γ, ∠A′AC=θ, ∠B′BC=φ, |A′B′|=1, |A′C′|=m, |C′B′|=n According to the distance formula between two points on a plane According to the law of sines: γ=180-α-β sinr=sin(α+β) According to the slope formula: |A′D|=z1tanθ z0=C|′C|,z1=|A′A|,|C′D|=|A′D|-m but According to the similar triangle theorem: but We can get: have to but in:
2. A positioning method based on camera mechanical aiming according to claim 1, characterized in that The vertical narrow strips in step 2 are determined based on pixels and accuracy.
3. A positioning method based on camera mechanical aiming according to claim 1, characterized in that The horizontal narrow strips in step 3 are determined based on pixels and accuracy.
4. A positioning method based on camera mechanical aiming according to claim 1, characterized in that The camera comprises a camera body (302), an angle sensor (301) arranged on the camera body (302), and a rotating device for driving the camera body (302) to rotate horizontally and vertically.
5. A positioning method based on camera mechanical aiming according to claim 1, characterized in that In step one, the azimuth and inclination of the target point are preliminarily obtained through the pinhole imaging principle to help quickly determine the direction of camera rotation.
Citation Information
Patent Citations
Distance measurement method of binocular stereoscopic gazing monitoring system
CN104075688A