CN112419418A - Positioning method based on camera mechanical aiming - Google Patents
Positioning method based on camera mechanical aiming Download PDFInfo
- Publication number
- CN112419418A CN112419418A CN201910781664.9A CN201910781664A CN112419418A CN 112419418 A CN112419418 A CN 112419418A CN 201910781664 A CN201910781664 A CN 201910781664A CN 112419418 A CN112419418 A CN 112419418A
- Authority
- CN
- China
- Prior art keywords
- camera
- target point
- cameras
- angle
- point
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/77—Determining position or orientation of objects or cameras using statistical methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
- G06T7/85—Stereo camera calibration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
- G06T2207/10012—Stereo images
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Probability & Statistics with Applications (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The invention relates to a positioning method based on camera mechanical aiming, which aims accurately through a camera so as to provide an angle value of the position of the camera relative to a planned position point, and can obtain a three-dimensional coordinate of an object to be measured through a distance parameter between two cameras. The method does not need to rely on the internal parameters of the camera, does not need complicated calculation of accurate matching characteristic points, does not generate deformation even when aiming through an optical center, is reliable and high in precision, and can be popularized in various use environments.
Description
Technical Field
The invention relates to a positioning method based on mechanical aiming of a camera.
Background
Visual positioning is an economical positioning method. At present, monocular positioning and binocular positioning methods are mostly adopted for realization, but the two methods are not ideal enough in the actual use process.
Monocular positioning is the positioning of an object using a single camera. The principle is the principle of pinhole imaging, and as shown in fig. 1, the method uses the internal angle and distance parameters of the cameras for calculation, so the internal parameters of each camera need to be accurately calibrated. Theoretically, only the geometric corresponding relation of the similar triangle of the object perpendicular to the imaging surface is established, complex algorithms are needed for correction, and the methods are difficult to obtain accurate solutions. Some algorithms also require the use of external reference dimensions, which requires that the camera must be fixed in exactly the same position, and any change in position, such as angle and height, will cause a positioning failure. So it is not well applied in engineering practice.
The binocular vision positioning relies on the principle of binocular stereo vision (shown in fig. 2), which is a method for acquiring three-dimensional geometric information of an object by acquiring two images of the object to be measured from different positions by using imaging equipment based on the principle of parallax and calculating the position deviation between corresponding points of the images.
The binocular stereo vision integrates images obtained by two cameras and observes the difference between the images, so that people can obtain obvious depth feeling, the corresponding relation between features is established, mapping points of the same space physical point in different images are matched, and the difference is called as a parallax (Disparity) image. In practical application, two difficulties are difficult to overcome, and firstly, the physical parameters of the two cameras are required to be completely consistent to include motion parameters, so that comparison can be performed. Second, two cameras are required to aim at the same feature point of the object, and the selection of the feature point by the machine is still a difficult problem to overcome.
Meanwhile, the two methods also need to overcome the deformation generated by the spherical lens of the camera.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a positioning method based on camera mechanical aiming, which aims accurately through a camera, so that an angle value of the position of the camera relative to a target point is provided, and a three-dimensional coordinate of the target point can be obtained through a distance parameter between two cameras.
The technical scheme adopted by the invention is as follows: a positioning method based on camera mechanical aiming comprises the following steps:
the method comprises the following steps: the method comprises the following steps of arranging two cameras in a distributed mode in a space of a target point, determining coordinates of the two cameras, and capturing the target point;
step two: shielding an imaging chip in the camera, only reserving a vertical narrow strip passing through the center of the sensor, horizontally rotating the camera, sleeving a target point into the vertical strip and recording an azimuth angle to obtain the azimuth angle between the two cameras and the target point;
step three: shielding an imaging chip in the camera, only reserving a horizontal narrow strip passing through the center of the sensor, vertically rotating the camera, sleeving a target point into the horizontal strip, and recording an inclination angle to obtain the inclination angle between the two cameras and the target point;
step four: and calculating the three-dimensional coordinates of the to-be-positioned object according to the coordinates of the two cameras and the inclination angle and the azimuth angle between the to-be-positioned object and the target point.
The three-dimensional coordinate calculation method in the fourth step comprises the following steps:
firstly, a mathematical model is established:
the two cameras are respectively a camera A and a camera B, and the space coordinate of the camera A is x1,y1,z1The space coordinate of the camera B is x2,y2,z2(ii) a The projection A 'of the point A on the horizontal plane is the origin of a rectangular space coordinate system, the projection B' of the point B on the horizontal plane is connected with the point A 'and the point B' as an x axis, a rectangular space coordinate system is established, the target point of the positioning object is planned to be C, and the spatial coordinate of the target point is x0,y0,z0Its projection on the horizontal plane is C′(ii) a The camera A is aligned with the azimuth angle YA 'C' of the target point, the inclination angle A 'AC, the camera B is aligned with the azimuth angle YB' C 'of the target point, and the inclination angle B' BC;
the spatial coordinates of C are then calculated:
γ=180-α-β
sinr=sin(α+β)
according to the formula of slope
|A′D|=z1tanθ (5)
z0=|C′C|,z1=|A′A|,|C′D|=|A′D|-m
According to the similar triangle theorem:
then
further, the vertical narrow strips in the second step are determined according to the pixel and the precision.
Further, the horizontal narrow band in step three is determined according to the pixel and the precision.
Furthermore, the camera comprises a camera body, an angle sensor arranged on the camera body and a rotating device used for driving the camera body to rotate horizontally and longitudinally.
The invention has the positive effects that: the method provided by the invention is to accurately aim through the cameras, so that the angle value of the position of the camera relative to the planned position point is provided, and the three-dimensional coordinate of the object to be measured can be obtained through the distance parameter between the two cameras. The method does not need to rely on the internal parameters of the camera, does not need complicated calculation of accurate matching characteristic points, and does not generate deformation due to the fact that aiming passes through the optical center. The method is reliable and high in precision, and can be popularized in various use environments.
Drawings
FIG. 1 is a schematic diagram of a prior art pinhole imaging principle;
FIG. 2 is a schematic diagram of binocular stereoscopic vision in the prior art;
FIG. 3 is a schematic view of a camera structure according to the present invention;
FIG. 4 is a schematic diagram of the aiming of the present invention;
FIG. 5 is a flow chart of the method of the present invention;
FIG. 6 is a schematic diagram of the present invention for determining azimuth angle;
FIG. 7 is a schematic diagram of the present invention for determining tilt angle;
FIG. 8 is a schematic view of the present invention after positioning is completed;
FIG. 9 is a schematic diagram of establishing a rectangular spatial coordinate system according to the present invention;
FIG. 10 is a graph illustrating a slope equation.
Detailed Description
As shown in fig. 3, the camera adopted in the present invention includes a camera body 302, an angle sensor 301 disposed 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 for enabling the camera to rotate longitudinally, the horizontal rotating motor 304 is located below the longitudinal rotating motor 303, and the horizontal rotating motor output shaft 306 is fixedly connected to the longitudinal rotating motor 303 for enabling the camera to rotate horizontally. The camera 302 may be a normal light camera or an infrared camera, the camera is used for aiming, the longitudinal rotating motor provides rotation of the camera in the vertical direction, and the obtained angle is an inclination angle. The horizontal rotating motor provides rotation of the camera in the horizontal direction, and the obtained angle is an azimuth angle. The two cameras are distributed in a space needing positioning, a certain distance is kept between the two cameras, and space coordinates of the two cameras are recorded.
The principle of aiming of the invention is a mechanical aiming method of three points and one line, as shown in figure 4. That is, the centers of the target point 401, the focus 402, and the imaging chip 403 are located on the same straight line by the rotation of the camera. I.e. the target point is aimed at. During aiming, the accurate azimuth angle and inclination angle are provided through the angle sensor. And knowing the coordinates of the two cameras, and adding the azimuth angle and the inclination angle to obtain the three-dimensional coordinates of the target point.
As shown in fig. 5, the method comprises the following specific steps:
s01: the two cameras capture the object to be positioned, which can be done by image recognition techniques.
And S02, obtaining the azimuth angle and the inclination angle of the object preliminarily through the principle of pinhole imaging. Helping to quickly determine the direction in which the camera is rotating.
S03: the other parts of the imaging chip (photosensitive device such as CCD or CMOS) in the shielding camera only leave a vertical narrow strip passing through the center of the sensor, the width of the narrow strip is determined according to the difference of pixels and the difference of precision requirements, the width is measured by pixels, the camera horizontally rotates, and an object is sleeved in the vertical strip to aim and record the azimuth angle, as shown in figure 6.
S04: the other parts of the imaging chip (photosensitive device such as CCD or CMOS) in the shielding camera only leave a horizontal narrow strip passing through the center of the sensor, the width of the narrow strip is determined according to the difference of pixels and the difference of precision requirements, the width is measured by pixels, the camera is vertically rotated, and an object is sleeved in the horizontal strip to aim and record the inclination angle, as shown in figure 7.
S05: the whole aiming process is completed, and the positioned object is located at the central position of the imaging chip, and the optical center and the focal point are on the same straight line, as shown in the attached figure 8.
S06: and calculating the coordinates of the target point according to a mathematical formula.
Since the coordinates of the cameras a and B are known, the coordinates of the target point can be calculated as follows.
(1) Establishment of mathematical model
Camera A with spatial coordinate x1,y1,z1The space coordinate of the camera B is x2,y2,z2. The projection A' of the point A on the horizontal plane is a space rectangular coordinateThe system origin point, the projection B ' of the point B on the horizontal plane, connecting the A ' and the B ' as the x axis, and establishing a space rectangular coordinate system as shown in FIG. 9. C is the located target point with coordinates x0,y0,z0. Its projection on the horizontal plane is C'.
Through the aiming mechanism and angle measurement, the known camera A is aligned with the azimuth angle YA 'C' of a target point, the inclination angle A 'AC, the camera B is aligned with the azimuth angle YB' C 'of the target point, and the inclination angle B' BC.
Aiming the target point means that the target point image is projected to the center of the sensor through the optical center and the focus of the lens of the camera. The photosensitive center of the sensor, the optical center of the camera and the target point form a straight line. And adopting a three-point one-line optical aiming method.
(2) Computing
Known, the coordinates (x) of point A1,y1,z1) B point coordinate (x)2,y2,z2). The point A aims at the azimuth angle YA ' C ' of the target point C, and the inclination angle A ' AC. The point B aims at the azimuth angle YB ' C ' of the target point C, and the inclination angle B ' BC. Solving the following steps: c point coordinate (x)0,y0,z0)
For convenience of calculation, 90-YA 'C ═ alpha, 90-YB' C ═ beta are set
Setting: i ' a ' B ' | l, | a ' C ' | m, | C ' B ' | n
According to the distance formula | AB | ═ V (x) between two points on the plane1-x2)2+(y1-y2)2
γ=180-α-β
sin r=sin(α+β)
according to the slope formula, as shown in fig. 10:
|A′D|=z1tanθ (5)
as can be seen from FIG. 9, z0=|C′C|,z1=|A′A|,|C′D|=|A′D|-m
According to the similar triangle theorem:
from FIG. 9
then
point C is successfully located.
The invention does not need to rely on the internal parameters of the camera, does not need complicated calculation of accurate matching characteristic points, and does not generate deformation because the aiming passes through the optical center. The method is reliable and high in precision, and can be popularized in various use environments.
Claims (6)
1. A positioning method based on camera mechanical aiming is characterized by comprising the following steps:
the method comprises the following steps: the method comprises the following steps of arranging two cameras in a distributed mode in a space of a target point, determining coordinates of the two cameras, and capturing the target point;
step two: shielding a photosensitive area of a part of imaging chips in the camera, only reserving a vertical narrow strip passing through the center of the sensor, horizontally rotating the camera, sleeving a target point into the vertical strip and recording an azimuth angle to obtain the azimuth angle between the two cameras and the target point;
step three: shielding a photosensitive area of a part of imaging chips in the camera, only reserving a horizontal narrow strip passing through the center of the sensor, vertically rotating the camera, sleeving a target point into the horizontal strip and recording an inclination angle to obtain the inclination angle between the two cameras and the target point;
step four: and calculating the three-dimensional coordinates of the to-be-positioned object according to the coordinates of the two cameras and the inclination angle and the azimuth angle between the to-be-positioned object and the target point.
2. The positioning method based on mechanical aiming of camera head as claimed in claim 1, wherein the three-dimensional coordinate calculation method in step four is:
firstly, a mathematical model is established:
the two cameras are respectively a camera A and a camera B, and the space coordinate of the camera A is x1,y1,z1The space coordinate of the camera B is x2,y2,z2(ii) a The projection A 'of the point A on the horizontal plane is the origin of a rectangular space coordinate system, the projection B' of the point B on the horizontal plane is connected with the point A 'and the point B' as an x axis, a rectangular space coordinate system is established, the target point of the positioning object is planned to be C, and the spatial coordinate of the target point is x0,y0,z0The projection of the C-shaped magnetic field on the horizontal plane is C'; the camera A is aligned with the azimuth angle YA 'C' of the target point, the inclination angle A 'AC, the camera B is aligned with the azimuth angle YB' C 'of the target point, and the inclination angle B' BC;
the spatial coordinates of C are then calculated:
γ=180-α-β
sinr=sin(α+β)
according to the formula of slope
|A′D|=z1tanθ (5)
z0=|C′C|,z1=|A′A|,|C′D|=|A′D|-m
According to the similar triangle theorem:
then
3. the method of claim 1, wherein the vertical narrow strips in step two are determined according to pixel and precision.
4. The method of claim 1, wherein the horizontal narrow bands in step three are determined according to pixel and precision.
5. The positioning method based on camera mechanical aiming is 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 longitudinally.
6. The positioning method based on mechanical aiming of camera head as claimed in claim 1, wherein in step one, the azimuth and inclination of the target point are preliminarily obtained by the pinhole imaging principle, which helps to quickly determine the direction of camera head rotation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910781664.9A CN112419418A (en) | 2019-08-22 | 2019-08-22 | Positioning method based on camera mechanical aiming |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910781664.9A CN112419418A (en) | 2019-08-22 | 2019-08-22 | Positioning method based on camera mechanical aiming |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112419418A true CN112419418A (en) | 2021-02-26 |
Family
ID=74779314
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910781664.9A Pending CN112419418A (en) | 2019-08-22 | 2019-08-22 | Positioning method based on camera mechanical aiming |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112419418A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110675445A (en) * | 2019-09-27 | 2020-01-10 | 深兰科技(上海)有限公司 | Visual positioning method, device and storage medium |
CN116468797A (en) * | 2023-03-09 | 2023-07-21 | 北京航天众信科技有限公司 | Aiming method and device for rail-mounted robot and computer equipment |
-
2019
- 2019-08-22 CN CN201910781664.9A patent/CN112419418A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110675445A (en) * | 2019-09-27 | 2020-01-10 | 深兰科技(上海)有限公司 | Visual positioning method, device and storage medium |
CN116468797A (en) * | 2023-03-09 | 2023-07-21 | 北京航天众信科技有限公司 | Aiming method and device for rail-mounted robot and computer equipment |
CN116468797B (en) * | 2023-03-09 | 2023-11-24 | 北京航天众信科技有限公司 | Aiming method and device for rail-mounted robot and computer equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11223820B2 (en) | Augmented reality displays with active alignment and corresponding methods | |
US10869024B2 (en) | Augmented reality displays with active alignment and corresponding methods | |
US10830588B2 (en) | Surveying instrument for scanning an object and image acquistion of the object | |
JP5491235B2 (en) | Camera calibration device | |
CN109859272B (en) | Automatic focusing binocular camera calibration method and device | |
JP2017112602A (en) | Image calibrating, stitching and depth rebuilding method of panoramic fish-eye camera and system thereof | |
JP5715735B2 (en) | Three-dimensional measurement method, apparatus and system, and image processing apparatus | |
JP2017108387A (en) | Image calibrating, stitching and depth rebuilding method of panoramic fish-eye camera and system thereof | |
US20040001138A1 (en) | Stereoscopic panoramic video generation system | |
TWI521471B (en) | 3 - dimensional distance measuring device and method thereof | |
JP4306006B2 (en) | Three-dimensional data input method and apparatus | |
CN113724337B (en) | Camera dynamic external parameter calibration method and device without depending on tripod head angle | |
CN102589529B (en) | Scanning close-range photogrammetry method | |
CN114359406A (en) | Calibration of auto-focusing binocular camera, 3D vision and depth point cloud calculation method | |
CN112419418A (en) | Positioning method based on camera mechanical aiming | |
JP2019148491A (en) | Occupant monitoring device | |
JP6161704B2 (en) | Imaging apparatus, vehicle, and image correction method | |
WO2019087253A1 (en) | Stereo camera calibration method | |
JP2016218254A (en) | Stereo image imaging device, stereo image imaging method | |
Pachidis et al. | Pseudostereo-vision system: A monocular stereo-vision system as a sensor for real-time robot applications | |
CN109682312B (en) | Method and device for measuring length based on camera | |
JP2006220603A (en) | Imaging apparatus | |
JP2020191624A (en) | Electronic apparatus and control method for the same | |
CN108288285A (en) | A kind of three-dimensional panorama scanning system and method based on omnidirectional's ring | |
CN113654572B (en) | Pose parameter calibration method based on integrated image acquisition equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |