0% found this document useful (0 votes)
13 views6 pages

A_Real_Time_Object_Distance_Measurement

Uploaded by

jiujiangluck
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views6 pages

A_Real_Time_Object_Distance_Measurement

Uploaded by

jiujiangluck
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Proceedings of the IASTED International Conference

Modelling and Simulation (MS 2013)


July 17 - 19 , 201 3 Banff, Canada

A REAL-TIME OBJECT DISTANCE MEASUREMENT USING A


MONOCULAR CAMERA

Peyman Alizadeh 1, Meysar Zeinali 2


1
Student Member, IEEE,
School of Engineering, Laurentian University, Sudbury, ON, Canada
E-mail:Px_alizadeh@laurentian.ca
2
Member, IEEE
School of Engineering, Laurentian University, Sudbury, ON, Canada
E-mail:Mzeinali@laurentian.ca

ABSTRACT appearance-based (region-based), feature-based, and


Distance measurement for moving object using image contour-based methods. Model-based tracking methods
processing is one of the important research areas in robotics need previous knowledge of the object shapes for the
and computer vision. In the current paper, an improved matching process and in order to find the object in the scene;
method is proposed to compute the distance of the moving Model-based tracking methods apply the exact geometrical
object using a monocular camera and based on the feature models of the object. Model-based tracking methods have
extraction method. First, the specific object is tracked by a two shortcomings: 1) an object that is not in the database
camera and then the distance from the object to the camera cannot be recognized by using these models. And 2)
is measured using a computationally efficient algorithm that establishing this model is complicated and sometimes
is implemented in MATLAB/ SIMULINK environment. impossible [3]. Appearance-based methods track an object
Experimental results show that this method is fast, efficient, using the 2-D shape of the connected region. This tracking
and accurate and can be used for real-time robotic approach relies upon the information that is provided by the
applications. entire region pixels. Motion, color, and texture are examples
of such information. These methods are not robust with
KEY WORDS complex deformation [4]. Feature-based methods track the
Desired Object Tracking; Distance Measurement; Image specific features of each object. Many feature-based
Processing; Single Camera . matching techniques have been developed although these
techniques are not specialized for video object tracking.
1. Introduction Advantages of these methods are their simplicity and
For decades, researchers have tried to develop different stability for tracking algorithms. However, clustering of
techniques of relating computer vision capabilities to these features to the same group of an object is costly,
applications and products, such as automotive safety, specifically in dealing with a large number of features.
manufacturing, video surveillance, and visual servoing (one Contour-based methods track the contour of the object
of the important related robotics applications). Visual rather than tracking the whole pixels that make up the object.
servoing is a technique which controls the motion of the In contour-based methods, the contour for the next frame is
robot by using feedback information that is sent from a determined using the motion information about the object.
vision sensor. In visual servoing, it is difficult to track the Thus, the shape and the position of that contour are
moving object if the object distance is not accessible [1]. enhanced to fit into the object. Furthermore, the motion
There are two different types of visual servo control: information is updated by the change in the contour location
position-based visual servo control (PBVS) and image- [3]. There are some advantages for using the contour-based
based visual servo control (IBVS). The reference inputs for representation. Merit of such methods is that they can cut
PBVS are the 3D relative position and orientation between the computational complexity. Another advantage of such
the object and the robot end-effector in Cartesian space. In techniques is their ability to track rigid and non-rigid
the image-based visual servo control, the reference input is objects. However, the contour-based methods fail to track
the 2D object position which can be obtained from the image the objects that are partly occluded [4].
plane. The IBVS approach fails without having an accurate To measure the distance of a moving object several
estimation of object distance and motion, especially when it methods presented in the literature. Zhang et al. [5]
is carried out in dynamic environments [2]. Because of error presented the 3D positions of a target in the camera
propagation, when a camera is employed in PBVS servo coordinate frame by measuring the distance between feature
method, the small measurement error would highly affect point and principal point based on the calculated area in the
the servoing accuracy [2]. image. The Zhang et al. [5] process is divided into three
To estimate the distance from the object, the tracking of stages. The first stage is the camera calibration in order to
an object must be addressed first. Object tracking can be calibrate the intrinsic parameters. The second stage is to set
classified into four main categories: model-based, up a model for distance measurement along the optical axis
direction according to the mapping relationship between the

DOI: 10.2316/P.2013.802-048 237


targets in the camera coordinates frame, and its projection in problem of mapping the object’s location is described using
the pixel coordinate frame. The last stage is the absolute measured distance and frame transformation.
distance measurement. Yang and Cao [6] proposed a 6-D For visual servoing purposes, there are five “standard”
object localization method based on a monocular vision frame names associated with a robot and its workspace: the
system which is obtained through decomposing the base frame, the station frame, the wrist frame, the tool
homography matrix and finally refining the result using the frame, and the goal frame. The base frame is shown as {B},
Levenberg–Marquardt algorithm. This approach showed an and it is the fixed part of the robot which is sometimes called
absolute accuracy of 0.3 mm and the repeatability accuracy the Link 0. The station frame {S} is called the universe
of 0.1 mm for their robot’s arm pose estimation. Coman and
Balan [7] mentioned that their application of object distance
measurement can be a starting point of complex applications
as long as the object geometry remains a square. Coman and
Balan [7] also indicated that the surface area and a line in
the surface area for different objects are correlated to each
other. Yamaguti et al. [8] found the distance to the texture
surface of the object from the ratio of two images that are
taken by a monocular camera at different locations, and then
they used complex log mapping of these two images. In their
method, the processing time is long and that the object is
restricted to a plane which is vertical on the optical axis.
Zhang et al. [9] proposed a method of object distance
measurement based on a particle filter. This method is Figure 1. Camera coordinates frame
.
reported to be highly reliable and have strong real-time
frames since all actions of the robot are made corresponding
performance. However, the accuracy of the technique
to this frame. The wrist frame {W} is the last link of the
proposed by Zhang et al. [9] is not mentioned. Dixon et al.
manipulator, and it is normally defined relative to the base
[10] presented a new continuous observer for determining
frame. The tool frame {T} is assigned at the end of any tool
the range information of an object moving with affine
that a robot is holding. Finally, the goal frame {G} is the
motion dynamics and known motion parameters using one
location to which the tools need to move [12]. Figure 2
camera. The impact of this experiment was that a continuous
shows entire frame assignments to find the distance of the
observer can be employed to make a monocular vision
moving object with respect to a robot hand. In Figure 2, the
system in order to determine the range parameter for a
object distance AG can be measured through the proposed
moving object which moved with an affine or Riccati
motion dynamics even in presence of sensor noise. algorithm in the present paper. The camera’s location w.r.t.
In the present research, the distance to the object is base frame is shown with vector BA (known by
calculated using a feature extraction method. The proposed measurement), and BT is obtained through forward
algorithm is robust and reliable with respect to the kinematics and using DH parameter of the robot. Using this
orientation and position of the object and could be used for information, it will be easy to find vector TG , which is the
any moving objects of different size, and in any direction on distance of the moving object with respect to the tool frame
the ground. of the robot, and can be calculated by equation (1).
The remainder of this paper is organized as follows:
Section 2 presents the problem formulation, Section 3
describes the Image-processing algorithm, experimental
setup is explained in Section 4, the experimental results and
detailed discussion are also presented in Section 5, and
Section 6 concludes the article.

2. Problem Definition
The main image formation technique is mostly based on
the pinhole lens model. In this model, the mapping
relationship between the 3-D world coordinates and the 2-D
image coordinates plays an important role. Let’s consider M
in Figure 1 to be a point in the world coordinate relative to
the camera frame. In this case, m would be the projection of
M onto the image plane. Under the pinhole assumption,
these two points and the origin of the camera frame (the
center of the projection) that is in the back of the image
plane at a distance µ will be collinear [11]. This model of
Figure 2. Standard frame assignment
image formation is applied in the present research. Now, the

238
BA + AG = BG (1)
BT + TG = BG

TG = BG - BT

There are three ways of using image based distance


computation techniques: 1) Stereo vision based technique;
2) Mono vision based technique, and 3) Time-of-Flight
camera technique. The stereo vision based method use two
cameras to find the depth and the disparity map using a
complex method. This technique is highly accurate, but it is
time consuming because of many images of the same object
needed to be processed at the same time. In addition,
implementing such a technique is expensive as it requires
two cameras. Moreover, the stereo vision accuracy fails with
the increase of the distance to the object compared to the Figure 3. Object distance calculation
baseline distance between the two different views. On the
other hand, mono vision based approach are comparatively 480 - y2
less expensive as it requires only one camera[13].The Time- α = arctan( )
x2 - 320
of-Flight depth estimation technique is used to find the
depth information by measuring the total time required in θ = π +α
the light to transmit and reflect from the object. It is hard to
2
separate the incoming signal since the signal depends on b= (320 - x2 )2 + (480 - y2 )2 (2)
many parameters such as intensity of the reflected light, c= a +b - 2×a×b× cos(θ )
2 2

intensity of the background light, and the dynamic range of


the sensor which makes detecting the incoming light a hard d = c 2 +h2
task [3]. Besides, the accurate range of distance
measurements for the time-of-flight camera is usually 3. The Image-Processing Algorithm
between 1– 4 m [14]. In this section, some parts of the image-processing
Therefore, researchers are looking for inexpensive, algorithm are explained. The color space conversion is used
uncomplicated, and accurate techniques. Applying such to change the color information to different color spaces.
superior techniques requires researchers to tackle with Figure 4(a) demonstrates the R. G. B. - three primary color
several other challenges such as object detection, obstacle of red, green and blue- image. Auto threshold technique is
avoidance, and location finding. There are two approaches applied in the system in order to identify different objects in
to estimate the location of any object: contact and non- the camera’s field of view. The Otsu method [17] is one of
contact methods. Nowadays, the non-contact distance the widely referenced threshold techniques. As a result, this
measurement system becomes useful in a wide variety of method would be satisfactory especially when dealing with
applications, though, most of the time it is impossible to a large number of pixels within each class with close pixel’s
have physical contact with the object to make the value [17]. The image of a sample threshold by the auto-
measurement [15]. High accuracy and time saving are threshold technique is given in Figure 4(b).
advantages of using a non-contact measurement technique.
Clarke and Williams [16] discuss the benefits of using a
non-contact measurement system. These benefits include
lower inspection costs, better quality control, faster
production, smaller tolerances, and fewer defects. The
object distance is defined as the distance of the desired
object from the center of the lens along the optical axis. In
addition, the image distance is defined as the distance from
the focused image to the center of the lens.
The proposed object distance measurement is based on
finding the closest point from the object to the bottom-center
of the camera’s field of view. Equation (2) is used to Figure 4(a) R. G. B. image. Figure 4(b). Image after the
calculate the distance from the object to the camera where, threshold
a, is known value and resulted by measurement, d is the
object distance and h is the height of the camera from the 3.1 2-D FIR Filter Filtering is another important
ground. Figure 3 shows, the coordinate system and the technique that has to be accurately chosen to remove the
camera’s field of view on the ground. noise from the imag e without reducing its sharpness.

239
3.2 Image Complement
Image complement is used to compute the complement of a
binary or intensity image. The image complements switches
the values of the zero and one valued pixels.
3.3 Averaging Subsystem
The averaging subsystem method is used to stabilize the
system by applying four consecutive measurement values
for the system. This technique would mediate the fluctuation
arising from the noise into the system [18]. The completed
algorithm to the system is shown in Figure 5.

Figure 6. Distance moved on the ground by the object

5. Experimental Result and Discussion


In this experiment, the distance of the desired object is
extracted and used for the second subsystem to find the
position and orientation of the end-effector with respect to
the object. The tracked object is shown with green bounding
box in Figure 4(a). Tables 1 and 2 compare the results from
the experiment. These tables respectively show the object
distance average errors for two different samples of one
rectangular block of size 25.43 mm×79.22 mm (W×L) and
one irregular toy car of size 70.21 mm ×145.54 mm (W×L)
which are measured at any location in the camera’s field of
Figure 5. The Algorithm for object distance measurement view. In addition, Figures 7 and 8 show the tabulated results
in Tables 1 and 2 in the graphical form. Some related works
4. Experimental Setup for object distance measurement are shown in Table 3. It
In this research, Logitech Quick Cam® Communicate should be mentioned that this experiment is implemented
STX™ is used to get the R. G. B. image with resolution of with the low resolution camera to check the proposed
640 × 480 pixels. The captured image is then converted to algorithm. The accuracy of the measurement could improve
intensity by color space conversion since most of the by using a high-resolution camera.
applications require an intensity of the image. To reduce the Image noise is the main unavoidable reason for
noise from the image of the desired object, a 2-D FIR Filter producing errors during the image acquisition stage. Such
is applied. MATLAB Functions are used to carry out the error can occur in finding the exact point of contact with the
required code in the subsystem for the desired object object on the ground. Another potential cause of error would
tracking algorithm. In the next step which is implemented in be the variation in image illumination across the camera’s
the subsystem, desired object distance is measured using the field of view. Using the method presented by [19], it is
resulting image data. From implementing the object distance possible to measure an object distance when the optical axis
measurements that are shown as d1 and d2 for moving object of the camera is parallel to the ground. However, in case of
at time t0 and t in Figure 6, the horizontal distance traveled dealing with finding object distance anywhere in the field of
by the object on the ground could be calculated using the view of camera, Joglekar et al [20] method is found to be the
law of cosines suggested in Equation (3). The initial values possible solution.
are d1=1160 mm and θ0 = 55° .
Joglekar et al [20] define the in-path object distance and the
oblique object distance as the distance to the object that is
d2 - d - d + 2 d1d cos (θ )= 0
2
1
2 2
on the optical axis and as the distance from the object that is
2 d1cos (θ ) ± 4 d12cos 2 (θ ) - 4 (1) (d12 - d22 ) (3) not on the optical axis, respectively.
d=
2

240
Table 1 distance would surprisingly rise, and the error would
Average distance error measurements for the rectangular significantly increase. Therefore, when the camera has an
block angle with optical axis, [19-20]’s methods are no longer
Trial Real Proposed Joglekar et al Proposed Joglekar valid as the object distance measurement would be a non-
distance measured [20] distance et al[20] linear function of distance. Moreover, due to the fact that the
(mm) distance measured error distance
(mm) distance (mm) error
oblique object distance is calculated from the result of the
(mm) (mm) in-path object distance divided by the cosine angle between
the optical axis and the line joining the camera point to the
object’s point of contact. Hence, the error is relatively
1 1181 1176 1186 5 5
similar for the in-path object distance as obtained. The
2 1213 1231 1131 18 82 proposed vision-based object distance measurement
3 1215 1190 1150 25 65 technique is principally different from above-mentioned
4 1272 1302 1622 30 350 optical techniques.
5 1320 1340 1134 20 186 Table 3
6 1323 1320 1399 3 76 Comparison of different methods for object distance
7 1367 1414 2275 47 908 measurement
Method Characteristics Nature of the
8 1432 1438 1424 6 8
(in terms of method
9 1436 1468 1209 32 227 distance)
10 1481 1529 1433 48 48
11 1513 1521 1306 8 207 Gat et al[19] Along the optical Linear
(Optical axis is axis
12 1548 1580 1183 32 365 parallel to the
13 1585 1617 1227 32 358 ground)
14 1621 1633 1156 12 465 Joglekar et al[20] In-path and oblique Non-Linear
(Optical axis is
15 1630 1615 1200 15 430
parallel to the
Average absolute error 23.43 269.64 ground)

Table 2 Proposed Method Any-where on the Non-Linear


Average distance error measurements for the toy car (Optical axis is field of view of
not parallel to the camera
Trial Real Proposed Joglekar et al Proposed Joglekar ground)
distance measured [20] distance et al[20]
(mm) distance measured error distance
(mm) distance (mm) error
(mm) (mm)

1 1179 1173 1184 6 5


2 1206 1183 1160 23 46
3 1250 1262 1155 12 95
4 1253 1259 1204 6 49
5 1263 1238 1196 25 67
6 1295 1328 1953 33 658
7 1363 1352 1341 11 22
8 1373 1404 1196 31 177
9 1420 1458 2057 38 637
10 1480 1489 1344 9 136
11 1495 1542 1370 47 125
12 1503 1529 1202 26 301
13 1527 1570 1310 43 217
14 1580 1583 1236 3 344
15 1583 1613 1164 30 419
Average absolute error 16.50 381.50

We have investigated whether this method can be used


to estimate the object distance anywhere on the camera’s Figure 7. Object distance measurement for the rectangular
field of view with the provided setup. The results from some block
experiments using the Joglekar et al [20] method shows that
as the object gets closer to the vanishing point, the object

241
[5] Z. Zhang, Y. Han, Y. Zhou, & M. Dai, A novel absolute
localization estimation of a target with monocular vision,
Optik - Int. J. Light Electron Opt, 2012, 1218-1223.
[6] Y. Yang, & Q. Z. Cao, Monocular vision based 6D
object localization for service robots intelligent grasping.
Computers Mathematics with Applications, Volume 64,
Issue 5, 2012, 1235-1241.
[7] M. Coman, & R. Balan, Video Camera Measuring
Application Using matlab. Solid State Phenomena Vols.166-
167, 2010, 139-144.
[8] N. Yamaguchi, S. Oe & K. Terada, A Method of
Distance Measurement by Using Monocular
Camera. Proceedings of the 36th SICE Annual Conference
International Session, Tokushima, 1997, 1255-1260.
[9] L. Zhang, Y. Bo, J. Zhang, & W. Zou, Study on Distance
Measure Based on Monocular Vision. Energy Procedia 13,
2011, 9533-9542.
[10] W. E. Dixon, Y. Fang, D. M. Dawson, & T. J. Flynn,
Range identification for perspective vision systems. IEEE
Trans. Automat. Contr., 48(12), 2003, 2232–2238.
Figure 8. Object distance measurement for the toy car [11] M. W. Spong, S. Hutchinson, & M. Vidyasagar, Robot
Modeling and Control, (John Wiley and Sons, Inc., 2006).
6. Conclusion [12] J. J. Craig, Introduction to Robotics Mechanics &
Control, 3rd edition, NJ: Prentice-Hall, 2004.
In this paper, an improved method was proposed to [13] A. Rahman, A. Salam, M. Islam, and P. Sarker, An
calculate the object distance using a single camera even if Image Based Approach to Compute Object Distance.
the surface of an object is not parallel to the camera and is International Journal of Computational Intelligence
not restricted to be vertically intersecting the optical axis. Systems, Vol. 1, No. 4, 2008, 304- 312.
The proposed method is able to identify the desired object [14] S. Y. Kim, E. K. Lee, & Y. S. Ho, Generation of ROI
and extract the object feature for a moving and a static enhanced depth maps using stereoscopic cameras and a
object. The experimental results shows that the object depth camera. IEEE Transactions on Broadcasting 54 (4),
distance average error for the rectangular block, and the 2008, 732–740.
irregular toy car are 23.43 mm and 16.50 mm, respectively. [15] M. C. Lu, and C. C. Hsu, & Y. Y. Lu, Image-Based
Moreover, the discrete sample time to run the proposed System for Measuring Objects on an Oblique Plane and Its
algorithm is estimated to be 0.033. This inexpensive Applications in 2-D Localization IEEE Sensors Journal,
distance measurement method could be applied to many vol. 12, NO. 6, 2012, 2249-2261.
applications such as pick and place task in robotics. [16] T. A. Clarke, & M. R Williams, Buyers guide to six
non-contact distances measuring techniques. Quality Today,
Buyers Guide, 1998, 145-149.
References [17] M. Sezgin & B. Sankur, Survey over Image
thresholding techniques and Quantitative performance
[1] A. Goto, & H. Fujimoto, Proposal of 6 DOF Visual
evaluation. Journal of Electronic Imaging, vol.13, 2004, 146
Servoing for Moving Object Based on Real-Time Distance
–165.
identification. SICE. Annual Conference, Japan, 2008,
[18] M. Coman, S.D. Stan, M. Manic, & R. Balan,
3208-3213.
Application of Distance Measuring with Matlab/Simulink.
[2] H. Firouzi, & H. Najjaran, Real-time monocular vision-
IEEE-HSI 2010, the 3rd International Conference on
based object tracking with object distance and motion
Human System interaction, Rzeszow, Poland, 2010, 113 –
estimation. Advanced Intelligent Mechatronics (AIM),
118.
IEEE/ASME International Conference on, 2010, 987-992.
[19] I. Gat, M. Benady, & A. Shashua, A Monocular Vision
[3] K. M. Shaaban, & N. M. Omar, 3D information
Advance Warning System for the Automotive Aftermarket,
extraction using Region-based Deformable Net for
SAE Technical Paper, 2005, 8 pages.
monocular robot navigation. J. Visual Communication and
[20] A. Joglekar, D. Joshi, R. Khemani, S. Nair, & S. Sahare,
Image Representation, vol. 23, 2012, 397-408.
Depth Estimation Using Monocular Camera. International
[4] A. Cavallaro, O. Steiger, & T. Ebrahimi, Tracking video
Journal of Computer Science and Information
objects in cluttered background. Circuits and Systems for
Technologies, Vol. 2 (4), 2011, 1758-1763.
Video Technology, IEEE Transactions on, 15(4), 2005,
575– 584.

242

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy