CN107084680B - Target depth measuring method based on machine monocular vision - Google Patents
Target depth measuring method based on machine monocular vision Download PDFInfo
- Publication number
- CN107084680B CN107084680B CN201710243882.8A CN201710243882A CN107084680B CN 107084680 B CN107084680 B CN 107084680B CN 201710243882 A CN201710243882 A CN 201710243882A CN 107084680 B CN107084680 B CN 107084680B
- Authority
- CN
- China
- Prior art keywords
- image
- target
- segmentation
- shooting
- robot
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/22—Measuring arrangements characterised by the use of optical techniques for measuring depth
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
A target depth measuring method based on machine monocular vision comprises the following steps: the method comprises the following steps: step 1), building a system; step 2), focusing: using a monocular camera on the robot to focus on the top of the object on the basis of the step 1), and enabling the center of the focus to be at the midpoint of the image; step 3), shooting; step 4), image segmentation; step 5), converting the angle of view; and 6) calculating. The invention realizes the target depth analysis under the condition of the known machine vision height and the known target height, and the realization result shows that the invention can effectively realize the target depth positioning.
Description
Technical field
The invention belongs to technical field of machine vision, disclose a kind of new method of depth measurement under single camera.
Background technique
Current research person is roughly divided into two classes to the method for the acquisition of the depth information of external object, and one kind is based on calculating
The object localization method of machine vision, another kind of is the location technology of nonvisual sensor, we mainly introduce based on view herein
The location technology of feel.The object localization method of view-based access control model mainly includes binocular perceived depth method, monocular camera calibration side
Method and single camera-plane mirror depth acquisition methods.
Its precision of binocular perceived depth wants camera subject performance, illumination and baseline length (distance between two cameras) to influence,
It is relatively large in processing data volume since the complexity of algorithm above has many limitations in application, it is real-time to be unfavorable for target positioning
The requirement of property.
What monocular depth perception at present was widely used is the technology of camera calibrated, also referred to as camera calibration technology.Camera calibration
One of the basic problem of computer vision, it is intended to determined by using characteristics of image and corresponding 3D feature camera internal and
External parameter.Camera calibrated calibration has been extensively studied in computer vision for a long time, and many has been proposed
Scaling method.
Basic camera calibration method can be divided into traditional camera calibration and self-calibration.Traditional scaling method has height
Calibration accuracy, but need specific scaling reference.During the calibration process, due to being limited by equipment, can not still accomplish very
It accurately records a point and does the respective coordinates in mark system in world coordinate system and image, if its coordinate is inaccurate,
The accuracy of obtained transition matrix also will receive restriction, and therefore the precision of coordinate conversion can also fluctuate, self-calibrating method is not
Dependent on calibration reference substance, but calibration result is relatively unstable.
Summary of the invention
The present invention will overcome the drawbacks described above of the prior art, start with from the geometry projective model of video camera imaging, propose one
The new depth measurement method of kind.
The present invention have studied the geometrical model of camera and target depth information, target digitization length and target depth it
Between mathematical relationship and imaging process in field angle change influence to target digitization length, effectively overcome camera school
The deficiency of quasi- method accurately solves the problems, such as that target depth measures using single camera measurement.
The target depth measurement method of machine monocular vision of the present invention, comprising the following steps:
Step 1) builds system
(1.1) robot with monocular vision is built, it is assumed that its monocular cam height is h1, mesh to be measured
Mark is in the front position of the robot, height h2, horizontal distance, that is, depth note of the object to be measured apart from camera position
For m;
(1.2) when measuring target depth information, robot always by walking so that target be located at robot just before
Side;
Step 2), focusing: use the monocular cam in robot focus in object on the basis of step 1)
Top, and focus center is made to be in the centre of image;
Step 3), shooting: robot carries out shooting video or photo on the basis of step 2), and read shooting when image
Parameter, the resolution ratio (M ' * N ') including focal length f, image;
Step 4), image segmentation: Target Segmentation is come out in resulting shooting image, the digitlization for obtaining target is long
Degree, comprising:
(4.1) input shooting image;
It (4.2) is the image (M*N) for normalizing size by image scaling;
(4.3) gaussian filtering removes picture noise;
(4.4) judge whether each point on image is point in target using the method for point by point scanning, if certain pixel
Point is the point on segmentation object, and pixel remains unchanged, and is not otherwise the upper point of segmentation object, then the point is set to black
Prominent segmentation object;
(4.5) gray level image will be converted into through (4.4) processed image;
(4.6) by (4.5) treated, image is configured suitable Threshold segmentation;
(4.7) image after Threshold segmentation is searched into profile;
(4.8) the vertical boundary minimum rectangle of profile is calculated;
(4.9) screening of area and height is carried out to rectangular profile;
(4.10) boundary rectangle of segmentation object is drawn, and then obtains Target Segmentation length | C1D1|;
The conversion of step 5), field angle: the coaptation of the focal length and camera of image goes out equivalent focal length f ' when by shooting,
InWherein equivalent focal length is indicated with f ', and camera lens real focal length is indicated with f, the catercorner length r of 135 films0Table
Show, the practical catercorner length of lens image sensor CCD is indicated with r.In the case where being realised that equivalent focal length, camera when shooting
Field angle can be acquired by following formula:
For f ' in formula (1) as unit of mm, arctan () is arctan function.
Step 6) calculates: reading width, the height (M*N) of the image after 4) handling, calculates target depth m by the above parameter;
α is the field angle calculated by formula (1), and M, N are the size after image scaling, h1、h2It is known quantity, | C1D1|
It can divide to obtain by exact image, which shows that target depth can be acquired according to digitized image.
The invention has the advantages that the method for the present invention accuracy is higher, algorithm is simple, easily operated, can be effectively reduced
The cost of production.Due to monocular depth measuring system simple structure, it can be widely used, avoid on mobile phone and IP Camera
By the Stereo matching process of binocular camera ranging complexity, computational complexity is reduced, the requirement to hardware is lower, Neng Gouman
The requirement of biped robot real-time in the industrial production.
Detailed description of the invention
Fig. 1 is geometry projective model figure of the invention, and XYZ is the rectangular coordinate system in space established, and O is coordinate center,
Robot (height of machine vision from the ground) is h1, the known target AB height of robot is h2, target object AB distance takes the photograph
As the horizontal distance horizontal distance of head is m, i.e. OA length in Fig. 1.F is robot camera position, and camera is in imaging
Focal length FC is f, as plane is π1, object AB projects to after camera imaging as plane π1Upper is CD, point A, B, C, D, O, F
In the plane where XOZ.
Fig. 2 is field angle schematic diagram of the invention.G '-I ' is camera lens visual range diameter.F-C ' is that object distance is indicated with s, α
For field angle.
Fig. 3 is mid-focal length of the present invention and equivalent focal length conversion relation schematic diagram.O is optical center of lens, camera lens real focal length f
It indicates, equivalent focal length is indicated with f ', the catercorner length r of 135 films0It indicates, the practical catercorner length of CCD is indicated with r.
Fig. 4 is field angle and imaging sensor, shooting focal length relation schematic diagram of the invention.Field angle is α, focal length f,
CCD diagonal line is r.
Fig. 5 is the back gauge of imaging plane of the invention and the relational model of focal length and field angle.Assuming that being simulated when imaging
As plane π1Size is l*w (l, w by centimetre as unit of), it is assumed that as plane π1Four vertex be respectively G, H, I, J.By object
CD, which extends, in body imaging surface hands over as horizontal edge is in E point, then CE is obviously the half l/2 that side length l is imaged.Since FC is perpendicular to this
Photofit picture plane, i.e., perpendicular to as plane π1.In right angled triangle FCG, it is clear that the length of GC is that rectangle GHIJ is cornerwise
Half.
Specific embodiment
The present invention is further illustrated with reference to the accompanying drawing.
The target depth measurement method of machine monocular vision of the present invention, comprising the following steps:
Step 1) builds system
(1.1) robot with monocular vision is built, it is assumed that its monocular cam height is h1, mesh to be measured
Mark is in the front position of the robot, height h2, horizontal distance, that is, depth note of the object to be measured apart from camera position
For m.For geometry projective model of the invention as shown in Fig. 1 in Figure of description, which uses pin hole perspective model
Basic principle.
(1.2) when measuring target depth information, robot always by walking so that target be located at robot just before
Side.
Step 2), focusing: use the monocular cam in robot focus in object on the basis of step 1)
Top, and focus center is made to be in the centre of image;
Step 3), shooting: robot carries out shooting video or photo on the basis of step 2), and read shooting when image
Parameter, the resolution ratio (M ' * N ') including focal length f, image;
Step 4), image segmentation: Target Segmentation is come out in resulting shooting image, the digitlization for obtaining target is long
Degree, comprising:
(4.1) input shooting image;
It (4.2) is the image (M*N) for normalizing size by image scaling;
(4.3) gaussian filtering removes picture noise;
(4.4) judge whether each point on image is point in target using the method for point by point scanning, if certain pixel
Point is the point on segmentation object, and pixel remains unchanged, and is not otherwise the upper point of segmentation object, then the point is set to black
Prominent segmentation object;
(4.5) gray level image will be converted into through (4.4) processed image;
(4.6) by (4.5) treated, image is configured suitable Threshold segmentation;
(4.7) image after Threshold segmentation is searched into profile;
(4.8) the vertical boundary minimum rectangle of profile is calculated;
(4.9) screening of area and height is carried out to rectangular profile;
(4.10) boundary rectangle of segmentation object is drawn, and then obtains Target Segmentation length | C1D1|;
The conversion of step 5), field angle: so-called field angle refers to that the scenery in field angle can entirely fall in imaging size
It is interior, and the scenery other than field angle will not be ingested.We commonly use field angle to characterize the range of observing scene.In optical instrument
In, using the camera lens of optical instrument as vertex, can be made up of two edges of the maximum magnitude of camera lens with the image of measured target
Angle, referred to as field angle.Fig. 2 describes the field angle of visual range diameter in Figure of description, | G ' I ' | it is visual for camera lens
The diameter length of range, | FC ' | for the distance of video camera to target object, ∠ G ' FI ' is field angle.Might as well set | FC ' |=s,
∠ G ' FI '=α, then havingIt sets up.The coaptation of the focal length and camera of image goes out equivalent coke when by shooting
Away from f ', whereinWherein equivalent focal length is indicated with f ', and camera lens real focal length is indicated with f, the catercorner length of 135 films
Use r0It indicates, the practical catercorner length of lens image sensor CCD is indicated with r.Fig. 3 describes camera reality in Figure of description
The conversion relation of focal length f and equivalent focal length f '.In the case where being realised that equivalent focal length, camera field angle can pass through when shooting
Following formula acquires:
For f ' in formula (1) as unit of mm, arctan () is arctan function.
Between field angle α and focal length f, image sensor diagonal length r as shown in Fig. 4 in relationship Figure of description.
Fig. 5 describes the back gauge of imaging plane of the invention and the relationship mould of focal length and field angle in Figure of description
Type.
Step 6) calculates: reading width, the height (M*N) of the image after 4) handling, calculates target depth m by the above parameter;
α is the field angle calculated by formula (1), and M, N are the size after image scaling, h1、h2It is known quantity, | C1D1|
It can divide to obtain by exact image, which shows that target depth can be acquired according to digitized image.
Claims (1)
1. a kind of target depth measurement method based on machine monocular vision, comprising:
Step 1) builds system
(1.1) robot with monocular vision is built, it is assumed that its monocular cam height is h1, object to be measured position
In the front position of the robot, height h2, horizontal distance, that is, depth of the object to be measured apart from camera position be denoted as m;
(1.2) when measuring target depth information, robot is always by walking, so that target is located at the front of robot;
Step 2), focusing: on the basis of step 1) using the monocular cam in robot focus at the top of object,
And focus center is made to be in the centre of image;
Step 3), shooting: robot carries out shooting video or photo on the basis of step 2), and read shooting when image join
Number, the resolution ratio M ' * N ' including focal length f, image;
Step 4), image segmentation: coming out Target Segmentation in resulting shooting image, obtains the digitlization length of target, packet
It includes:
(4.1) input shooting image;
It (4.2) is the image M*N for normalizing size by image scaling;
(4.3) gaussian filtering removes picture noise;
(4.4) judge whether each point on image is point in target using the method for point by point scanning, if certain pixel is
Point on segmentation object, pixel remain unchanged, and are not otherwise the upper point of segmentation object, then the point are set to black to protrude
Segmentation object;
(4.5) gray level image will be converted into through (4.4) processed image;
(4.6) by (4.5) treated, image is configured suitable Threshold segmentation;
(4.7) image after Threshold segmentation is searched into profile;
(4.8) the vertical boundary minimum rectangle of profile is calculated;
(4.9) screening of area and height is carried out to rectangular profile;
(4.10) boundary rectangle of segmentation object is drawn, and then obtains Target Segmentation length | C1D1|;
The conversion of step 5), field angle: the coaptation of the focal length and camera of image goes out equivalent focal length f ' when by shooting, wherein Wherein equivalent focal length is indicated with f ', and camera lens real focal length is indicated with f, the catercorner length r of 135 films0It indicates,
The practical catercorner length of lens image sensor CCD is indicated with r, and in the case where being realised that equivalent focal length, camera is regarded when shooting
Rink corner can be acquired by following formula:
For f ' in formula (1) as unit of mm, arctan () is arctan function;
Step 6) calculates: reading width, the height (M*N) of the image after 4) handling, calculates target depth m by the above parameter;
α is the field angle calculated by formula (1), and M, N are the size after image scaling, h1、h2It is known quantity, | C1D1| it can lead to
It crosses exact image to divide to obtain, which shows that target depth can be acquired according to digitized image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710243882.8A CN107084680B (en) | 2017-04-14 | 2017-04-14 | Target depth measuring method based on machine monocular vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710243882.8A CN107084680B (en) | 2017-04-14 | 2017-04-14 | Target depth measuring method based on machine monocular vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107084680A CN107084680A (en) | 2017-08-22 |
CN107084680B true CN107084680B (en) | 2019-04-09 |
Family
ID=59611956
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710243882.8A Active CN107084680B (en) | 2017-04-14 | 2017-04-14 | Target depth measuring method based on machine monocular vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107084680B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108432903B (en) * | 2018-06-15 | 2021-05-18 | 广东工业大学 | Tea frying robot and tail end posture adjusting method for tea frying of tea frying robot |
CN110672020A (en) * | 2019-06-14 | 2020-01-10 | 浙江农林大学 | A method for measuring the height of standing trees based on monocular vision |
CN110470216B (en) * | 2019-07-10 | 2022-01-28 | 湖南交工智能技术有限公司 | Three-lens high-precision vision measurement method and device |
CN112445208A (en) * | 2019-08-15 | 2021-03-05 | 纳恩博(北京)科技有限公司 | Robot, method and device for determining travel route, and storage medium |
CN112229323B (en) * | 2020-09-29 | 2022-07-05 | 华南农业大学 | Six-degree-of-freedom measurement method of checkerboard cooperative target based on monocular vision of mobile phone and application of six-degree-of-freedom measurement method |
CN113446986B (en) * | 2021-05-13 | 2022-07-22 | 浙江工业大学 | Target depth measuring method based on observation height change |
CN113592934B (en) * | 2021-06-29 | 2024-02-06 | 浙江工业大学 | Target depth and height measuring method and device based on monocular camera |
CN113793315A (en) * | 2021-09-13 | 2021-12-14 | 江苏科技大学 | Monocular vision-based camera plane and target plane included angle estimation method |
CN114252063B (en) * | 2021-12-22 | 2023-06-23 | 内蒙古工业大学 | An ancient architectural surveying and mapping device and its surveying and mapping method based on geometric perspective |
CN117880630B (en) * | 2024-03-13 | 2024-06-07 | 杭州星犀科技有限公司 | Focusing depth acquisition method, focusing depth acquisition system and terminal |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009016256A1 (en) * | 2007-08-01 | 2009-02-05 | Dublin City University | Ultra-compact aperture controlled depth from defocus range sensor |
CN102073050A (en) * | 2010-12-17 | 2011-05-25 | 清华大学 | Depth-camera based three-dimensional scene depth measurement device |
CN102168954A (en) * | 2011-01-14 | 2011-08-31 | 浙江大学 | Monocular-camera-based method for measuring depth, depth field and sizes of objects |
CN102365522A (en) * | 2009-04-03 | 2012-02-29 | 欧姆龙株式会社 | Three-dimensional shape measuring device, three-dimensional shape measuring method, and three-dimensional shape measuring program |
CN102369550A (en) * | 2009-03-31 | 2012-03-07 | 松下电器产业株式会社 | Stereo image processor and stereo image processing method |
US9395440B2 (en) * | 2008-04-14 | 2016-07-19 | Volkswagen Aktiengesellschaft | Optical distance measuring device and method for optical distance measurement |
-
2017
- 2017-04-14 CN CN201710243882.8A patent/CN107084680B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009016256A1 (en) * | 2007-08-01 | 2009-02-05 | Dublin City University | Ultra-compact aperture controlled depth from defocus range sensor |
US9395440B2 (en) * | 2008-04-14 | 2016-07-19 | Volkswagen Aktiengesellschaft | Optical distance measuring device and method for optical distance measurement |
CN102369550A (en) * | 2009-03-31 | 2012-03-07 | 松下电器产业株式会社 | Stereo image processor and stereo image processing method |
CN102365522A (en) * | 2009-04-03 | 2012-02-29 | 欧姆龙株式会社 | Three-dimensional shape measuring device, three-dimensional shape measuring method, and three-dimensional shape measuring program |
CN102073050A (en) * | 2010-12-17 | 2011-05-25 | 清华大学 | Depth-camera based three-dimensional scene depth measurement device |
CN102168954A (en) * | 2011-01-14 | 2011-08-31 | 浙江大学 | Monocular-camera-based method for measuring depth, depth field and sizes of objects |
Non-Patent Citations (1)
Title |
---|
基于单目视觉的实时测距算法;赵松;《宿州学院学报》;20160831;第31卷(第8期);114-117页 * |
Also Published As
Publication number | Publication date |
---|---|
CN107084680A (en) | 2017-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107084680B (en) | Target depth measuring method based on machine monocular vision | |
CN110276808B (en) | Method for measuring unevenness of glass plate by combining single camera with two-dimensional code | |
CN110689581B (en) | Structured light module calibration method, electronic device, and computer-readable storage medium | |
EP3457078B1 (en) | Monocular three-dimensional scanning system based three-dimensional reconstruction method and apparatus | |
US8988317B1 (en) | Depth determination for light field images | |
CN103971378B (en) | A kind of mix the three-dimensional rebuilding method of panoramic picture in visual system | |
CN105279372B (en) | A kind of method and apparatus of determining depth of building | |
CN112132906B (en) | External parameter calibration method and system between depth camera and visible light camera | |
CN107729893B (en) | Visual positioning method and system of die spotting machine and storage medium | |
CN107886547B (en) | Fisheye camera calibration method and system | |
CN108510540B (en) | Stereoscopic vision camera and height acquisition method thereof | |
WO2014044126A1 (en) | Coordinate acquisition device, system and method for real-time 3d reconstruction, and stereoscopic interactive device | |
KR20230110618A (en) | Image correction method, device and system, electronic device | |
TWI587241B (en) | Method, device and system for generating two - dimensional floor plan | |
CN102278946A (en) | Imaging device, distance measuring method | |
CN109089025A (en) | A kind of image instrument digital focus method based on optical field imaging technology | |
WO2011031538A2 (en) | Accurate 3d object reconstruction using a handheld device with a projected light pattern | |
CN107977996B (en) | Spatial Target Localization Method Based on Target Calibration Localization Model | |
CN108629756B (en) | A Kinectv2 Depth Image Invalid Point Repair Method | |
US20160050372A1 (en) | Systems and methods for depth enhanced and content aware video stabilization | |
CN102831601A (en) | Three-dimensional matching method based on union similarity measure and self-adaptive support weighting | |
WO2014084181A1 (en) | Image measurement device | |
CN110060304B (en) | Method for acquiring three-dimensional information of organism | |
CN113822942A (en) | Method for measuring object size by monocular camera based on two-dimensional code | |
CN108648222A (en) | The method for improving and device of structure light depth data spatial resolution |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |