CN107084680B - A kind of target depth measurement method based on machine monocular vision - Google Patents

A kind of target depth measurement method based on machine monocular vision Download PDF

Info

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
Application number
CN201710243882.8A
Other languages
Chinese (zh)
Other versions
CN107084680A (en
Inventor
毛家发
张明国
钟丹虹
高飞
肖刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201710243882.8A priority Critical patent/CN107084680B/en
Publication of CN107084680A publication Critical patent/CN107084680A/en
Application granted granted Critical
Publication of CN107084680B publication Critical patent/CN107084680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/22Measuring 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 kind of target depth measurement method based on machine monocular vision, comprising: following steps: step 1) builds system;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;Step 4), image segmentation;The conversion of step 5), field angle;Step 6) calculates.The present invention under conditions of height of known machine vision, object height, realize target depth analysis, realize the result shows that, the present invention can effectively realize target depth positioning.

Description

A kind of target depth measurement method based on machine monocular vision
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.
CN201710243882.8A 2017-04-14 2017-04-14 A kind of target depth measurement method based on machine monocular vision Active CN107084680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710243882.8A CN107084680B (en) 2017-04-14 2017-04-14 A kind of target depth measurement 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 A kind of target depth measurement 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 A kind of target depth measurement method based on machine monocular vision

Country Status (1)

Country Link
CN (1) CN107084680B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
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 浙江农林大学 Stand tree height measuring method 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 内蒙古工业大学 Ancient building mapping device and method based on geometric perspective method

Citations (6)

* Cited by examiner, † Cited by third party
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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) A kind of target depth measurement method based on machine monocular vision
CN110276808B (en) Method for measuring unevenness of glass plate by combining single camera with two-dimensional code
EP3457078B1 (en) Monocular three-dimensional scanning system based three-dimensional reconstruction method and apparatus
CN109035200B (en) Bolt positioning and pose detection method based on single-eye and double-eye vision cooperation
US8988317B1 (en) Depth determination for light field images
KR101666959B1 (en) Image processing apparatus having a function for automatically correcting image acquired from the camera and method therefor
WO2017092631A1 (en) Image distortion correction method for fisheye image, and calibration method for fisheye camera
WO2014044126A1 (en) Coordinate acquisition device, system and method for real-time 3d reconstruction, and stereoscopic interactive device
CN108510540B (en) Stereoscopic vision camera and height acquisition method thereof
CN110956660B (en) Positioning method, robot, and computer storage medium
US20110074932A1 (en) Accurate 3D Object Reconstruction Using a Handheld Device with a Projected Light Pattern
CN107886547B (en) Fisheye camera calibration method and system
WO2013146269A1 (en) Image capturing device, image processing method, and program
CN108470356B (en) Target object rapid ranging method based on binocular vision
US20160050372A1 (en) Systems and methods for depth enhanced and content aware video stabilization
CN106570899B (en) Target object detection method and device
CN103971378A (en) Three-dimensional reconstruction method of panoramic image in mixed vision system
CN107517346B (en) Photographing method and device based on structured light and mobile device
CN110779491A (en) Method, device and equipment for measuring distance of target on horizontal plane and storage medium
WO2014084181A1 (en) Image measurement device
TWI587241B (en) Method, device and system for generating two - dimensional floor plan
CN109255818B (en) Novel target and extraction method of sub-pixel level angular points thereof
KR20230110618A (en) Image correction method, device and system, electronic device
CN109410234A (en) A kind of control method and control system based on binocular vision avoidance
WO2022218161A1 (en) Method and apparatus for target matching, device, and storage medium

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