KR101674298B1 - Method for distance calculation using a camera lens focal length information - Google Patents
Method for distance calculation using a camera lens focal length information Download PDFInfo
- Publication number
- KR101674298B1 KR101674298B1 KR1020150061700A KR20150061700A KR101674298B1 KR 101674298 B1 KR101674298 B1 KR 101674298B1 KR 1020150061700 A KR1020150061700 A KR 1020150061700A KR 20150061700 A KR20150061700 A KR 20150061700A KR 101674298 B1 KR101674298 B1 KR 101674298B1
- Authority
- KR
- South Korea
- Prior art keywords
- target
- distance
- focal length
- camera
- size
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C3/00—Measuring distances in line of sight; Optical rangefinders
- G01C3/32—Measuring distances in line of sight; Optical rangefinders by focusing the object, e.g. on a ground glass screen
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C5/00—Measuring height; Measuring distances transverse to line of sight; Levelling between separated points; Surveyors' levels
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Electromagnetism (AREA)
- Focusing (AREA)
- Automatic Focus Adjustment (AREA)
- Optical Radar Systems And Details Thereof (AREA)
Abstract
According to the present invention, a reference of a size to be enlarged according to a size of a target is determined, and a distance between the target and the user is calculated through a changed focal distance value by changing a focal distance value of the camera lens A method for calculating a distance using camera lens focal length information, comprising the steps of: 1) adjusting a target to be located within a reference range set in an angle of view range of a camera; A second step of searching a target candidate region in which the target should be positioned in the entire area of the camera to detect the target only excluding the background not corresponding to the target to find the height of the target; A third step of zooming the image by changing the focal distance of the camera to set a reference height at which the target should be enlarged; The distance between the user and the target is finally calculated based on the focal length information changed in step 4 and the step of enlarging the image by changing the focal distance so that the size of the target corresponds to the reference height set in step 3 By including 5 steps, the distance measurement can be calculated using only the focal distance information of the camera lens without using the distance measuring sensor using the TOF (Time of Flight) principle of the signals such as the GPS device and ultrasonic waves, LIDAR and RADAR have.
Description
The present invention relates to a distance measuring method using a camera, and more particularly, to a distance calculating method using camera lens focal length information for calculating a distance between a user and a target using focal length information of a camera lens.
BACKGROUND ART [0002] Recently, many technologies for recognizing the surrounding environment such as an unmanned robot or an autonomous mobile vehicle and providing various services to users through active judgment have been developed. Among many techniques, the relative distance calculation from the current position to the target can be applied in various directions depending on the field as well as the distance value.
The relative distance between the current position and the target is calculated using most sensors. Typically used sensor is a method using TOF (Time of flight) principle like ultrasonic wave, LIDAR, RADAR, etc. It emits a signal from the sensor, detects the signal reflected from the target, And calculating the distance by calculating the time difference of the signal which is re-inputted into the signal. In case of relatively inexpensive ultrasonic waves, the distance to recognize the distance to the target is very short. In the case of LIDAR or RADAR, the distance can be calculated from the target at a long distance, but the price of the sensor is very expensive.
There is also a distance calculation method using a sensor other than a TOF based sensor. First, the binocular stereo vision, which is a combination of two cameras, is able to calculate the distance between the targets through the process of matching using the angle difference between the two images obtained through the two image sensors. Also, when GPS based on satellite communication is used, the current position and the position of the target can be estimated, and the distance can be calculated by calculating the coordinate difference between the two position points.
However, since the distance is calculated by using the difference of the left and right images acquired in the case of stereo vision, the accuracy of the distance calculation is very low and a high calculation amount is required in a distant image having a small distance. In the case of the GPS estimation method, the sensors must be equipped to know the position of the target and the coordinates of the current position, and it can be used only outdoors because the coordinates are provided based on the satellite communication.
In the conventional distance calculation method using GPS, it is possible to calculate the distance based on the coordinates of the user's position and the coordinates of the target based on the satellite communication. However, it is difficult to measure the distance by using GPS satellite communication in the same room where the satellite communication is limited. In addition, technologies that derive distances based on TOF techniques such as ultrasound, LIDAR, and RADAR have the disadvantage that the measurable distance is very short or the price of the sensor is very high. When acquiring data for distance calculation, Data on not only the data but also the noise of the surrounding environment are observed so that a lot of calculation processes are required to process the data.
SUMMARY OF THE INVENTION The present invention has been made to overcome the above problems of the prior art, and it is an object of the present invention to provide a method and apparatus for calculating a distance between a user and a target using a camera, The object of the present invention is to provide a distance calculation method using camera lens focal length information that calculates a distance between a target and a user through a focal distance value changed by changing a focal distance value of a camera lens.
According to an aspect of the present invention, there is provided an image processing method including the steps of: adjusting a target to be positioned within a reference range set in an angle of view range of a camera; A second step of searching a target candidate region in which the target should be positioned in the entire area of the camera to detect the target only excluding the background not corresponding to the target to find the height of the target; A third step of zooming the image by changing the focal distance of the camera to set a reference height at which the target should be enlarged; The distance between the user and the target is finally calculated based on the focal length information changed in step 4 and the step of enlarging the image by changing the focal distance so that the size of the target corresponds to the reference height set in step 3 And a distance calculation method using camera lens focal length information including five steps.
The second step may search for and detect only the target candidate region in which the target is positioned in the first step without searching the entire region of the image to detect the target.
In the second step, the size of the height can be determined through the specific color of the target.
In step 3, the reference height may be set differently according to the size of the target detected in the second step.
In the step 4, if the focal distance is increased, the size of the target existing in the image is enlarged while the image is enlarged, so that the size of the target may be enlarged by the reference height.
In the step 5, the distance between the targets at the current position can be calculated using the information about the reference height together with the focal distance information.
According to the distance calculation method using the camera lens focal length information according to the present invention, the distance measurement sensor using the TOF (Time of Flight) principle of the signals such as ultrasonic waves, LIDAR, And the distance value can be calculated using only the focal length information of the camera lens.
FIG. 1 is a flowchart illustrating a method of calculating a distance using camera lens focal length information according to an embodiment of the present invention.
2 is a view showing a state for adjusting the position of a target,
3 is a view showing a state in which a reference according to the height of the target is selected and the size of the target by the reference height is enlarged by changing the focal length.
The present invention may have various modifications and various embodiments, and specific embodiments are illustrated in the drawings and described in detail in the detailed description. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.
As described in the related art, the relative distance between the targets at the current position can be calculated in various ways through various sensors, and each method has advantages and disadvantages depending on environment and applications. However, for TOF-based sensors such as ultrasound, LIDAR, and RADAR, ultrasonic waves have very short computable distances, and LIDAR and RADAR are very expensive. Stereo vision and GPS-based methods also have drawbacks that can be computed at short distances or can only be used outdoors.
In the present invention, the distance is calculated using the camera focal length information of the portable terminal without using the sensor used in the conventional methods for the distance calculation. That is, in the present invention, the distance of the target is calculated using the camera of the portable terminal which is easily accessible due to the popularization of the portable terminal and the development of the optical technology, The relative distance is calculated.
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
1 is a flowchart illustrating a method of calculating a distance using camera lens focal length information according to an embodiment of the present invention.
As shown in FIG. 1, a distance calculation method using camera lens focal length information according to the present invention includes a first step (S01) of adjusting a target to be located within a reference range set in an angle of view range of a camera; A second step S02 of searching the target candidate region in which the target should be positioned in the entire area of the camera and detecting the target only excluding the background not corresponding to the target to find the height of the target; A third step (S03) of changing a focal distance of the camera and zooming the image to set a reference height at which the target should be enlarged; A fourth step (S04) of enlarging the image by changing the focal distance so that the size of the target corresponds to the reference height set in step 3; And a fifth step (S05) of finally calculating the distance between the user and the target on the basis of the focal distance information changed in the step (4). The distance calculated in step 5 (S05) may be output to the screen (S06), and the step of repeating the steps (S07) may be repeated if necessary.
As shown in FIG. 1, the present invention calculates a distance between a target and a current position through five core processes (S01 to S05), among the entire processes (S01 to S07).
Step S01 is a step of adjusting the target so as to be positioned within the reference range set in the angle of view range of the camera, and moves the camera so that the target is positioned within the range (target candidate region) specified by the user. This step is to simplify the detection process of the target to be performed in the second step (S02), so that the target is located within a certain region (target candidate region) of the whole area of the camera, and the target is searched only in the corresponding region.
In the second step S02, a target candidate region in which the target is to be located is searched in the entire area of the camera, and only the target other than the background not corresponding to the target is detected to find the height of the target. In this procedure, not only the entire region of the image is searched to detect the target, but only the target candidate region in which the target is located in the first step (S01) is searched for.
Step 3 (S03) is a step of setting a reference height. The reference height corresponds to a step of changing the focal distance of the camera to enlarge the image to determine a criterion for enlarging the target. The criterion is set differently according to the size of the target detected in the second step (02).
Step 4 (S04) corresponds to enlarging the image by changing the focal distance so that the size of the target corresponds to the reference height set in the third step (S03). When the focal distance is increased, the size of the target existing in the image is enlarged while the image is enlarged. Therefore, the size of the target is enlarged by the reference height.
Finally, the fifth step (S05) corresponds to the step of finally calculating the distance between the user and the target based on the focal length information changed in the fourth step (S04). In this step, the distance between the targets at the current position can be calculated using the information about the focal length information and the reference height.
The present invention calculates the distance between targets at a current position using only a single camera without using any other sensor as a distance calculation method using a camera. However, the camera must be a camera that can change the focal distance, ie, a camera capable of zooming.
Since the present invention is a distance calculation method using a camera, it is necessary to process an image obtained for distance calculation. As shown in FIG. 2, in order to minimize the cost of the image processing, the target candidate region to which the target should be positioned is designated in the entire image region and the camera is moved so that the target is located at the corresponding position .
Fig. 2 is a view showing a state for adjusting the position of the target. Fig. 2 (a) is a diagram showing a state in which the position of the target is not adjusted, and Fig.
As shown in FIG. 2, after moving the target position to the 'target candidate region', pixels in the target candidate region are searched to detect only the pixels corresponding to the target color, and the target is finally detected. The detected target is searched for having the same pixel component in the longitudinal direction to calculate the pixel height of the target.
When the pixel height of the target is calculated, the reference to be enlarged according to the height of the target is selected. The zooming function is used to change the focal distance of the camera so that the target is enlarged to a predetermined reference. An additional explanation for this is shown in FIG.
FIG. 3 is a view (b) (c) showing a state in which a reference according to the height of the target is selected (a) and the size of the target by the reference height is enlarged by changing the focal length.
As shown in the figure, the distance between the targets is calculated using the focal length information which is finally changed by changing the size of the target by the reference height. The information required for the distance calculation needs the distance information of the selected reference height, the basic focal length value, and the changed focal length value. The distance calculation for the target is calculated by the following equation (1).
Here, d is the calculated distance, R is the distance information of the reference height, Lz is the focal length value of the zoom lens, and Lr is the basic focal length value.
For example, when the distance information R of the reference height is 5M, the focal length value Lz of the zoom lens is 87mm, and the basic focal length value Lr is 30mm, the calculation distance d can be obtained as follows .
As described above, according to the present invention, a distance between a user and a target is calculated using a camera, and a focal distance value of a camera lens is changed in order to determine a criterion of a magnification to be enlarged according to the size of a target, The distance between the target and the user can be calculated through a focal length value.
Accordingly, the present invention does not use a distance measuring sensor using a TOF (Time of Flight) principle of a signal such as ultrasonic waves, LIDAR, or RADAR without using GPS, and calculates a distance value using only the focal distance information of the camera lens There is an effect that can be.
The embodiments of the present invention described in the present specification and the configurations shown in the drawings relate to the most preferred embodiments of the present invention and are not intended to encompass all of the technical ideas of the present invention so that various equivalents It should be understood that water and variations may be present. Therefore, it is to be understood that the present invention is not limited to the above-described embodiments, and that various modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims. , Such changes shall be within the scope of the claims set forth in the claims.
Claims (7)
A second step of searching a target candidate region in which the target should be positioned in the entire area of the camera to detect the target only excluding the background not corresponding to the target to find the height of the target;
A third step of zooming the image by changing the focal distance of the camera to set a reference height to which the target should be enlarged corresponding to the size of the target detected in the second step;
Enlarging the image by changing the focal length so that the size of the target corresponds to the reference height set in step 3; And
And calculating the distance between the user and the target based on the focal length information changed in the step (4).
Wherein the step (2) searches only the target candidate region in which the target is located in the first step and does not search the entire region of the image to detect the target, and detects the target candidate region.
Wherein the step (2) finds the height of the target through a specific color of the target.
Wherein the reference height in step 3 is set differently according to the size of the target detected in the second step.
In the fourth step, when the focal length is increased, the size of the target existing in the image is enlarged so that the size of the target is enlarged by the reference height. .
Wherein the distance between the targets is calculated using the focal distance information and the information about the reference height, in the step 5, using the camera lens focal length information.
The calculated distance in the step (5) Where d is the calculated distance, R is the distance information of the reference height, Lz is the focal length value of the zoomed lens, and Lr is the basic focal length value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150061700A KR101674298B1 (en) | 2015-04-30 | 2015-04-30 | Method for distance calculation using a camera lens focal length information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150061700A KR101674298B1 (en) | 2015-04-30 | 2015-04-30 | Method for distance calculation using a camera lens focal length information |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101674298B1 true KR101674298B1 (en) | 2016-11-08 |
Family
ID=57527941
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020150061700A KR101674298B1 (en) | 2015-04-30 | 2015-04-30 | Method for distance calculation using a camera lens focal length information |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101674298B1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107301367A (en) * | 2017-05-31 | 2017-10-27 | 深圳Tcl数字技术有限公司 | Distance detection and display methods, terminal, display device and storage medium |
KR20200108949A (en) * | 2019-03-11 | 2020-09-22 | 충남대학교산학협력단 | Autonomous tractor having crop hight sensing algorithm |
KR20200114114A (en) * | 2019-03-27 | 2020-10-07 | 서울대학교산학협력단 | Distance measurement device |
CN113163167A (en) * | 2021-03-31 | 2021-07-23 | 杭州海康机器人技术有限公司 | Image acquisition method and device |
CN113167577A (en) * | 2020-06-22 | 2021-07-23 | 深圳市大疆创新科技有限公司 | Surveying method for a movable platform, movable platform and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100382439B1 (en) | 1998-05-25 | 2003-05-09 | 마쯔시다덴기산교 가부시키가이샤 | Range finder and camera |
KR20030061736A (en) * | 2003-06-17 | 2003-07-22 | 주식회사 랩코리아 | Shot-distance measurement apparatus for golf play |
KR100955386B1 (en) * | 2009-08-20 | 2010-04-29 | 김대성 | Apparatus for measuring the distance in golf course and method for measuring the distance using the same |
JP2010152026A (en) * | 2008-12-25 | 2010-07-08 | Hitachi Ltd | Distance measuring device and object moving speed measuring device |
KR20120021445A (en) * | 2010-07-30 | 2012-03-09 | (주)엠아이웨어 | Method of calculating distance between cars |
-
2015
- 2015-04-30 KR KR1020150061700A patent/KR101674298B1/en active IP Right Grant
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100382439B1 (en) | 1998-05-25 | 2003-05-09 | 마쯔시다덴기산교 가부시키가이샤 | Range finder and camera |
KR20030061736A (en) * | 2003-06-17 | 2003-07-22 | 주식회사 랩코리아 | Shot-distance measurement apparatus for golf play |
JP2010152026A (en) * | 2008-12-25 | 2010-07-08 | Hitachi Ltd | Distance measuring device and object moving speed measuring device |
KR100955386B1 (en) * | 2009-08-20 | 2010-04-29 | 김대성 | Apparatus for measuring the distance in golf course and method for measuring the distance using the same |
KR20120021445A (en) * | 2010-07-30 | 2012-03-09 | (주)엠아이웨어 | Method of calculating distance between cars |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107301367A (en) * | 2017-05-31 | 2017-10-27 | 深圳Tcl数字技术有限公司 | Distance detection and display methods, terminal, display device and storage medium |
KR20200108949A (en) * | 2019-03-11 | 2020-09-22 | 충남대학교산학협력단 | Autonomous tractor having crop hight sensing algorithm |
KR102238263B1 (en) * | 2019-03-11 | 2021-04-12 | 충남대학교산학협력단 | Autonomous tractor having crop hight sensing algorithm |
KR20200114114A (en) * | 2019-03-27 | 2020-10-07 | 서울대학교산학협력단 | Distance measurement device |
KR102191743B1 (en) | 2019-03-27 | 2020-12-16 | 서울대학교산학협력단 | Distance measurement device |
CN113167577A (en) * | 2020-06-22 | 2021-07-23 | 深圳市大疆创新科技有限公司 | Surveying method for a movable platform, movable platform and storage medium |
CN113163167A (en) * | 2021-03-31 | 2021-07-23 | 杭州海康机器人技术有限公司 | Image acquisition method and device |
CN113163167B (en) * | 2021-03-31 | 2023-04-28 | 杭州海康机器人股份有限公司 | Image acquisition method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3469306B1 (en) | Geometric matching in visual navigation systems | |
US7689001B2 (en) | Method for recognizing location using built-in camera and device thereof | |
KR101674298B1 (en) | Method for distance calculation using a camera lens focal length information | |
US9470511B2 (en) | Point-to-point measurements using a handheld device | |
US10909395B2 (en) | Object detection apparatus | |
EP3089449B1 (en) | Method for obtaining light-field data using a non-light-field imaging device, corresponding device, computer program product and non-transitory computer-readable carrier medium | |
US7656508B2 (en) | Distance measuring apparatus, distance measuring method, and computer program product | |
US20080137912A1 (en) | Apparatus and method for recognizing position using camera | |
US20120218456A1 (en) | Auto-focus tracking | |
WO2011163454A1 (en) | Method and apparatus for image-based positioning | |
WO2015183490A1 (en) | Methods and apparatus for position estimation | |
US20210051262A1 (en) | Camera device and focus method | |
US20190162815A1 (en) | Position estimating apparatus, position estimating method, and terminal apparatus | |
CA2914188C (en) | Method and system for coordinating between image sensors | |
US10254402B2 (en) | Stereo range with lidar correction | |
WO2019048904A1 (en) | Combined stereoscopic and phase detection depth mapping in a dual aperture camera | |
KR101772220B1 (en) | Calibration method to estimate relative position between a multi-beam sonar and a camera | |
KR101752586B1 (en) | Apparatus and method for monitoring object | |
JP2006322853A (en) | Distance measuring device, distance measuring method and distance measuring program | |
JP2009266155A (en) | Apparatus and method for mobile object tracking | |
Wang et al. | Active stereo vision for improving long range hearing using a laser Doppler vibrometer | |
JPH109853A (en) | Distance-measuring type omnibearing visual sensor | |
CN110192226A (en) | Image processing method, processing unit and electronic device based on depth | |
CN113167578A (en) | Distance measuring method and device | |
Shojaeipour et al. | Robot path obstacle locator using webcam and laser emitter |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20191014 Year of fee payment: 4 |