1

I have two questions which could be related:

1.) I would like to estimate distances between objects which are positioned in one plane from a photo. Geometrical shape of one object in the photo is rectangular and its dimensions are known, but there is no information on the photo (Camera focal length, photo angle, senor size etc…). For example, say I have the following PCB photo and dimensions of the rectangular chip are known to be 20x10mm, all objects lie in a plane. Is it even possible to estimate the distances (in top view) between other PCB components ?

PCB photo

In this particular case, maximum distance error of 2-3mm would be acceptable.

2.) Say I have similar PCB photo like the above, where I have one feature (object) for which I know it is rectangular shaped. I would like to transform the image perspective so that the object looks rectangular. I have tried imageJ (Fiji) and Interactive Perspective Plugin for this task. First I display rectangular grid over the image and then manually transform the image using the plugin till the object does not appear rectangular. But for some photo angles I find it impossible to manually adjust the control points in order to get rectangular object shape. Does somebody know alternative approach using imageJ (Fiji) or Octave ? A solution in python would also be ok, although I don’t have much python experience (just recently installed Anaconda with Spyder).

Spektre
  • 49,595
  • 11
  • 110
  • 380
miquo
  • 75
  • 1
  • 6
  • see [Which is the best way to estimate measure of photographed things?](http://stackoverflow.com/a/34085449/2521214) and the linked question at its bottom too. You can use connectors as your etalon. – Spektre Jul 01 '16 at 06:55

1 Answers1

-2

A few years ago, I created a software that seems good for you. It corrects perspective transforming a quadrilateral to a rectangle.

Here is the result:
Motherboard as a rectangle,
where you can measure distances.

Maximilian Ast
  • 3,369
  • 12
  • 36
  • 47
Raymond
  • 1
  • 1