SlideShare a Scribd company logo
1 of 12
Download to read offline
The International Journal Of Engineering And Science (IJES)
|| Volume || 6 || Issue || 1 || Pages || PP 39-50|| 2017 ||
ISSN (e): 2319 – 1813 ISSN (p): 2319 – 1805
www.theijes.com The IJES Page 39
Distance Estimation to Image Objects Using Adapted Scale
M. Zuckerman(1)
Intel Corp., Israel
E. Kolberg(2)*
Bar-Ilan University, Israel
--------------------------------------------------------ABSTRACT--------------------------------------------------
Distance measurement is part of various robotic applications. There exist many methods for this purpose. In this
paper, we introduce a new method to measure the distance from a digital camera to an arbitrary object by using
its pose (X,Y pixel coordination and the angel of the camera). The method uses a pre-data that stores all the
information about the relation between the pose and the distance of an object to the camera. This process
designed for a robot that is a part of a robotic team participating in RoboCup KSL competition.
---------------------------------------------------------------------------------------------------------------------------------------
Date of Submission: 12 January 2017 Date of Accepted: 05 February 2017
--------------------------------------------------------------------------------------------------------------------------------------
I. INTRODUCTION
Distance measurement from a camera to an arbitrary object is widely needed. We use the fact that an object
looks larger as it gets closer to the camera. That means that the same object when close to the camera will have
more pixels representing it than if it was located further. It allowed us to develop a robust mapping method for
measuring a distance to an object.
Among the common methods used to yield distance measurement from image processing we find Pinhole cam-
era model [1, 2], Stereo vision [3, 4] and object volume [5, 6]. In [2] distance measurements are based on foot-
print size. In [1] the distance to an object is derived using the laws of perspective and depends on the road geo-
metry and the point of contact between the vehicle and the road. This method is used in order to estimate a dis-
tance to a car or a truck that are an order of magnitude bigger than the objects we deal with. Measuring a
distance of 90 meters, the error is 10%. The object size and the dependency of the road geometry using a pin-
hole camera is therefore less adequate in our case. In [2] the method is again deals with vehicles and focus on
the detection of preceding vehicles. It takes an area in an image bounded by lane marks, (taking advantage that
lane marks are at 45 when they appear in the image), and execute a logical-AND operation with the binary road
image with no lane marks. It also takes advantage of the non symmetrical shape of a vehicle in order to verify
the vehicle footprint. These two last methods while adequate for vehicle identification are less useful for the
case described in this paper. In [3] the distance measurement is based on stereoscopic pictures. It depends on
horizontally aligned cameras, taking pictures at the same time, parallel axis of the two cameras. As the distance
is longer, the error grows in proportion to the squared distance. In the case we describe here, the robot moves so
a static infrastructure is not relevant here. In addition, we need to reduce the error even in long distances. In [4]
there is a comparison between camera and human depth accuracy. They concluded that the focal length affected
the depth resolution remarkably. Wide-angle lens deteriorated the focal resolution as well. The calibration errors
added to the overall error. In [5] the authors describe a method for measure distance to thin and high pole like
objects. Each pole needs three alignment measurements for each placement. While this is fine for a pole posi-
tioned in a single static position, it is less adequate for our case. In [6] the method for distance calculation has
two steps. First, calculating an interpolation function based on the height and the horizontal angle of the camera.
Second, using this function to calculate the distance of the object from the camera. This method relies upon the
camera height and horizontal angle. The paper shows results of distances up to 1m. It is based on interpolation,
which in our case might increase the error. Using laser like the one presented in [7] integrated with a camera can
increase accuracy on a static system as described there. Besides the fact that it is forbidden for use in the compe-
tition, it will require substantial design and additional hardware and software for using it on a walking robot. In
[8] plate size of car number is used to estimate distance to a car. While this method might be adequate for
distance from a car, it proved to be less useful in our case. The method described in [9], deals with a flat board
of size 750mm x 750 mm, with target points on it. This target is too big for our case. The focal length and cam-
era's lens diameter along with object base size were used to derive the distance to an object. The limitations of
this method include relevancy for exact camera model in combination with particular lens, and target should be
in optical axes.
In this paper we will present the volume solution for deriving a distance to an object. The Mapping method is
based on the idea of the volume solution.
Distance Estimation to Image Objects Using Adapted Scale
www.theijes.com The IJES Page 40
II. VOLUME SOLUTION
When dealing with known objects, it will be useful to measure the object size with different distances, as it ap-
pears on the image. As close the object to the camera as bigger it appears. The object, which appears on an
image, is called reflected object. This information needs to be recorded and saved as a function [5] [6] . We took
measurements of distance versus radius of a ball with a radius of 5 cm. We shot images out of Logitech C905
camera with 1280x720 pixels. Figure 1 presents a graph of the measurements we took. The graph looks similar
to the one presented by Sant’Ann et. al [7] . In our example, the software program identified the ball. Since the
ball was a known object, the program could use pre-stored data about ball diameter, ball color, and ball center.
While these parameters are known it is possible to use a scale tool that measures the different radius sizes as
appear on the image.
Figure 1: Distance Vs Radios
From figure 1 we see that the reflected object distance is an exponential function of the number of its radius
pixels. This means that when the ball is far from the camera from a certain distance, it will have relatively less
changes in number of pixels. On the other hand, the sensitivity will increase as the object is getting close to the
camera, since the reflected object radius will have substantially less pixels in comparison to a closer distance
when the ball is close to the camera.
From figure 1, we can see that there is a correlation between the number of pixels of the object radius in the
image and the distance of the object from the camera in the real world.
In this particular graph, the correlation is presented by the function 𝑦 = 54181𝑥−1.164
, when y stands for the
distance and x stands for the number of pixels. Next step is to determine the accuracy of the correlation. It will
be presented by the error between the real distance and the computed one.
III. VOLUME SOLUTION ACCURACY
The function accuracy depends on the following factors.
3.1 Camera's angle aimed to an object
Objects in image might look different from various angles and different lighting conditions. One common me-
thod of identifying objects is first saving an image as a binary picture and then count the white pixels of an ob-
ject like the radius of a ball or the width of a goal in a soccer game. The accuracy of the function will depend on
the way the object is presented. Figure 2 presents the error ratings obtained when we tested the distance from
the camera to a 10cm diameter orange ball on a green field.
Table 1 presents the average distance error of short and long distance areas in the graph.
Figure 2: Error as function of distance orange
y = 54181x-1.16
R² = 0.987
0
500
1000
0 200 400 600 800 1000
Distancecm
Radios pix
Distance vs Radios pixcels from 0
– 800 cm 1280X720
23%
0%
7%7%
11%
7%
2%1%2%6%
9%
5%4%4%5%4%6%4%4%4%7%4%5%6%6%5%5%4%4%
0%
5%
10%
15%
20%
25%
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
ERROR%
DISTANCE CM
Error as function of distance
Distance Estimation to Image Objects Using Adapted Scale
www.theijes.com The IJES Page 41
Table 1: Average error values of distance from a camera to a 10 cm dia. ball, calculated from B/W image
The values presented in table 1 are reasonable for our purpose of a soccer game since they are close enough to
the real world. When we tried the same technique on the identification of the goal, it was not as robust. One rea-
son to this phenomenon is that the ball looks round from almost any angle and light conditions. However, the
goal might look different from different angles. The gap between the goal's poles will look different when the
camera looks at the goal from different angles. The shape of the goal in these cases might look as a part of a
parallelogram, or a triangle or a trapezoid, etc.
It leads to a conclusion that volume solution by counting white pixels is valid only for a perfect rounded shape
or a simple shape like an equilateral triangle. In case of different objects, the error might increase substantially.
3.2 Light conditions
Different light conditions might change objects' edges as appears in the reflected image. With brighter illumina-
tion, white objects like white lines or white poles may look larger in the reflected image than they are in reality.
Shadows or hiding a part of an object might also considered as different light conditions.
3.2 Filter type
The type of filter will have also an impact on the accuracy of the distance. In some cases, HSV will be used in
others, RGB, etc. The filter types of edge detection will also have an impact on the accuracy.
3.3. Approximation function. Tinnachote and Pimprasen [5], suggest using a polynomial approximation func-
tion in order to calculate the distance, in a case of exponential function. We found that while it improves the
results, it still was not proper to our purposes. We came out with the idea of further dividing the graph into
smaller sections, which makes it more delicate for better approximation. In this specific example, we divided the
graph into three sections. In each section, we used a different type of approximation function:
1. For ball distance of 0 to 55 cm – linear function as presented in figure 3.
2. For ball distance of 60 to 150 cm – 2nd
order polynomial function as presented in figure 4
3. For ball distance of 160 cm and above – exponential function as presented in figure 5
The resulted distance error is presented in figure 6. The error decreased. The average distance error of the di-
vided function was 3% compared to 6% average distance error presented in figure 1.
Figure 3: linear function of section 1
Figure 4: 2nd order polynomial function of section 2
Distance Error values
Short distance 0-55 cm 7%
Long distance 60-150 cm 5%
Distance Estimation to Image Objects Using Adapted Scale
www.theijes.com The IJES Page 42
Figure 5: exponential function of section 3
Figure6: Error as function of distance: average error of 3%
3.4 Color/filter calibration
Before analyzing an image, it is translated from a colored image into a B/W image. One of the tools used for this
purpose is HSV/RGB threshold. With a proper threshold, it is possible to identify object types. Notwithstanding,
it is somewhat problematic. For instance, if we allow for a low threshold, the object will be seen larger com-
pared to the real object. Increasing or decreasing the value of the HSV threshold, will change the object's area.
IV. NEW METHOD'S IDEA
Since distances to objects are important values as inputs to a localization system in general and for RoboCup
soccer game in particular, it was required to develop a reliable distance measuring method that is independent as
much as possible of the factors described above.
After consideration of various options like using more expensive cameras, developing more complex algorithm,
etc., we decided upon an algorithm that take as an input the location (x,y) of the object in 2-D Cartesian coordi-
nate system. The (x,y) coordinates is the only needed input to the algorithm. In addition, the algorithm requires
building in advance, a lookup table that transfers these coordinates into distances. Using such a lookup table
makes it unnecessary to use an approximation function or count white pixels. Actually, the algorithm is inde-
pendent of the binary picture. The only input needed is the (X, Y) coordinates of the object.
In order to implement the lookup it is necessary to find a correlation between any point coordinates (X, Y) and
the distance to the point. For this purpose, we chose to use a scale.
After creating the scale, it is easy to build the lookup table. Then it is straightforward to implement the algo-
rithm that deduce the distance to a point with its Cartesian coordinates. Next we will describe the two scales we
built during the development process.
V. SCALE VERSION 1.0 (Y DEPENDENT )
The scale is made of black and white stripes. We developed a specific software in order to identify the black and
white scale. We added numbers on the scale, which correlates to the distance between the camera and the object.

8765431 2 1211109
10 [cm]
0 - 120 [cm]
Figure 7: Scale 1.0 with is 10[cm] stripes
Distance Estimation to Image Objects Using Adapted Scale
www.theijes.com The IJES Page 43
VI. THE LOOKUP TABLE
The lookup table saves the output information coming from the software in the preparation test mode. The Algo-
rithm of creating to the lookup table appears in table 2.
First, variables and constants are initialized (Lines 1-10). The camera is placed in the middle of first stripe.
Then, the algorithm count the current stripe pixels' number (Lines 12-16). Each stripes pixels count is saved
(Line 18). In addition the algorithm takes care of saving the accumulated pixel counts (Line 19). J presents the
stripe number. Since the scale reflected image looks like a trapezoid, the middle stripe's x value changes as y
value advances to next stripe. Figure 8 presents the geometric scheme of this state.
Here α is the left side slope and
2

   .
 y
y
x
1st
stripe
2nd
stripe

( )y tg  
First stripe’s
edge center
Second stripe’s
edge center
Third stripe’s
edge center

Figure 8: x values change
Table 2: Creation of lookup table algorithm
1 : _ ( , ) :
2 :
3 :
4 :
5 :
6 : ' 0
7 : '
8 : ( , )
A lg o r ith m L o o k u p T a b le N T
p la c e th e c a m e r a in fr o n t o f m id d le s c a l e 's fir s t s tr ip e
y = 0
c o u n t = 0
j = 0
x o f s tr ip e s lo w e r le ft c o r n e r
x x v a lu e o f fir s t s tr ip e s c e n te r
r e a d c o lo r x y


1 ,
2 ,
3 , 2 , 3 , 1
9 : _ ( , )
1 0 : s e c 0
1 1 :
1 2 : s e c
1 3 :
1 4 : ( , )
1 5 : ( ) _
1 6 :
1 7 :
1 8 :
1 9 :
2 0 :
2 1 : s e c s e c 1 0
2 2 : 0
2 3 :
2 4 :
j
j
j j j
c o lo r te m p c o lo r x y
w h ile j N d o
T
y
r e a d c o lo r x y
if c o lo r y c o lo r te m p
c o u n t
e ls e
T c o u n t
T T T
j
c o u n t
e n d if
x x y t





 

 

 
 
 

    ( )
2 5 :
2 6 :
g
e n d w h ile
r e tu r n T

Distance Estimation to Image Objects Using Adapted Scale
www.theijes.com The IJES Page 44
Figure 9: the measurements'' environment
The result is an array similar to the one presented in table 3. We see that as further the stripe from the camera,
the less pixels it has.
Table 3: Lookup table of pixel numbers as a function of the distance
The red line presents the measurement points along the y-axis. The green areas present the field and the yellow
and gray areas presents the area outside the count range. The table (like table 3), can be used to correlate number
of pixels to a point (x,y) further from the camera in the field and then derive the distance to this point. In order
to calculate a distance from the camera to a certain point we will usually have to perform interpolation. Let us
take an example. Suppose we need to know the distance to point (320, 75). We will look at the y-axes value,
which is 75 in this case. From table 3 we see that the appropriate region end-points in terms of accumulated pix-
el values are 72 and 81. The related distance value lies between 40 and 50 cm. The distance value is calculated
by interpolation:
40 +
75−72
81−72
∗ 10 = 43.3333 cm. In general the distance function will be:
   
 
   
1 0
1
p ix
y y i
d ista n ce cm y i
y i y i

  
 
Where y(i) is the lower end point and y(i+1) is the higher end point in the region. ypix is the pixel's y value of the
desired point.
VII. MAPPING SOLUTION ACCURACY
The method we described use the scale solely. When the lookup table is complete, there is no need to process
the binary image. The only input data needed is the (x,y) object location.
Figure 10 presents the error as a function of the distance.
Table 4:Lookup table of pixel numbers as a function of the distance and stripe width type.
0 10 20 30 40 50 60 70 CM
0 20 15 14 13 10 9 8 #PIX
0 20 35 49 62 72 81 89 ACC
Distance Estimation to Image Objects Using Adapted Scale
www.theijes.com The IJES Page 45
Figure 10: error as a function of distance
There are areas in figure 10 that show higher error compared to other areas. In order to have a distinction among
the different areas we divided the area into three distance ranges: short range, middle range and long range. Ta-
ble 4 presents the average error ratings for each range. The error in the long distance range is higher by more
than three times compared to the short distance range and more than double compared to the middle distance
range. Clearly, there is a need to adapt the method such that the error will be satisfactory for all ranges.
Table 5: The average error as a function of the distance ranges
Range Distance Error
Short 80-190[cm] 2.68%
Middle 200-300[cm] 4.95%
Long 310-410[cm] 11.6%
Looking closely at figure 9 and table 3 reveals that in the long distance there is a gap, which is realized by a
jump in the pixels count. It means that the algorithm miscount the long or far distance. For example, if the real
distance was 30 [cm] the algorithm calculates it as a distance of 10 [cm] due to the jump in pixels count. We
will call this error as Jump error meaning miscount pixels error.
In order to take care about this problem we will design a new scale that solves the issue of Jump error. The new
scale will take into account the different pixels count of stripes relative to their distance from the camera. After
testing several options, we concluded that the following measures of the different ranges on the scale would be
adequate: stripes' width of be 5 cm, 10 cm, and 20 cm for short, middle, and long distances accordingly.
VIII. SCALE VERSION 2.0
Based on the above discussion the 2nd
version of the scale looks like the one presented in figure 11.
Figure 11: Scale 2.0 with different stripe's size
IX. THE LOOKUP TABLE ALGORITHM FOR SCALE 2.0:
The new lookup table will contain the information of each stripe width. The digit 0 will designate the stripes
with width of 5 cm. The digit 1 will designate the stripes with width of 10 cm, and the digit 2 will designate the
stripes with width of 20 cm. Thus, the lookup table might look as the one presented in table 5.
Reading the new ribbon requires the use of a new algorithm. This new algorithm will be similar to the one pre-
sented in table 2 with additional part for the information about different stipe sizes (5, 10, or 20 cm). Actually,
since the ribbon structure is known, it is easy to manually add the last row of the lookup table.
0
5
10
15
20
25
80
100
120
140
160
180
200
220
240
260
280
300
320
340
360
380
400
ERROR%
DISTANCE [CM]
Error as function of distance
Distance Estimation to Image Objects Using Adapted Scale
www.theijes.com The IJES Page 46
Table 6 presents the algorithm for scale 2.0. The additional inputs compared to the algorithm of table 2 are n1
and n2, which presents the first stripe number with width of 10 cm and 20 cm respectively.
Table 6: Creation of lookup table 2.0 algorithm
1 2
1 : _ _ 2 .0 ( , , , ) :
2 :
3 :
4 :
5 :
6 : ' 0
7 : '
8 :
A lg o rith m L o o k u p T a b le N T n n
p la c e th e c a m e ra in fro n t o f m id d le sc a l e 's first strip e
y = 0
c o u n t = 0
j = 0
x o f strip e s lo w e r le ft c o rn e r
x x v a lu e o f first strip e s c e n te r
re a d


1,
2 ,
3 , 2 , 3 , 1
1
4 ,
2
( , )
9 : _ ( , )
1 0 : se c 0
1 1 :
1 2 : se c
1 3 :
1 4 : ( , )
1 5 : ( ) _
1 6 :
1 7 :
1 8 :
1 9 :
2 0 :
2 1 : 0
2 2 :
2 3 :
2 4 :
j
j
j j j
j
c o lo r x y
c o lo r te m p c o lo r x y
w h ile j N d o
T
y
re a d c o lo r x y
if c o lo r y c o lo r te m p
c o u n t
e lse
T c o u n t
T T T
if j n
T
e lse
if j n
T





 

 

 



4 ,
4 ,
1
2 5 :
2 6 : 2
2 7 :
2 8 :
2 9 :
3 0 : se c se c 1 0
3 1 : 0
3 2 :
3 3 : ( )
3 4 :
3 5 :
j
j
e lse
T
e n d if
e n d if
j
c o u n t
e n d if
x x y tg
e n d w h ile
re tu rn T



 
 

   
The part that takes care of writing the stripe width index (0,1,2) is presented in lines 20-28 of the algorithm.
When the lookup table is complete, a distance to a certain point (x,y) is calculated using the algorithm in table 7.
Distance Estimation to Image Objects Using Adapted Scale
www.theijes.com The IJES Page 47
Table 7: Distance calculation algorithm
1 : _ _ 2 .0 ( , , , ) :
2 : [1] [2 ] [3]
3 :
4 :
5 :
6 : _ 5
7 : ( (3, ))
8 : (4, ) 0
9 : [1]
1 0 : _ 5
1 1 : (4, ) 1
1 2 :
y
A lg o rith m D ista n ce C a lcu la tio n x y T D IS
co u n t co u n t = co u n t = 0
in d ex = 0
typ e = 0
j = 1
la st w id th
w h ile y T j
if T j
co u n t
la st w id th
else if T j
co




 


[2 ]
1 3 : _ 1 0
1 4 :
1 5 : [3]
1 6 : _ 2 0
1 7 :
1 8 :
1 9 :
2 0 :
2 1 : 5 [0 ] 1 0 [1]
(3, 1)
2 0 [3] _
(3, ) (3, 1)
2 2 :
y
y
u n t
la st w id th
else
co u n t
la st w id th
en d if
en d if
j
en d w h ile
D IS co u n t co u n t
y T j
co u n t la st w id th
T j T j
retu rn D IS
 

 

 
    
 
   
 
For example if we need the distance to a point with y=85, using the data in table 5, we will get:
8 5 8 1
5 5 1 0 2 1 0 5 0
8 9 8 1
cm

     

X. THE ACCURACY OF SCALE VERSION 2.0
Figure 12 presents the error of the distance value for distances up to 410 cm, using the scale version2. Table 8
presents the average error in short, middle and long distance ranges of the two scale versions.
Figure 12: Error as function as distance in Scale ver 2.0
0
2
4
6
8
80
100
120
140
160
180
200
220
240
260
280
300
320
340
360
380
400
ERROR%
DISTANCE [CM]
Error as function of distance
Distance Estimation to Image Objects Using Adapted Scale
www.theijes.com The IJES Page 48
Figure 13: x-axis width measurement using Scale version 1.0
Table 8: error as a function of distance for the two scale versions
Range Distance Error
ver 1.0
Error ver
2.0
Short 80-190[cm] 2.68% 2.11%
Middle 200-300[cm] 4.95% 1.69%
Long 310-410[cm] 11.6% 3.81%
It is clear from table 8, that using scale version 2, significantly improved the accuracy of the distance measure-
ment.For example at the maximum distance presented in table 8, the error will be about 410 cm*3.81%=15.6cm.
Since the robot feet size is more than 20 cm this is accurate enough for all practical purposes.
XI. ADDING THE X-AXIS INTO CALCULATIONS
Up until now, we used only the y-axis for calculation of the distance. Although the x-axis value has less effect
on the distance, it is still good practice to use its value for better distance estimation.
We can calculate the x-axis value using the scale version 1.0. The number of pixels inside each cell doesn’t
change much, meaning that the number of pixels in the middle cell are more or less equal to those on the edge
cell, as can be seen in Table 9.
This fact led us to an additional design. We sketched two vertical white lines, with a distance of 6m between
them as presented in figure 15. Adding the horizontal lines creates a trapezoid of the 2-D field.
Then, we took measurements at every 20[cm] of the y-axis, starting from the camera position (figure 13). In
each slice that created by the scale 1.0, we counted the number of pixels entering to 10cm segments, starting
from one edge of the trapezoid and finshe in the other edge (figure 14).
Table 9 shows the data we got using Logitech C905 camera. Each column in Table 9 presents a different slice of
y-axis with header yend/ybegin (Top and bottom of the cell [figuer 7] in terms of pixels) [the image produced by
this camera is an inverse image].
Each row presents different segment of 10[cm] (width x-axis). The numbers in Table 9 cell represents the
Distance Estimation to Image Objects Using Adapted Scale
www.theijes.com The IJES Page 49
Figure 14:number of pixels presents 10cm segments in y-axis in avg
X- In terms of cm | Y-In terms of pixels
*The data presented in table 9 might be different for a different
camera, but the calculation will be the same.
Table 9: presents the y-axis slices with the average pixels count for each 10cm segment in x-axis in each slice
number of pixel entering to 10[cm] of width. For example in 100[cm] from the right side of the picture. In high
of 240[pixel] (the second column) enter 63 pixels.
We can see from table 9 that each column standard deviation is in most cases less than 5% and in the worst case
is less than 6.5%. We can conclude that it is safe to use the average number of pixels for distance calculations.
Next, we will explain how to receive the distance from xi to xmiddle. For that, let us define xmiddle as the middle
point value of the horizontal line (figure 15) with yi as its y-axis value. xmiddle is known for every y. First , we
recorded the two left corners of the trapezoid ((x1,y1) and (x2,y2)) (This is true for the right side as well).
Suppose that we are interested in the distance to the point (xi,yi). We know that the distance of any point (x3 , yi )
on the white line to the parallel point (xmiddle ,yi) on the middle line equals to 3[M].
The algorithm will find the x3 using the method proposed in the papers [8] and [9].
It is easy to prove that the x-axis value (xwl) of a point on the left vertical white line, with yi as its y-axis value,
can be calculated to be:
1
1
( )
i
w l i
y y
x f y x
m

  
Where m is the left white line slope ((y1-y2)/(x1-x2)).
We define two more variables: pix1 and pix2 as follows:
1 3
2
m iddle
w l m iddle
pix x x
pix x x
 
 
The algorithm will compute the x-axis distance (DISx) with metric units according to the following equation:
1
2
3[ ]x
p ix
D IS m
p ix
 
This gives the X distance from the center to the desired point (xi,yi)
Distance Estimation to Image Objects Using Adapted Scale
www.theijes.com The IJES Page 50
Figure 15: Field configuration for calculating x-axis value of a certain point
XII. RETRIEVE DISTANCE
The last step required to compute the real distance is by use the right triangle hypotenuse formula:
2 2
( ) ( )x y
distance D IS D IS 
XIII. SUMMARY
This paper demonstrates an easy and efficient method to calculate a distance from a camera to an arbitrary ob-
ject in the playing field of a KSL competition in the frame of RoboCup soccer league. In fact, this method is
more accurate and faster than volume solution, in other words, it reducing the error mistake in each step and
have no obligation to count the white pixel in the binary threshold picture.
The base of this idea relies on initial setup, which includes adapting the pixel numbers into the distance. At first,
there was an exponential function, as we proceeded, we decided to divide the graph into small sections, achiev-
ing a better result. Apparently, the problem with long distance remained. Another obstacle was different objects
on the field, different shapes are acting differently, what made us create different function for each shape (Goal,
Ball, White strip, etc.)
The database was prepared by using a suitable scale and merged all of the different functions into one database.
Then, an algorithm with only (x,y) coordination was created. These solved both problems. Additionally, this
method can be adapted to different scenarios and different cameras.
REFERENCES
[1]. G. P. Stein, O. Mano and A. Shashua, "Vision-based ACC with a Single Camera: Bounds on Range and Range Rate Accuracy",
Proc. Intelligent Vehicles Symposium, pp. 120-125, 2003.
[2]. Y.C. Kuo,N.S. Pai and Y.N. Li, "Vision-based Vehicle Detection for a Driver Assistance System," Computers and Mathematics
with Applications (61) ,pp. 2096–2100, 2011.
[3]. J. Mrovlje and D. Vrančić, "Distance Measuring Based on Stereoscopic Pictures", 9th Int. PhD Workshop on Systems and Control:
Young Generation Viewpoint, Slovenia, 2008.
[4]. M. Kyto, M. Nuutinen, and P. Oittinen , "Method for Measuring Stereo Camera Depth Accuracy Based on Stereoscopic Vision",
Proc. SPIE 7864, Three dimensional imaging, Interaction and Measurement, 2011.
[5]. C. Tinnachote and K. Pimprasan, "Distance Measurment from Digital Photograpg Using 3rd Order Polynomial Equation", Proc.
ACRS ,2012..
[6]. M. Mirzabaki, "Depth Detection Through Interpolation Functions", The 12th int. conf. WSCG, pp. 105-108, 2004..
[7]. S.V.F Barreto R E.S. Anna, and M. Feitosa, "A Method for Image Processing and Distance Measuring Based on Laser Distance
Triangulation", IEEE 20th int. conf. on Electronics, Circuits and Systems, pp. 695-698, 2013.
[8]. Y. Lim and H. Lim, "A Method for Measurement of Distances using License Plate Detection", Advanced Science and Technology
Letters, pp. 13-16, 2014.
[9]. A. de La Bourdonnaye, R. Doskocil, V. Krivanek, and A. Stefek, "Practical Experience with Distance Measurement Bsed on Single
Visual Camera," Advances in Military Technology, (7) 2, pp. 49-56, 2012

More Related Content

What's hot

An Enhanced Computer Vision Based Hand Movement Capturing System with Stereo ...
An Enhanced Computer Vision Based Hand Movement Capturing System with Stereo ...An Enhanced Computer Vision Based Hand Movement Capturing System with Stereo ...
An Enhanced Computer Vision Based Hand Movement Capturing System with Stereo ...CSCJournals
 
S12_P1_Aiyer_Arun
S12_P1_Aiyer_ArunS12_P1_Aiyer_Arun
S12_P1_Aiyer_ArunArun Aiyer
 
Paper on image processing
Paper on image processingPaper on image processing
Paper on image processingSaloni Bhatia
 
EFFECTIVE INTEREST REGION ESTIMATION MODEL TO REPRESENT CORNERS FOR IMAGE
EFFECTIVE INTEREST REGION ESTIMATION MODEL TO REPRESENT CORNERS FOR IMAGE EFFECTIVE INTEREST REGION ESTIMATION MODEL TO REPRESENT CORNERS FOR IMAGE
EFFECTIVE INTEREST REGION ESTIMATION MODEL TO REPRESENT CORNERS FOR IMAGE sipij
 
Depth Estimation from Defocused Images: a Survey
Depth Estimation from Defocused Images: a SurveyDepth Estimation from Defocused Images: a Survey
Depth Estimation from Defocused Images: a SurveyIJAAS Team
 
Enhancing Security and Privacy Issue in Airport by Biometric based Iris Recog...
Enhancing Security and Privacy Issue in Airport by Biometric based Iris Recog...Enhancing Security and Privacy Issue in Airport by Biometric based Iris Recog...
Enhancing Security and Privacy Issue in Airport by Biometric based Iris Recog...idescitation
 
Ajay ppt region segmentation new copy
Ajay ppt region segmentation new   copyAjay ppt region segmentation new   copy
Ajay ppt region segmentation new copyAjay Kumar Singh
 
Blind detection of image manipulation @ PoliMi
Blind detection of image manipulation @ PoliMiBlind detection of image manipulation @ PoliMi
Blind detection of image manipulation @ PoliMiGiorgio Sironi
 
Image analysis basics and principles
Image analysis basics and principlesImage analysis basics and principles
Image analysis basics and principlesMohsin Siddique
 
Goal location prediction based on deep learning using RGB-D camera
Goal location prediction based on deep learning using RGB-D cameraGoal location prediction based on deep learning using RGB-D camera
Goal location prediction based on deep learning using RGB-D camerajournalBEEI
 
IMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESVicky Kumar
 
Lec11: Active Contour and Level Set for Medical Image Segmentation
Lec11: Active Contour and Level Set for Medical Image SegmentationLec11: Active Contour and Level Set for Medical Image Segmentation
Lec11: Active Contour and Level Set for Medical Image SegmentationUlaş Bağcı
 
The flow of baseline estimation using a single omnidirectional camera
The flow of baseline estimation using a single omnidirectional cameraThe flow of baseline estimation using a single omnidirectional camera
The flow of baseline estimation using a single omnidirectional cameraTELKOMNIKA JOURNAL
 
International journal of signal and image processing issues vol 2015 - no 1...
International journal of signal and image processing issues   vol 2015 - no 1...International journal of signal and image processing issues   vol 2015 - no 1...
International journal of signal and image processing issues vol 2015 - no 1...sophiabelthome
 
Face Pose Classification Method using Image Structural Similarity Index
Face Pose Classification Method using Image Structural Similarity IndexFace Pose Classification Method using Image Structural Similarity Index
Face Pose Classification Method using Image Structural Similarity Indexidescitation
 
Gesture Recognition Review: A Survey of Various Gesture Recognition Algorithms
Gesture Recognition Review: A Survey of Various Gesture Recognition AlgorithmsGesture Recognition Review: A Survey of Various Gesture Recognition Algorithms
Gesture Recognition Review: A Survey of Various Gesture Recognition AlgorithmsIJRES Journal
 
Gesture Recognition Based Mouse Events
Gesture Recognition Based Mouse EventsGesture Recognition Based Mouse Events
Gesture Recognition Based Mouse Eventsijcsit
 

What's hot (20)

An Enhanced Computer Vision Based Hand Movement Capturing System with Stereo ...
An Enhanced Computer Vision Based Hand Movement Capturing System with Stereo ...An Enhanced Computer Vision Based Hand Movement Capturing System with Stereo ...
An Enhanced Computer Vision Based Hand Movement Capturing System with Stereo ...
 
S12_P1_Aiyer_Arun
S12_P1_Aiyer_ArunS12_P1_Aiyer_Arun
S12_P1_Aiyer_Arun
 
94110A
94110A94110A
94110A
 
Paper on image processing
Paper on image processingPaper on image processing
Paper on image processing
 
EFFECTIVE INTEREST REGION ESTIMATION MODEL TO REPRESENT CORNERS FOR IMAGE
EFFECTIVE INTEREST REGION ESTIMATION MODEL TO REPRESENT CORNERS FOR IMAGE EFFECTIVE INTEREST REGION ESTIMATION MODEL TO REPRESENT CORNERS FOR IMAGE
EFFECTIVE INTEREST REGION ESTIMATION MODEL TO REPRESENT CORNERS FOR IMAGE
 
Segmentation Techniques -II
Segmentation Techniques -IISegmentation Techniques -II
Segmentation Techniques -II
 
Depth Estimation from Defocused Images: a Survey
Depth Estimation from Defocused Images: a SurveyDepth Estimation from Defocused Images: a Survey
Depth Estimation from Defocused Images: a Survey
 
Enhancing Security and Privacy Issue in Airport by Biometric based Iris Recog...
Enhancing Security and Privacy Issue in Airport by Biometric based Iris Recog...Enhancing Security and Privacy Issue in Airport by Biometric based Iris Recog...
Enhancing Security and Privacy Issue in Airport by Biometric based Iris Recog...
 
Ajay ppt region segmentation new copy
Ajay ppt region segmentation new   copyAjay ppt region segmentation new   copy
Ajay ppt region segmentation new copy
 
Blind detection of image manipulation @ PoliMi
Blind detection of image manipulation @ PoliMiBlind detection of image manipulation @ PoliMi
Blind detection of image manipulation @ PoliMi
 
Image analysis basics and principles
Image analysis basics and principlesImage analysis basics and principles
Image analysis basics and principles
 
Goal location prediction based on deep learning using RGB-D camera
Goal location prediction based on deep learning using RGB-D cameraGoal location prediction based on deep learning using RGB-D camera
Goal location prediction based on deep learning using RGB-D camera
 
IMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUES
 
Lec11: Active Contour and Level Set for Medical Image Segmentation
Lec11: Active Contour and Level Set for Medical Image SegmentationLec11: Active Contour and Level Set for Medical Image Segmentation
Lec11: Active Contour and Level Set for Medical Image Segmentation
 
The flow of baseline estimation using a single omnidirectional camera
The flow of baseline estimation using a single omnidirectional cameraThe flow of baseline estimation using a single omnidirectional camera
The flow of baseline estimation using a single omnidirectional camera
 
IEEE ICAPR 2009
IEEE ICAPR 2009IEEE ICAPR 2009
IEEE ICAPR 2009
 
International journal of signal and image processing issues vol 2015 - no 1...
International journal of signal and image processing issues   vol 2015 - no 1...International journal of signal and image processing issues   vol 2015 - no 1...
International journal of signal and image processing issues vol 2015 - no 1...
 
Face Pose Classification Method using Image Structural Similarity Index
Face Pose Classification Method using Image Structural Similarity IndexFace Pose Classification Method using Image Structural Similarity Index
Face Pose Classification Method using Image Structural Similarity Index
 
Gesture Recognition Review: A Survey of Various Gesture Recognition Algorithms
Gesture Recognition Review: A Survey of Various Gesture Recognition AlgorithmsGesture Recognition Review: A Survey of Various Gesture Recognition Algorithms
Gesture Recognition Review: A Survey of Various Gesture Recognition Algorithms
 
Gesture Recognition Based Mouse Events
Gesture Recognition Based Mouse EventsGesture Recognition Based Mouse Events
Gesture Recognition Based Mouse Events
 

Viewers also liked

EDELNet: goal, programme and achievements (MID2017)
EDELNet: goal, programme and achievements (MID2017)EDELNet: goal, programme and achievements (MID2017)
EDELNet: goal, programme and achievements (MID2017)EADTU
 
Achieving Hi-Fidelity Security by Combining Packet and Endpoint Data
Achieving Hi-Fidelity Security by Combining Packet and Endpoint DataAchieving Hi-Fidelity Security by Combining Packet and Endpoint Data
Achieving Hi-Fidelity Security by Combining Packet and Endpoint DataEnterprise Management Associates
 
Quiero Ser Tu HerOe
Quiero Ser Tu HerOeQuiero Ser Tu HerOe
Quiero Ser Tu HerOeCangre_lu
 
Sulphonamides: A Pharmaceutical Review
Sulphonamides: A Pharmaceutical ReviewSulphonamides: A Pharmaceutical Review
Sulphonamides: A Pharmaceutical Reviewinventionjournals
 
New Analytical Technique For The Determination Of Mercury (II) By Synergistic...
New Analytical Technique For The Determination Of Mercury (II) By Synergistic...New Analytical Technique For The Determination Of Mercury (II) By Synergistic...
New Analytical Technique For The Determination Of Mercury (II) By Synergistic...inventionjournals
 
Virtually Speaking: Leading Distributed Test Teams
Virtually Speaking: Leading Distributed Test TeamsVirtually Speaking: Leading Distributed Test Teams
Virtually Speaking: Leading Distributed Test TeamsTechWell
 
Simon Lavin CV Feb 7th
Simon Lavin CV Feb 7thSimon Lavin CV Feb 7th
Simon Lavin CV Feb 7thSimon Lavin
 
Network Management Megatrends 2016: Hybrid Cloud, Network Analytics and the I...
Network Management Megatrends 2016: Hybrid Cloud, Network Analytics and the I...Network Management Megatrends 2016: Hybrid Cloud, Network Analytics and the I...
Network Management Megatrends 2016: Hybrid Cloud, Network Analytics and the I...Enterprise Management Associates
 
Digital Heritage Documentation Via TLS And Photogrammetry Case Study
Digital Heritage Documentation Via TLS And Photogrammetry Case StudyDigital Heritage Documentation Via TLS And Photogrammetry Case Study
Digital Heritage Documentation Via TLS And Photogrammetry Case Studytheijes
 
5 Best Practices for Application-aware Network Performance Management (AANPM)...
5 Best Practices for Application-aware Network Performance Management (AANPM)...5 Best Practices for Application-aware Network Performance Management (AANPM)...
5 Best Practices for Application-aware Network Performance Management (AANPM)...Enterprise Management Associates
 
Каталог оборудования завода Электротехника и Автоматика
Каталог оборудования завода Электротехника и АвтоматикаКаталог оборудования завода Электротехника и Автоматика
Каталог оборудования завода Электротехника и Автоматикаkatochimotor
 
agen sofa di surakarta lengkap, agen sofa di surakarta solo, agen sofa di sur...
agen sofa di surakarta lengkap, agen sofa di surakarta solo, agen sofa di sur...agen sofa di surakarta lengkap, agen sofa di surakarta solo, agen sofa di sur...
agen sofa di surakarta lengkap, agen sofa di surakarta solo, agen sofa di sur...KursiSofaRotanSintetis
 
1pre_engineered_building_system
1pre_engineered_building_system1pre_engineered_building_system
1pre_engineered_building_systemManju natha
 

Viewers also liked (17)

EDELNet: goal, programme and achievements (MID2017)
EDELNet: goal, programme and achievements (MID2017)EDELNet: goal, programme and achievements (MID2017)
EDELNet: goal, programme and achievements (MID2017)
 
Achieving Hi-Fidelity Security by Combining Packet and Endpoint Data
Achieving Hi-Fidelity Security by Combining Packet and Endpoint DataAchieving Hi-Fidelity Security by Combining Packet and Endpoint Data
Achieving Hi-Fidelity Security by Combining Packet and Endpoint Data
 
El Artesan@
El Artesan@El Artesan@
El Artesan@
 
Quiero Ser Tu HerOe
Quiero Ser Tu HerOeQuiero Ser Tu HerOe
Quiero Ser Tu HerOe
 
Sulphonamides: A Pharmaceutical Review
Sulphonamides: A Pharmaceutical ReviewSulphonamides: A Pharmaceutical Review
Sulphonamides: A Pharmaceutical Review
 
New Analytical Technique For The Determination Of Mercury (II) By Synergistic...
New Analytical Technique For The Determination Of Mercury (II) By Synergistic...New Analytical Technique For The Determination Of Mercury (II) By Synergistic...
New Analytical Technique For The Determination Of Mercury (II) By Synergistic...
 
Virtually Speaking: Leading Distributed Test Teams
Virtually Speaking: Leading Distributed Test TeamsVirtually Speaking: Leading Distributed Test Teams
Virtually Speaking: Leading Distributed Test Teams
 
Simon Lavin CV Feb 7th
Simon Lavin CV Feb 7thSimon Lavin CV Feb 7th
Simon Lavin CV Feb 7th
 
69177635 autocad-2
69177635 autocad-269177635 autocad-2
69177635 autocad-2
 
Network Management Megatrends 2016: Hybrid Cloud, Network Analytics and the I...
Network Management Megatrends 2016: Hybrid Cloud, Network Analytics and the I...Network Management Megatrends 2016: Hybrid Cloud, Network Analytics and the I...
Network Management Megatrends 2016: Hybrid Cloud, Network Analytics and the I...
 
Digital Heritage Documentation Via TLS And Photogrammetry Case Study
Digital Heritage Documentation Via TLS And Photogrammetry Case StudyDigital Heritage Documentation Via TLS And Photogrammetry Case Study
Digital Heritage Documentation Via TLS And Photogrammetry Case Study
 
5 Best Practices for Application-aware Network Performance Management (AANPM)...
5 Best Practices for Application-aware Network Performance Management (AANPM)...5 Best Practices for Application-aware Network Performance Management (AANPM)...
5 Best Practices for Application-aware Network Performance Management (AANPM)...
 
Каталог оборудования завода Электротехника и Автоматика
Каталог оборудования завода Электротехника и АвтоматикаКаталог оборудования завода Электротехника и Автоматика
Каталог оборудования завода Электротехника и Автоматика
 
agen sofa di surakarta lengkap, agen sofa di surakarta solo, agen sofa di sur...
agen sofa di surakarta lengkap, agen sofa di surakarta solo, agen sofa di sur...agen sofa di surakarta lengkap, agen sofa di surakarta solo, agen sofa di sur...
agen sofa di surakarta lengkap, agen sofa di surakarta solo, agen sofa di sur...
 
1pre_engineered_building_system
1pre_engineered_building_system1pre_engineered_building_system
1pre_engineered_building_system
 
Cover stroy
Cover stroyCover stroy
Cover stroy
 
Securing the New Digital Enterprise Infographic
Securing the New Digital Enterprise Infographic Securing the New Digital Enterprise Infographic
Securing the New Digital Enterprise Infographic
 

Similar to Measuring distance to objects using camera pose and adapted scale

Enhanced Algorithm for Obstacle Detection and Avoidance Using a Hybrid of Pla...
Enhanced Algorithm for Obstacle Detection and Avoidance Using a Hybrid of Pla...Enhanced Algorithm for Obstacle Detection and Avoidance Using a Hybrid of Pla...
Enhanced Algorithm for Obstacle Detection and Avoidance Using a Hybrid of Pla...IOSR Journals
 
Matching algorithm performance analysis for autocalibration method of stereo ...
Matching algorithm performance analysis for autocalibration method of stereo ...Matching algorithm performance analysis for autocalibration method of stereo ...
Matching algorithm performance analysis for autocalibration method of stereo ...TELKOMNIKA JOURNAL
 
Real time implementation of object tracking through
Real time implementation of object tracking throughReal time implementation of object tracking through
Real time implementation of object tracking througheSAT Publishing House
 
Leader Follower Formation Control of Ground Vehicles Using Dynamic Pixel Coun...
Leader Follower Formation Control of Ground Vehicles Using Dynamic Pixel Coun...Leader Follower Formation Control of Ground Vehicles Using Dynamic Pixel Coun...
Leader Follower Formation Control of Ground Vehicles Using Dynamic Pixel Coun...ijma
 
CROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERA CROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERA ijaceeejournal
 
CROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERACROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERAijaceeejournal
 
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...csandit
 
An Accurate Scheme for Distance Measurement using an Ordinary Webcam
An Accurate Scheme for Distance Measurement using an Ordinary Webcam An Accurate Scheme for Distance Measurement using an Ordinary Webcam
An Accurate Scheme for Distance Measurement using an Ordinary Webcam Yayah Zakaria
 
An Accurate Scheme for Distance Measurement using an Ordinary Webcam
An Accurate Scheme for Distance Measurement using an Ordinary Webcam An Accurate Scheme for Distance Measurement using an Ordinary Webcam
An Accurate Scheme for Distance Measurement using an Ordinary Webcam IJECEIAES
 
Robotic navigation algorithm with machine vision
Robotic navigation algorithm with machine vision Robotic navigation algorithm with machine vision
Robotic navigation algorithm with machine vision IJECEIAES
 
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...cscpconf
 
10.1109@ICCMC48092.2020.ICCMC-000167.pdf
10.1109@ICCMC48092.2020.ICCMC-000167.pdf10.1109@ICCMC48092.2020.ICCMC-000167.pdf
10.1109@ICCMC48092.2020.ICCMC-000167.pdfmokamojah
 
Fuzzy-proportional-integral-derivative-based controller for object tracking i...
Fuzzy-proportional-integral-derivative-based controller for object tracking i...Fuzzy-proportional-integral-derivative-based controller for object tracking i...
Fuzzy-proportional-integral-derivative-based controller for object tracking i...IJECEIAES
 
Wujanz_Error_Projection_2011
Wujanz_Error_Projection_2011Wujanz_Error_Projection_2011
Wujanz_Error_Projection_2011Jacob Collstrup
 
AUTOMATED MANAGEMENT OF POTHOLE RELATED DISASTERS USING IMAGE PROCESSING AND ...
AUTOMATED MANAGEMENT OF POTHOLE RELATED DISASTERS USING IMAGE PROCESSING AND ...AUTOMATED MANAGEMENT OF POTHOLE RELATED DISASTERS USING IMAGE PROCESSING AND ...
AUTOMATED MANAGEMENT OF POTHOLE RELATED DISASTERS USING IMAGE PROCESSING AND ...ijcsit
 
Stereo matching based on absolute differences for multiple objects detection
Stereo matching based on absolute differences for multiple objects detectionStereo matching based on absolute differences for multiple objects detection
Stereo matching based on absolute differences for multiple objects detectionTELKOMNIKA JOURNAL
 
Image fusion using nsct denoising and target extraction for visual surveillance
Image fusion using nsct denoising and target extraction for visual surveillanceImage fusion using nsct denoising and target extraction for visual surveillance
Image fusion using nsct denoising and target extraction for visual surveillanceeSAT Publishing House
 

Similar to Measuring distance to objects using camera pose and adapted scale (20)

Enhanced Algorithm for Obstacle Detection and Avoidance Using a Hybrid of Pla...
Enhanced Algorithm for Obstacle Detection and Avoidance Using a Hybrid of Pla...Enhanced Algorithm for Obstacle Detection and Avoidance Using a Hybrid of Pla...
Enhanced Algorithm for Obstacle Detection and Avoidance Using a Hybrid of Pla...
 
Matching algorithm performance analysis for autocalibration method of stereo ...
Matching algorithm performance analysis for autocalibration method of stereo ...Matching algorithm performance analysis for autocalibration method of stereo ...
Matching algorithm performance analysis for autocalibration method of stereo ...
 
D04432528
D04432528D04432528
D04432528
 
Real time implementation of object tracking through
Real time implementation of object tracking throughReal time implementation of object tracking through
Real time implementation of object tracking through
 
Leader Follower Formation Control of Ground Vehicles Using Dynamic Pixel Coun...
Leader Follower Formation Control of Ground Vehicles Using Dynamic Pixel Coun...Leader Follower Formation Control of Ground Vehicles Using Dynamic Pixel Coun...
Leader Follower Formation Control of Ground Vehicles Using Dynamic Pixel Coun...
 
CROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERA CROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERA
 
CROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERACROWD ANALYSIS WITH FISH EYE CAMERA
CROWD ANALYSIS WITH FISH EYE CAMERA
 
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...
 
An Accurate Scheme for Distance Measurement using an Ordinary Webcam
An Accurate Scheme for Distance Measurement using an Ordinary Webcam An Accurate Scheme for Distance Measurement using an Ordinary Webcam
An Accurate Scheme for Distance Measurement using an Ordinary Webcam
 
An Accurate Scheme for Distance Measurement using an Ordinary Webcam
An Accurate Scheme for Distance Measurement using an Ordinary Webcam An Accurate Scheme for Distance Measurement using an Ordinary Webcam
An Accurate Scheme for Distance Measurement using an Ordinary Webcam
 
Robotic navigation algorithm with machine vision
Robotic navigation algorithm with machine vision Robotic navigation algorithm with machine vision
Robotic navigation algorithm with machine vision
 
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...
A NOVEL APPROACH TO SMOOTHING ON 3D STRUCTURED ADAPTIVE MESH OF THE KINECT-BA...
 
10.1109@ICCMC48092.2020.ICCMC-000167.pdf
10.1109@ICCMC48092.2020.ICCMC-000167.pdf10.1109@ICCMC48092.2020.ICCMC-000167.pdf
10.1109@ICCMC48092.2020.ICCMC-000167.pdf
 
Fuzzy-proportional-integral-derivative-based controller for object tracking i...
Fuzzy-proportional-integral-derivative-based controller for object tracking i...Fuzzy-proportional-integral-derivative-based controller for object tracking i...
Fuzzy-proportional-integral-derivative-based controller for object tracking i...
 
Wujanz_Error_Projection_2011
Wujanz_Error_Projection_2011Wujanz_Error_Projection_2011
Wujanz_Error_Projection_2011
 
AUTOMATED MANAGEMENT OF POTHOLE RELATED DISASTERS USING IMAGE PROCESSING AND ...
AUTOMATED MANAGEMENT OF POTHOLE RELATED DISASTERS USING IMAGE PROCESSING AND ...AUTOMATED MANAGEMENT OF POTHOLE RELATED DISASTERS USING IMAGE PROCESSING AND ...
AUTOMATED MANAGEMENT OF POTHOLE RELATED DISASTERS USING IMAGE PROCESSING AND ...
 
E017443136
E017443136E017443136
E017443136
 
ei2106-submit-opt-415
ei2106-submit-opt-415ei2106-submit-opt-415
ei2106-submit-opt-415
 
Stereo matching based on absolute differences for multiple objects detection
Stereo matching based on absolute differences for multiple objects detectionStereo matching based on absolute differences for multiple objects detection
Stereo matching based on absolute differences for multiple objects detection
 
Image fusion using nsct denoising and target extraction for visual surveillance
Image fusion using nsct denoising and target extraction for visual surveillanceImage fusion using nsct denoising and target extraction for visual surveillance
Image fusion using nsct denoising and target extraction for visual surveillance
 

Recently uploaded

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Recently uploaded (20)

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

Measuring distance to objects using camera pose and adapted scale

  • 1. The International Journal Of Engineering And Science (IJES) || Volume || 6 || Issue || 1 || Pages || PP 39-50|| 2017 || ISSN (e): 2319 – 1813 ISSN (p): 2319 – 1805 www.theijes.com The IJES Page 39 Distance Estimation to Image Objects Using Adapted Scale M. Zuckerman(1) Intel Corp., Israel E. Kolberg(2)* Bar-Ilan University, Israel --------------------------------------------------------ABSTRACT-------------------------------------------------- Distance measurement is part of various robotic applications. There exist many methods for this purpose. In this paper, we introduce a new method to measure the distance from a digital camera to an arbitrary object by using its pose (X,Y pixel coordination and the angel of the camera). The method uses a pre-data that stores all the information about the relation between the pose and the distance of an object to the camera. This process designed for a robot that is a part of a robotic team participating in RoboCup KSL competition. --------------------------------------------------------------------------------------------------------------------------------------- Date of Submission: 12 January 2017 Date of Accepted: 05 February 2017 -------------------------------------------------------------------------------------------------------------------------------------- I. INTRODUCTION Distance measurement from a camera to an arbitrary object is widely needed. We use the fact that an object looks larger as it gets closer to the camera. That means that the same object when close to the camera will have more pixels representing it than if it was located further. It allowed us to develop a robust mapping method for measuring a distance to an object. Among the common methods used to yield distance measurement from image processing we find Pinhole cam- era model [1, 2], Stereo vision [3, 4] and object volume [5, 6]. In [2] distance measurements are based on foot- print size. In [1] the distance to an object is derived using the laws of perspective and depends on the road geo- metry and the point of contact between the vehicle and the road. This method is used in order to estimate a dis- tance to a car or a truck that are an order of magnitude bigger than the objects we deal with. Measuring a distance of 90 meters, the error is 10%. The object size and the dependency of the road geometry using a pin- hole camera is therefore less adequate in our case. In [2] the method is again deals with vehicles and focus on the detection of preceding vehicles. It takes an area in an image bounded by lane marks, (taking advantage that lane marks are at 45 when they appear in the image), and execute a logical-AND operation with the binary road image with no lane marks. It also takes advantage of the non symmetrical shape of a vehicle in order to verify the vehicle footprint. These two last methods while adequate for vehicle identification are less useful for the case described in this paper. In [3] the distance measurement is based on stereoscopic pictures. It depends on horizontally aligned cameras, taking pictures at the same time, parallel axis of the two cameras. As the distance is longer, the error grows in proportion to the squared distance. In the case we describe here, the robot moves so a static infrastructure is not relevant here. In addition, we need to reduce the error even in long distances. In [4] there is a comparison between camera and human depth accuracy. They concluded that the focal length affected the depth resolution remarkably. Wide-angle lens deteriorated the focal resolution as well. The calibration errors added to the overall error. In [5] the authors describe a method for measure distance to thin and high pole like objects. Each pole needs three alignment measurements for each placement. While this is fine for a pole posi- tioned in a single static position, it is less adequate for our case. In [6] the method for distance calculation has two steps. First, calculating an interpolation function based on the height and the horizontal angle of the camera. Second, using this function to calculate the distance of the object from the camera. This method relies upon the camera height and horizontal angle. The paper shows results of distances up to 1m. It is based on interpolation, which in our case might increase the error. Using laser like the one presented in [7] integrated with a camera can increase accuracy on a static system as described there. Besides the fact that it is forbidden for use in the compe- tition, it will require substantial design and additional hardware and software for using it on a walking robot. In [8] plate size of car number is used to estimate distance to a car. While this method might be adequate for distance from a car, it proved to be less useful in our case. The method described in [9], deals with a flat board of size 750mm x 750 mm, with target points on it. This target is too big for our case. The focal length and cam- era's lens diameter along with object base size were used to derive the distance to an object. The limitations of this method include relevancy for exact camera model in combination with particular lens, and target should be in optical axes. In this paper we will present the volume solution for deriving a distance to an object. The Mapping method is based on the idea of the volume solution.
  • 2. Distance Estimation to Image Objects Using Adapted Scale www.theijes.com The IJES Page 40 II. VOLUME SOLUTION When dealing with known objects, it will be useful to measure the object size with different distances, as it ap- pears on the image. As close the object to the camera as bigger it appears. The object, which appears on an image, is called reflected object. This information needs to be recorded and saved as a function [5] [6] . We took measurements of distance versus radius of a ball with a radius of 5 cm. We shot images out of Logitech C905 camera with 1280x720 pixels. Figure 1 presents a graph of the measurements we took. The graph looks similar to the one presented by Sant’Ann et. al [7] . In our example, the software program identified the ball. Since the ball was a known object, the program could use pre-stored data about ball diameter, ball color, and ball center. While these parameters are known it is possible to use a scale tool that measures the different radius sizes as appear on the image. Figure 1: Distance Vs Radios From figure 1 we see that the reflected object distance is an exponential function of the number of its radius pixels. This means that when the ball is far from the camera from a certain distance, it will have relatively less changes in number of pixels. On the other hand, the sensitivity will increase as the object is getting close to the camera, since the reflected object radius will have substantially less pixels in comparison to a closer distance when the ball is close to the camera. From figure 1, we can see that there is a correlation between the number of pixels of the object radius in the image and the distance of the object from the camera in the real world. In this particular graph, the correlation is presented by the function 𝑦 = 54181𝑥−1.164 , when y stands for the distance and x stands for the number of pixels. Next step is to determine the accuracy of the correlation. It will be presented by the error between the real distance and the computed one. III. VOLUME SOLUTION ACCURACY The function accuracy depends on the following factors. 3.1 Camera's angle aimed to an object Objects in image might look different from various angles and different lighting conditions. One common me- thod of identifying objects is first saving an image as a binary picture and then count the white pixels of an ob- ject like the radius of a ball or the width of a goal in a soccer game. The accuracy of the function will depend on the way the object is presented. Figure 2 presents the error ratings obtained when we tested the distance from the camera to a 10cm diameter orange ball on a green field. Table 1 presents the average distance error of short and long distance areas in the graph. Figure 2: Error as function of distance orange y = 54181x-1.16 R² = 0.987 0 500 1000 0 200 400 600 800 1000 Distancecm Radios pix Distance vs Radios pixcels from 0 – 800 cm 1280X720 23% 0% 7%7% 11% 7% 2%1%2%6% 9% 5%4%4%5%4%6%4%4%4%7%4%5%6%6%5%5%4%4% 0% 5% 10% 15% 20% 25% 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 ERROR% DISTANCE CM Error as function of distance
  • 3. Distance Estimation to Image Objects Using Adapted Scale www.theijes.com The IJES Page 41 Table 1: Average error values of distance from a camera to a 10 cm dia. ball, calculated from B/W image The values presented in table 1 are reasonable for our purpose of a soccer game since they are close enough to the real world. When we tried the same technique on the identification of the goal, it was not as robust. One rea- son to this phenomenon is that the ball looks round from almost any angle and light conditions. However, the goal might look different from different angles. The gap between the goal's poles will look different when the camera looks at the goal from different angles. The shape of the goal in these cases might look as a part of a parallelogram, or a triangle or a trapezoid, etc. It leads to a conclusion that volume solution by counting white pixels is valid only for a perfect rounded shape or a simple shape like an equilateral triangle. In case of different objects, the error might increase substantially. 3.2 Light conditions Different light conditions might change objects' edges as appears in the reflected image. With brighter illumina- tion, white objects like white lines or white poles may look larger in the reflected image than they are in reality. Shadows or hiding a part of an object might also considered as different light conditions. 3.2 Filter type The type of filter will have also an impact on the accuracy of the distance. In some cases, HSV will be used in others, RGB, etc. The filter types of edge detection will also have an impact on the accuracy. 3.3. Approximation function. Tinnachote and Pimprasen [5], suggest using a polynomial approximation func- tion in order to calculate the distance, in a case of exponential function. We found that while it improves the results, it still was not proper to our purposes. We came out with the idea of further dividing the graph into smaller sections, which makes it more delicate for better approximation. In this specific example, we divided the graph into three sections. In each section, we used a different type of approximation function: 1. For ball distance of 0 to 55 cm – linear function as presented in figure 3. 2. For ball distance of 60 to 150 cm – 2nd order polynomial function as presented in figure 4 3. For ball distance of 160 cm and above – exponential function as presented in figure 5 The resulted distance error is presented in figure 6. The error decreased. The average distance error of the di- vided function was 3% compared to 6% average distance error presented in figure 1. Figure 3: linear function of section 1 Figure 4: 2nd order polynomial function of section 2 Distance Error values Short distance 0-55 cm 7% Long distance 60-150 cm 5%
  • 4. Distance Estimation to Image Objects Using Adapted Scale www.theijes.com The IJES Page 42 Figure 5: exponential function of section 3 Figure6: Error as function of distance: average error of 3% 3.4 Color/filter calibration Before analyzing an image, it is translated from a colored image into a B/W image. One of the tools used for this purpose is HSV/RGB threshold. With a proper threshold, it is possible to identify object types. Notwithstanding, it is somewhat problematic. For instance, if we allow for a low threshold, the object will be seen larger com- pared to the real object. Increasing or decreasing the value of the HSV threshold, will change the object's area. IV. NEW METHOD'S IDEA Since distances to objects are important values as inputs to a localization system in general and for RoboCup soccer game in particular, it was required to develop a reliable distance measuring method that is independent as much as possible of the factors described above. After consideration of various options like using more expensive cameras, developing more complex algorithm, etc., we decided upon an algorithm that take as an input the location (x,y) of the object in 2-D Cartesian coordi- nate system. The (x,y) coordinates is the only needed input to the algorithm. In addition, the algorithm requires building in advance, a lookup table that transfers these coordinates into distances. Using such a lookup table makes it unnecessary to use an approximation function or count white pixels. Actually, the algorithm is inde- pendent of the binary picture. The only input needed is the (X, Y) coordinates of the object. In order to implement the lookup it is necessary to find a correlation between any point coordinates (X, Y) and the distance to the point. For this purpose, we chose to use a scale. After creating the scale, it is easy to build the lookup table. Then it is straightforward to implement the algo- rithm that deduce the distance to a point with its Cartesian coordinates. Next we will describe the two scales we built during the development process. V. SCALE VERSION 1.0 (Y DEPENDENT ) The scale is made of black and white stripes. We developed a specific software in order to identify the black and white scale. We added numbers on the scale, which correlates to the distance between the camera and the object.  8765431 2 1211109 10 [cm] 0 - 120 [cm] Figure 7: Scale 1.0 with is 10[cm] stripes
  • 5. Distance Estimation to Image Objects Using Adapted Scale www.theijes.com The IJES Page 43 VI. THE LOOKUP TABLE The lookup table saves the output information coming from the software in the preparation test mode. The Algo- rithm of creating to the lookup table appears in table 2. First, variables and constants are initialized (Lines 1-10). The camera is placed in the middle of first stripe. Then, the algorithm count the current stripe pixels' number (Lines 12-16). Each stripes pixels count is saved (Line 18). In addition the algorithm takes care of saving the accumulated pixel counts (Line 19). J presents the stripe number. Since the scale reflected image looks like a trapezoid, the middle stripe's x value changes as y value advances to next stripe. Figure 8 presents the geometric scheme of this state. Here α is the left side slope and 2     .  y y x 1st stripe 2nd stripe  ( )y tg   First stripe’s edge center Second stripe’s edge center Third stripe’s edge center  Figure 8: x values change Table 2: Creation of lookup table algorithm 1 : _ ( , ) : 2 : 3 : 4 : 5 : 6 : ' 0 7 : ' 8 : ( , ) A lg o r ith m L o o k u p T a b le N T p la c e th e c a m e r a in fr o n t o f m id d le s c a l e 's fir s t s tr ip e y = 0 c o u n t = 0 j = 0 x o f s tr ip e s lo w e r le ft c o r n e r x x v a lu e o f fir s t s tr ip e s c e n te r r e a d c o lo r x y   1 , 2 , 3 , 2 , 3 , 1 9 : _ ( , ) 1 0 : s e c 0 1 1 : 1 2 : s e c 1 3 : 1 4 : ( , ) 1 5 : ( ) _ 1 6 : 1 7 : 1 8 : 1 9 : 2 0 : 2 1 : s e c s e c 1 0 2 2 : 0 2 3 : 2 4 : j j j j j c o lo r te m p c o lo r x y w h ile j N d o T y r e a d c o lo r x y if c o lo r y c o lo r te m p c o u n t e ls e T c o u n t T T T j c o u n t e n d if x x y t                       ( ) 2 5 : 2 6 : g e n d w h ile r e tu r n T 
  • 6. Distance Estimation to Image Objects Using Adapted Scale www.theijes.com The IJES Page 44 Figure 9: the measurements'' environment The result is an array similar to the one presented in table 3. We see that as further the stripe from the camera, the less pixels it has. Table 3: Lookup table of pixel numbers as a function of the distance The red line presents the measurement points along the y-axis. The green areas present the field and the yellow and gray areas presents the area outside the count range. The table (like table 3), can be used to correlate number of pixels to a point (x,y) further from the camera in the field and then derive the distance to this point. In order to calculate a distance from the camera to a certain point we will usually have to perform interpolation. Let us take an example. Suppose we need to know the distance to point (320, 75). We will look at the y-axes value, which is 75 in this case. From table 3 we see that the appropriate region end-points in terms of accumulated pix- el values are 72 and 81. The related distance value lies between 40 and 50 cm. The distance value is calculated by interpolation: 40 + 75−72 81−72 ∗ 10 = 43.3333 cm. In general the distance function will be:           1 0 1 p ix y y i d ista n ce cm y i y i y i       Where y(i) is the lower end point and y(i+1) is the higher end point in the region. ypix is the pixel's y value of the desired point. VII. MAPPING SOLUTION ACCURACY The method we described use the scale solely. When the lookup table is complete, there is no need to process the binary image. The only input data needed is the (x,y) object location. Figure 10 presents the error as a function of the distance. Table 4:Lookup table of pixel numbers as a function of the distance and stripe width type. 0 10 20 30 40 50 60 70 CM 0 20 15 14 13 10 9 8 #PIX 0 20 35 49 62 72 81 89 ACC
  • 7. Distance Estimation to Image Objects Using Adapted Scale www.theijes.com The IJES Page 45 Figure 10: error as a function of distance There are areas in figure 10 that show higher error compared to other areas. In order to have a distinction among the different areas we divided the area into three distance ranges: short range, middle range and long range. Ta- ble 4 presents the average error ratings for each range. The error in the long distance range is higher by more than three times compared to the short distance range and more than double compared to the middle distance range. Clearly, there is a need to adapt the method such that the error will be satisfactory for all ranges. Table 5: The average error as a function of the distance ranges Range Distance Error Short 80-190[cm] 2.68% Middle 200-300[cm] 4.95% Long 310-410[cm] 11.6% Looking closely at figure 9 and table 3 reveals that in the long distance there is a gap, which is realized by a jump in the pixels count. It means that the algorithm miscount the long or far distance. For example, if the real distance was 30 [cm] the algorithm calculates it as a distance of 10 [cm] due to the jump in pixels count. We will call this error as Jump error meaning miscount pixels error. In order to take care about this problem we will design a new scale that solves the issue of Jump error. The new scale will take into account the different pixels count of stripes relative to their distance from the camera. After testing several options, we concluded that the following measures of the different ranges on the scale would be adequate: stripes' width of be 5 cm, 10 cm, and 20 cm for short, middle, and long distances accordingly. VIII. SCALE VERSION 2.0 Based on the above discussion the 2nd version of the scale looks like the one presented in figure 11. Figure 11: Scale 2.0 with different stripe's size IX. THE LOOKUP TABLE ALGORITHM FOR SCALE 2.0: The new lookup table will contain the information of each stripe width. The digit 0 will designate the stripes with width of 5 cm. The digit 1 will designate the stripes with width of 10 cm, and the digit 2 will designate the stripes with width of 20 cm. Thus, the lookup table might look as the one presented in table 5. Reading the new ribbon requires the use of a new algorithm. This new algorithm will be similar to the one pre- sented in table 2 with additional part for the information about different stipe sizes (5, 10, or 20 cm). Actually, since the ribbon structure is known, it is easy to manually add the last row of the lookup table. 0 5 10 15 20 25 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400 ERROR% DISTANCE [CM] Error as function of distance
  • 8. Distance Estimation to Image Objects Using Adapted Scale www.theijes.com The IJES Page 46 Table 6 presents the algorithm for scale 2.0. The additional inputs compared to the algorithm of table 2 are n1 and n2, which presents the first stripe number with width of 10 cm and 20 cm respectively. Table 6: Creation of lookup table 2.0 algorithm 1 2 1 : _ _ 2 .0 ( , , , ) : 2 : 3 : 4 : 5 : 6 : ' 0 7 : ' 8 : A lg o rith m L o o k u p T a b le N T n n p la c e th e c a m e ra in fro n t o f m id d le sc a l e 's first strip e y = 0 c o u n t = 0 j = 0 x o f strip e s lo w e r le ft c o rn e r x x v a lu e o f first strip e s c e n te r re a d   1, 2 , 3 , 2 , 3 , 1 1 4 , 2 ( , ) 9 : _ ( , ) 1 0 : se c 0 1 1 : 1 2 : se c 1 3 : 1 4 : ( , ) 1 5 : ( ) _ 1 6 : 1 7 : 1 8 : 1 9 : 2 0 : 2 1 : 0 2 2 : 2 3 : 2 4 : j j j j j j c o lo r x y c o lo r te m p c o lo r x y w h ile j N d o T y re a d c o lo r x y if c o lo r y c o lo r te m p c o u n t e lse T c o u n t T T T if j n T e lse if j n T                 4 , 4 , 1 2 5 : 2 6 : 2 2 7 : 2 8 : 2 9 : 3 0 : se c se c 1 0 3 1 : 0 3 2 : 3 3 : ( ) 3 4 : 3 5 : j j e lse T e n d if e n d if j c o u n t e n d if x x y tg e n d w h ile re tu rn T             The part that takes care of writing the stripe width index (0,1,2) is presented in lines 20-28 of the algorithm. When the lookup table is complete, a distance to a certain point (x,y) is calculated using the algorithm in table 7.
  • 9. Distance Estimation to Image Objects Using Adapted Scale www.theijes.com The IJES Page 47 Table 7: Distance calculation algorithm 1 : _ _ 2 .0 ( , , , ) : 2 : [1] [2 ] [3] 3 : 4 : 5 : 6 : _ 5 7 : ( (3, )) 8 : (4, ) 0 9 : [1] 1 0 : _ 5 1 1 : (4, ) 1 1 2 : y A lg o rith m D ista n ce C a lcu la tio n x y T D IS co u n t co u n t = co u n t = 0 in d ex = 0 typ e = 0 j = 1 la st w id th w h ile y T j if T j co u n t la st w id th else if T j co         [2 ] 1 3 : _ 1 0 1 4 : 1 5 : [3] 1 6 : _ 2 0 1 7 : 1 8 : 1 9 : 2 0 : 2 1 : 5 [0 ] 1 0 [1] (3, 1) 2 0 [3] _ (3, ) (3, 1) 2 2 : y y u n t la st w id th else co u n t la st w id th en d if en d if j en d w h ile D IS co u n t co u n t y T j co u n t la st w id th T j T j retu rn D IS                      For example if we need the distance to a point with y=85, using the data in table 5, we will get: 8 5 8 1 5 5 1 0 2 1 0 5 0 8 9 8 1 cm         X. THE ACCURACY OF SCALE VERSION 2.0 Figure 12 presents the error of the distance value for distances up to 410 cm, using the scale version2. Table 8 presents the average error in short, middle and long distance ranges of the two scale versions. Figure 12: Error as function as distance in Scale ver 2.0 0 2 4 6 8 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400 ERROR% DISTANCE [CM] Error as function of distance
  • 10. Distance Estimation to Image Objects Using Adapted Scale www.theijes.com The IJES Page 48 Figure 13: x-axis width measurement using Scale version 1.0 Table 8: error as a function of distance for the two scale versions Range Distance Error ver 1.0 Error ver 2.0 Short 80-190[cm] 2.68% 2.11% Middle 200-300[cm] 4.95% 1.69% Long 310-410[cm] 11.6% 3.81% It is clear from table 8, that using scale version 2, significantly improved the accuracy of the distance measure- ment.For example at the maximum distance presented in table 8, the error will be about 410 cm*3.81%=15.6cm. Since the robot feet size is more than 20 cm this is accurate enough for all practical purposes. XI. ADDING THE X-AXIS INTO CALCULATIONS Up until now, we used only the y-axis for calculation of the distance. Although the x-axis value has less effect on the distance, it is still good practice to use its value for better distance estimation. We can calculate the x-axis value using the scale version 1.0. The number of pixels inside each cell doesn’t change much, meaning that the number of pixels in the middle cell are more or less equal to those on the edge cell, as can be seen in Table 9. This fact led us to an additional design. We sketched two vertical white lines, with a distance of 6m between them as presented in figure 15. Adding the horizontal lines creates a trapezoid of the 2-D field. Then, we took measurements at every 20[cm] of the y-axis, starting from the camera position (figure 13). In each slice that created by the scale 1.0, we counted the number of pixels entering to 10cm segments, starting from one edge of the trapezoid and finshe in the other edge (figure 14). Table 9 shows the data we got using Logitech C905 camera. Each column in Table 9 presents a different slice of y-axis with header yend/ybegin (Top and bottom of the cell [figuer 7] in terms of pixels) [the image produced by this camera is an inverse image]. Each row presents different segment of 10[cm] (width x-axis). The numbers in Table 9 cell represents the
  • 11. Distance Estimation to Image Objects Using Adapted Scale www.theijes.com The IJES Page 49 Figure 14:number of pixels presents 10cm segments in y-axis in avg X- In terms of cm | Y-In terms of pixels *The data presented in table 9 might be different for a different camera, but the calculation will be the same. Table 9: presents the y-axis slices with the average pixels count for each 10cm segment in x-axis in each slice number of pixel entering to 10[cm] of width. For example in 100[cm] from the right side of the picture. In high of 240[pixel] (the second column) enter 63 pixels. We can see from table 9 that each column standard deviation is in most cases less than 5% and in the worst case is less than 6.5%. We can conclude that it is safe to use the average number of pixels for distance calculations. Next, we will explain how to receive the distance from xi to xmiddle. For that, let us define xmiddle as the middle point value of the horizontal line (figure 15) with yi as its y-axis value. xmiddle is known for every y. First , we recorded the two left corners of the trapezoid ((x1,y1) and (x2,y2)) (This is true for the right side as well). Suppose that we are interested in the distance to the point (xi,yi). We know that the distance of any point (x3 , yi ) on the white line to the parallel point (xmiddle ,yi) on the middle line equals to 3[M]. The algorithm will find the x3 using the method proposed in the papers [8] and [9]. It is easy to prove that the x-axis value (xwl) of a point on the left vertical white line, with yi as its y-axis value, can be calculated to be: 1 1 ( ) i w l i y y x f y x m     Where m is the left white line slope ((y1-y2)/(x1-x2)). We define two more variables: pix1 and pix2 as follows: 1 3 2 m iddle w l m iddle pix x x pix x x     The algorithm will compute the x-axis distance (DISx) with metric units according to the following equation: 1 2 3[ ]x p ix D IS m p ix   This gives the X distance from the center to the desired point (xi,yi)
  • 12. Distance Estimation to Image Objects Using Adapted Scale www.theijes.com The IJES Page 50 Figure 15: Field configuration for calculating x-axis value of a certain point XII. RETRIEVE DISTANCE The last step required to compute the real distance is by use the right triangle hypotenuse formula: 2 2 ( ) ( )x y distance D IS D IS  XIII. SUMMARY This paper demonstrates an easy and efficient method to calculate a distance from a camera to an arbitrary ob- ject in the playing field of a KSL competition in the frame of RoboCup soccer league. In fact, this method is more accurate and faster than volume solution, in other words, it reducing the error mistake in each step and have no obligation to count the white pixel in the binary threshold picture. The base of this idea relies on initial setup, which includes adapting the pixel numbers into the distance. At first, there was an exponential function, as we proceeded, we decided to divide the graph into small sections, achiev- ing a better result. Apparently, the problem with long distance remained. Another obstacle was different objects on the field, different shapes are acting differently, what made us create different function for each shape (Goal, Ball, White strip, etc.) The database was prepared by using a suitable scale and merged all of the different functions into one database. Then, an algorithm with only (x,y) coordination was created. These solved both problems. Additionally, this method can be adapted to different scenarios and different cameras. REFERENCES [1]. G. P. Stein, O. Mano and A. Shashua, "Vision-based ACC with a Single Camera: Bounds on Range and Range Rate Accuracy", Proc. Intelligent Vehicles Symposium, pp. 120-125, 2003. [2]. Y.C. Kuo,N.S. Pai and Y.N. Li, "Vision-based Vehicle Detection for a Driver Assistance System," Computers and Mathematics with Applications (61) ,pp. 2096–2100, 2011. [3]. J. Mrovlje and D. Vrančić, "Distance Measuring Based on Stereoscopic Pictures", 9th Int. PhD Workshop on Systems and Control: Young Generation Viewpoint, Slovenia, 2008. [4]. M. Kyto, M. Nuutinen, and P. Oittinen , "Method for Measuring Stereo Camera Depth Accuracy Based on Stereoscopic Vision", Proc. SPIE 7864, Three dimensional imaging, Interaction and Measurement, 2011. [5]. C. Tinnachote and K. Pimprasan, "Distance Measurment from Digital Photograpg Using 3rd Order Polynomial Equation", Proc. ACRS ,2012.. [6]. M. Mirzabaki, "Depth Detection Through Interpolation Functions", The 12th int. conf. WSCG, pp. 105-108, 2004.. [7]. S.V.F Barreto R E.S. Anna, and M. Feitosa, "A Method for Image Processing and Distance Measuring Based on Laser Distance Triangulation", IEEE 20th int. conf. on Electronics, Circuits and Systems, pp. 695-698, 2013. [8]. Y. Lim and H. Lim, "A Method for Measurement of Distances using License Plate Detection", Advanced Science and Technology Letters, pp. 13-16, 2014. [9]. A. de La Bourdonnaye, R. Doskocil, V. Krivanek, and A. Stefek, "Practical Experience with Distance Measurement Bsed on Single Visual Camera," Advances in Military Technology, (7) 2, pp. 49-56, 2012