Ask Your Question

simple measure over an image

asked 2013-08-02 10:32:35 -0500

JnDnl gravatar image

updated 2013-08-02 14:21:45 -0500

Hi everyone, I Need to take a measure (euclidean distance) over a set of selected points on an image. In order to make this simple I broke down all the process in steps:

  1. Taking/Loading a photo (with a known pattern in it)
  2. Recognicing the pattern to calibrate measure
  3. Selecting points "from" and "to" in order to measure the distance between them

For my first iteration i will load a picture (half of number 1), select the pattern manually(a rough aproximation of number 2) and select point to measure distances between them. I'm just beginig with openCV, Do I need openCV for my fist iteration?

Thanks in advance :)

edit retag flag offensive close merge delete


For me your question is still to vague... Do you want to find euclidean distance in 2D between points in a single image? Or do you want to get the 3D euclidean distance of two points in a space, that have been defined in two stereo photo's? Because the second approach is a lot more complicated, including camera calibration, coordinate system conversions, mapping to 3D points, ...

StevenPuttemans gravatar imageStevenPuttemans ( 2013-08-02 14:23:52 -0500 )edit

Euclidean distance in 2D between two points in a single image

JnDnl gravatar imageJnDnl ( 2013-08-02 14:59:31 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2013-08-02 15:17:38 -0500

ximobayo gravatar image

So if you know the points with their (x,y) e.g. (x1,y1) and (x2,y2)
the distance is sqrt((x2-x1)^2+(y2-y2)^2)

If you mean the 2d spatial distance in the image.

edit flag offensive delete link more


Yes. The user will define the points over the image, so I will know their coordinates

JnDnl gravatar imageJnDnl ( 2013-08-02 15:34:43 -0500 )edit

answered 2013-08-02 14:07:39 -0500

ximobayo gravatar image

Do you mean spatial distance? What you mean exactly, do you need all the distances between all the points?

edit flag offensive delete link more


Each measure will be made between two points.

JnDnl gravatar imageJnDnl ( 2013-08-02 15:09:20 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-08-02 10:32:35 -0500

Seen: 229 times

Last updated: Aug 02 '13