CN107084680A - A kind of target depth measuring method based on machine monocular vision - Google Patents

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

Info

Publication number
CN107084680A
CN107084680A CN201710243882.8A CN201710243882A CN107084680A CN 107084680 A CN107084680 A CN 107084680A CN 201710243882 A CN201710243882 A CN 201710243882A CN 107084680 A CN107084680 A CN 107084680A
Authority
CN
China
Prior art keywords
image
target
segmentation
robot
focal length
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.)
Granted
Application number
CN201710243882.8A
Other languages
Chinese (zh)
Other versions
CN107084680B (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)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Abstract

A kind of target depth measuring method based on machine monocular vision, including:Following steps:Step 1), build system;Step 2), focusing:In step 1) on the basis of using the monocular cam in robot focus at the top of object, and cause focus center to be in the centre of image;Step 3), shoot;Step 4), image segmentation;Step 5), the conversion of the angle of visual field;Step 6), calculate.The present invention realizes target depth analysis, realizes that result shows under conditions of the height of known machine vision, object height, and the present invention can effectively realize target depth positioning.

Description

A kind of target depth measuring method based on machine monocular vision
Technical field
The invention belongs to technical field of machine vision, a kind of new method of the depth survey under single camera is disclosed.
Background technology
Current research person is roughly divided into two classes to the method for the acquisition of the depth information of external object, and a class is based on calculating The object localization method of machine vision, another kind of is the location technology of nonvisual sensor, and we, which mainly introduce, herein is based on regarding 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-level crossing depth acquisition methods.
Its precision of binocular perceived depth wants camera subject performance, illumination and baseline length (distance between two cameras) influence, It is relatively large in processing data amount because the complexity of algorithm in application above has many limitations, it is unfavorable for target positioning real-time The requirement of property.
Current monocular depth perceive it is widely used be camera calibrated technology, also referred to as camera calibration technology.Camera calibration One of basic problem of computer vision, it is intended to determined by using characteristics of image and corresponding 3D features camera internal and External parameter.Camera calibrated demarcation extensively study for a long time in computer vision, 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.In calibration process, due to being limited by equipment, it can not still accomplish very Respective coordinates of the point in world coordinate system and image do mark system are accurately recorded, if its coordinate is not accurate enough, then The accuracy of obtained transition matrix can also be restricted, and therefore the precision of Coordinate Conversion can also fluctuate, and self-calibrating method is not Dependent on calibration reference substance, but calibration result is relatively unstable.
The content of the invention
The present invention will overcome the drawbacks described above of prior art, start with from the geometry projective model of video camera imaging, propose one Plant new depth measurement method.
The present invention have studied camera and target depth information geometrical model, target digitization length and target depth it Between mathematical relationship and imaging process in the angle of visual field change influence to target digitization length, effectively overcome camera school The deficiency of quasi- method, target depth measurement problem is accurately solved using single camera measurement.
The target depth measuring method of machine monocular vision of the present invention, comprises the following steps:
Step 1), build system
(1.1) robot with monocular vision is built, it is assumed that its monocular cam is highly h1, mesh to be measured Mark is in the front position of the robot, and its height is h2, the horizontal range of target range camera position to be measured is depth note For m;
(1.2) measure target depth information when, robot is always by walking so that target be located at robot just before Side;
Step 2), focusing:In step 1) on the basis of using the monocular cam in robot focus in object Top, and cause focus center to be in the centre of image;
Step 3), shoot:Robot is in step 2) on the basis of carry out shooting video or photo, and image when reading to shoot Parameter, includes the resolution ratio (M ' * N ') of focal length f, image;
Step 4), image segmentation:Target Segmentation is come out in the shooting image of gained, the digitlization for obtaining target is long Degree, including:
(4.1) shooting image is inputted;
(4.2) by image (M*N) of the image scaling for normalization size;
(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 keeps constant, is not otherwise the upper point of segmentation object, then the point is set into black Prominent segmentation object;
(4.5) image treated through (4.4) is converted into gray level image;
(4.6) image after (4.5) are handled 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|;
Step 5), the conversion of the angle of visual field:The coaptation of the focal length and camera of image goes out equivalent focal length f ' during by shooting, its InWherein equivalent focal length is represented with f ', and camera lens real focal length is represented with f, the catercorner length r of 135 films0Table Show, the actual catercorner lengths of lens image sensor CCD are represented with r.In the case where be realised that equivalent focal length, camera during shooting The angle of visual field can be tried to achieve by following formula:
F ' in formula (1) is in units of mm, and arctan () is arctan function.
Step 6), calculate:Wide, high (M*N) of the image after 4) handling are read, target depth m is calculated by above parameter;
α is the angle of visual field calculated by formula (1), and M, N are the size after image scaling, h1、h2It is known quantity, | C1D1| It can be obtained by exact image segmentation, the formula shows that target depth can be tried to achieve according to digitized image.
It is an advantage of the invention that:The inventive method accuracy is higher, and algorithm is simple, it is easy to operate, and can be effectively reduced The cost of production.Due to monocular depth measuring system simple structure, it can be widely used on mobile phone and IP Camera, it is to avoid By the Stereo matching process that binocular camera ranging is complicated, computational complexity is reduced, the requirement to hardware is relatively low, Neng Gouman The requirement of biped robot real-time in the industrial production.
Brief description of the drawings
Fig. 1 is the geometry projective model figure of the present invention, and XYZ is the rectangular coordinate system in space set up, and O is coordinate center, Robot (height of machine vision from the ground) is h1, it is highly h that target AB knows in robot2, target object AB distances take the photograph It is the OA length in m, i.e. Fig. 1 as the horizontal range horizontal range of head.F is robot camera position, and camera is in imaging Focal length FC is f, and image plane is π1, object AB projects to image plane π after camera imaging1Upper is CD, point A, B, C, D, O, F In the plane where XOZ.
Fig. 2 is angle of visual field schematic diagram of the invention.G '-I ' are camera lens visual range diameter.F-C ' is that object distance is represented with s, α For the angle of visual field.
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 Represent, equivalent focal length is represented with f ', the catercorner length r of 135 films0Represent, the actual catercorner lengths of CCD are represented with r.
Fig. 4 is the angle of visual field of the invention and imaging sensor, shooting focal length relation schematic diagram.The angle of visual field be α, focal length be f, CCD diagonal are r.
Fig. 5 is the back gauge and focal length and the relational model of the angle of visual field of the imaging plane of the present invention.Simulated when assuming picture Image plane π1Size is l*w (l, w by centimetre in units of), it is assumed that image plane π1Four summits be respectively G, H, I, J.By thing CD extensions hand over image plane edge in E points in body imaging surface, then CE is obviously imaging length of side l half l/2.Because FC is perpendicular to this Image plane is simulated, i.e., perpendicular to image plane π1.In right angled triangle FCG, it is clear that GC length is that rectangle GHIJ is cornerwise Half.
Embodiment
The present invention is further illustrated below in conjunction with the accompanying drawings.
The target depth measuring method of machine monocular vision of the present invention, comprises the following steps:
Step 1), build system
(1.1) robot with monocular vision is built, it is assumed that its monocular cam is highly h1, mesh to be measured Mark is in the front position of the robot, and its height is h2, the horizontal range of target range camera position to be measured is depth note For m.The geometry projective model of the present invention is as shown in Fig. 1 in Figure of description, and the geometry projective model uses pin hole perspective model General principle.
(1.2) measure target depth information when, robot is always by walking so that target be located at robot just before Side.
Step 2), focusing:In step 1) on the basis of using the monocular cam in robot focus in object Top, and cause focus center to be in the centre of image;
Step 3), shoot:Robot is in step 2) on the basis of carry out shooting video or photo, and image when reading to shoot Parameter, includes the resolution ratio (M ' * N ') of focal length f, image;
Step 4), image segmentation:Target Segmentation is come out in the shooting image of gained, the digitlization for obtaining target is long Degree, including:
(4.1) shooting image is inputted;
(4.2) by image (M*N) of the image scaling for normalization size;
(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 keeps constant, is not otherwise the upper point of segmentation object, then the point is set into black Prominent segmentation object;
(4.5) image treated through (4.4) is converted into gray level image;
(4.6) image after (4.5) are handled 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|;
Step 5), the conversion of the angle of visual field:The so-called angle of visual field refers to that the scenery in the angle of visual field can entirely fall in imaging size It is interior, and the scenery beyond the angle of visual field will not be ingested.We commonly use the angle of visual field to characterize the scope of observing scene.In optical instrument In, using the camera lens of optical instrument as summit, it can be made up of with the image of measured target two edges of the maximum magnitude of camera lens Angle, the referred to as angle of visual field.Fig. 2 describes the angle of visual field of visual range diameter in Figure of description, | G ' I ' | it is visual for camera lens The diameter length of scope, | FC ' | for the distance of video camera to target object, ∠ G ' FI ' are the angle of visual field.Might as well set | FC ' |=s, ∠ G ' FI '=α, then havingSet up.The coaptation of the focal length and camera of image goes out equivalent Jiao during by shooting Away from f ', whereinWherein equivalent focal length is represented with f ', and camera lens real focal length is represented with f, the catercorner length of 135 films Use r0Represent, the actual catercorner lengths of lens image sensor CCD are represented with r.Fig. 3 describes camera reality in Figure of description Focal length f and equivalent focal length f ' conversion relation.In the case where be realised that equivalent focal length, the camera angle of visual field can pass through during shooting Following formula is tried to achieve:
F ' in formula (1) is in units of mm, and arctan () is arctan function.
Between angle of visual field α and focal length f, image sensor diagonal length r as shown in Fig. 4 in relation Figure of description.
Fig. 5 describes the back gauge and focal length and the relation mould of the angle of visual field of the imaging plane of the present invention in Figure of description Type.
Step 6), calculate:Wide, high (M*N) of the image after 4) handling are read, target depth m is calculated by above parameter;
α is the angle of visual field calculated by formula (1), and M, N are the size after image scaling, h1、h2It is known quantity, | C1D1| It can be obtained by exact image segmentation, the formula shows that target depth can be tried to achieve according to digitized image.

Claims (1)

1. a kind of target depth measuring method based on machine monocular vision, including:
Step 1), build system
(1.1) robot with monocular vision is built, it is assumed that its monocular cam is highly h1, target position to be measured In the front position of the robot, its height is h2, the horizontal range of target range camera position to be measured is that depth is designated 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:In step 1) on the basis of using the monocular cam in robot focus at the top of object, And cause focus center to be in the centre of image;
Step 3), shoot:Robot is in step 2) on the basis of carry out shooting video or photo, and image is joined when reading to shoot Number, includes the resolution ratio (M ' * N ') of focal length f, image;
Step 4), image segmentation:Target Segmentation is come out in the shooting image of gained, the digitlization length of target is obtained, wrapped Include:
(4.1) shooting image is inputted;
(4.2) by image (M*N) of the image scaling for normalization size;
(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 keeps constant, is not otherwise the upper point of segmentation object, is then set to black to protrude by the point Segmentation object;
(4.5) image treated through (4.4) is converted into gray level image;
(4.6) image after (4.5) are handled 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|;
Step 5), the conversion of the angle of visual field:The coaptation of the focal length and camera of image goes out equivalent focal length f ' during by shooting, whereinWherein equivalent focal length is represented with f ', and camera lens real focal length is represented with f, the catercorner length r of 135 films0Represent, The actual catercorner lengths of lens image sensor CCD are represented with r.In the case where be realised that equivalent focal length, camera is regarded during shooting Rink corner can be tried to achieve by following formula:
F ' in formula (1) is in units of mm, and arctan () is arctan function.
Step 6), calculate:Wide, high (M*N) of the image after 4) handling are read, target depth m is calculated by above parameter;
α is the angle of visual field calculated by formula (1), and M, N are the size after image scaling, h1、h2It is known quantity, | C1D1| it can lead to Cross exact image segmentation to obtain, the formula shows that target depth can be tried to achieve 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 true CN107084680A (en) 2017-08-22
CN107084680B 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)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108432903A (en) * 2018-06-15 2018-08-24 广东工业大学 The terminal angle method of adjustment and tea frying robot of tea frying robot stir-frying tealeaves
CN110470216A (en) * 2019-07-10 2019-11-19 湖南交工智能技术有限公司 A kind of three-lens high-precision vision measurement method and device
CN110672020A (en) * 2019-06-14 2020-01-10 浙江农林大学 Stand tree height measuring method based on monocular vision
CN112229323A (en) * 2020-09-29 2021-01-15 华南农业大学 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
CN112445208A (en) * 2019-08-15 2021-03-05 纳恩博(北京)科技有限公司 Robot, method and device for determining travel route, and storage medium
CN113446986A (en) * 2021-05-13 2021-09-28 浙江工业大学 Target depth measurement method based on observation height change
CN113592934A (en) * 2021-06-29 2021-11-02 浙江工业大学 Monocular camera-based target depth and height measuring method and device
CN114252063A (en) * 2021-12-22 2022-03-29 内蒙古工业大学 Ancient building surveying and mapping device based on geometric perspective method and surveying and mapping method thereof
WO2023035404A1 (en) * 2021-09-13 2023-03-16 江苏科技大学 Method for estimating comprised angle between camera plane and target plane based on monocular vision
CN117880630A (en) * 2024-03-13 2024-04-12 杭州星犀科技有限公司 Focusing depth acquisition method, focusing depth acquisition system and terminal
CN117880630B (en) * 2024-03-13 2024-06-07 杭州星犀科技有限公司 Focusing depth acquisition method, focusing depth acquisition system and terminal

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
赵松: "基于单目视觉的实时测距算法", 《宿州学院学报》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108432903A (en) * 2018-06-15 2018-08-24 广东工业大学 The terminal angle method of adjustment and tea frying robot of tea frying robot stir-frying tealeaves
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
CN110470216A (en) * 2019-07-10 2019-11-19 湖南交工智能技术有限公司 A kind of 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
CN112229323A (en) * 2020-09-29 2021-01-15 华南农业大学 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
CN113446986A (en) * 2021-05-13 2021-09-28 浙江工业大学 Target depth measurement method based on observation height change
CN113446986B (en) * 2021-05-13 2022-07-22 浙江工业大学 Target depth measuring method based on observation height change
CN113592934A (en) * 2021-06-29 2021-11-02 浙江工业大学 Monocular camera-based target depth and height measuring method and device
CN113592934B (en) * 2021-06-29 2024-02-06 浙江工业大学 Target depth and height measuring method and device based on monocular camera
WO2023035404A1 (en) * 2021-09-13 2023-03-16 江苏科技大学 Method for estimating comprised angle between camera plane and target plane based on monocular vision
CN114252063A (en) * 2021-12-22 2022-03-29 内蒙古工业大学 Ancient building surveying and mapping device based on geometric perspective method and surveying and mapping method thereof
CN117880630A (en) * 2024-03-13 2024-04-12 杭州星犀科技有限公司 Focusing depth acquisition method, focusing depth acquisition system and terminal
CN117880630B (en) * 2024-03-13 2024-06-07 杭州星犀科技有限公司 Focusing depth acquisition method, focusing depth acquisition system and terminal

Also Published As

Publication number Publication date
CN107084680B (en) 2019-04-09

Similar Documents

Publication Publication Date Title
CN107084680B (en) A kind of target depth measurement method based on machine monocular vision
CN109146980B (en) Monocular vision based optimized depth extraction and passive distance measurement method
CN109035320B (en) Monocular vision-based depth extraction method
CN110276808B (en) Method for measuring unevenness of glass plate by combining single camera with two-dimensional code
US9965870B2 (en) Camera calibration method using a calibration target
CN108416791B (en) Binocular vision-based parallel mechanism moving platform pose monitoring and tracking method
CN110118528B (en) Line structure light calibration method based on chessboard target
KR101666959B1 (en) Image processing apparatus having a function for automatically correcting image acquired from the camera and method therefor
CN102376089B (en) Target correction method and system
CN109859272B (en) Automatic focusing binocular camera calibration method and device
CN110956660B (en) Positioning method, robot, and computer storage medium
CN107886547B (en) Fisheye camera calibration method and system
CN111192235B (en) Image measurement method based on monocular vision model and perspective transformation
CN104173054A (en) Measuring method and measuring device for height of human body based on binocular vision technique
CN103971378A (en) Three-dimensional reconstruction method of panoramic image in mixed vision system
KR101759798B1 (en) Method, device and system for generating an indoor two dimensional plan view image
CN109255818B (en) Novel target and extraction method of sub-pixel level angular points thereof
WO2023046211A1 (en) Photogrammetry method, apparatus and device, and storage medium
WO2014084181A1 (en) Image measurement device
CN108362205B (en) Space distance measuring method based on fringe projection
CN110415286B (en) External parameter calibration method of multi-flight time depth camera system
CN104123726B (en) Heavy forging measuring system scaling method based on vanishing point
CN109493378B (en) Verticality detection method based on combination of monocular vision and binocular vision
JP3696336B2 (en) How to calibrate the camera
KR102065337B1 (en) Apparatus and method for measuring movement information of an object using a cross-ratio

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