1

I want to verify the distance between two points C and D (CD) in a perpective image.

The picture is taken in my living room. Dimension of each tiles is 0.6x0.6 (in meters).

enter image description here

Real world measurements:

Distance between point A and point D (AD) = 1.8 meters. Distance between point A and point B (AB) = 0.6 meters

Image plane coordinates:

A' = (232, 613)

B' = (221, 341)

C' = (215, 189)

D' = (210, 98)

enter image description here

I used cross ratios to calculate CD.

R{A', B', C', D'} = 1.316

and

R{A,B,C,D} = (AC * BD)/(AD * BC)

After calculation, CD is 0.584m (Instead of 0.6m)

Questions:

1) Is the method I'm following to verify CD correct?

2) Should I consider the angle between A and D (which is not 90 deg)

3) Should I look into vanishing points here?

4) If we don't know the real world distance between A and B and know only AC and AD, is it possible to calculate the distance between either B and A or B and D?

5) The difference 0.016m in the above calculation, is it acceptable?

I'm newbie to Projective geometry. Please let me know if I'm doing anything wrong.

Francesco Callari
  • 11,300
  • 2
  • 25
  • 40
Sarweshkumar C R
  • 543
  • 1
  • 8
  • 19
  • Not sure whether your calculation is correct but the error of 16 mm seems a bit large since the pixel resolution along C to D is about 6mm per pixel. But when the measured image points of C and D are off by 1 pixel each to opposite direction you already have 12mm errors. So if you need higher precision, you may have to use higher resolution cameras and/or subpixel position estimation. – hiroki Jul 02 '17 at 16:11
  • Resolution of the original image what I had captured from my phone is 2340x4160 pixels and 1 pixel represents roughly 0.7mm. And cross-ratio for the original image captured is 1.3323. I resized the original image, so that openCV can display the image in a window. Resolution of resized image is 468x832 pixels and 1 pixel represents roughly 3.5mm. – Sarweshkumar C R Jul 04 '17 at 10:42

1 Answers1

1
  1. The method is correct, though I would use a homography instead.
  2. Angle is irrelevant, crossratio is projectively invariant
  3. Not necessary.
  4. Yes, after estimating the homography between the plane and its image, every distance on the plane can be estimated from the image, provided at least one is known to resolve scale.
  5. "Acceptable" is in the eye of the beholder, since it depends on your application. A 2.67% relative error may be OK for your pasta recipe, but if you are a welder intent on joining beams on a bridge, anything more than a few mm will be too much.

Suggestion - measure more points, remove nonlinear distortion (the line at the bottom of the wall in the upper portion of your image looks bent), estimate homography.

Francesco Callari
  • 11,300
  • 2
  • 25
  • 40