Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to estimate the actual distance of the object in image?

Status
Not open for further replies.

alibarghi

Member level 1
Member level 1
Joined
Jun 30, 2013
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,551
log0.jpg

The camera is 3 meters away from the playground. How do I get the actual distance between the balls?
 

betwixt

Super Moderator
Staff member
Advanced Member level 7
Joined
Jul 4, 2009
Messages
15,845
Helped
5,093
Reputation
10,211
Reaction score
4,960
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
134,146
The camera appears to be directly over the center line and presumably you know the horizontal and vertical scale (or use distace between the other lines) so think of a triangle 3m high and with a base of the horizontal distance then use trig functions to work out the angle between them and hence their spacing.

Brian.
 

c_mitra

Advanced Member level 6
Advanced Member level 6
Joined
Nov 13, 2012
Messages
3,815
Helped
929
Reputation
1,860
Reaction score
922
Trophy points
1,393
Activity points
30,128
The camera is 3 meters away from the playground.

Distance is defined between two points. 3 meter distance between which points?

First, you need to correct for the distortion. The camera lens is too close and is showing the wide angle effect. (side lines are looking curved whereas they are straight lines).

Simplest way is to use the middle black line as a scale. You can also measure the frame size from the focal length of the lens and the distance of the lens from the centre of the field (of the frame).

They will give you some idea. If the camera is not exactly vertically above (looking down straight), more information is needed.
 

FvM

Super Moderator
Staff member
Advanced Member level 7
Joined
Jan 22, 2008
Messages
51,217
Helped
14,653
Reputation
29,584
Reaction score
13,797
Trophy points
1,393
Location
Bochum, Germany
Activity points
292,751
A general solution that doesn't depend on a specific camera position and lens properties would be a calibration grid placed on the playground. Then determine a mapping function (e.g. 2-D look-up table) that calculates x-y coordinates for pixel positions.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top