0

I am working on a Computer Vision problem that detects and compares the real length of an object and does something accordingly. I have done a lot of work on detection and it seems good enough at this stage but am stuck now due to this problem:
If I click a picture of a real world entity of some fixed length(e.g. a 15 cm ruler) from different android phones standing at the almost identical position and keep the phones almost vertical every time. I know their respective camera and screen resolutions, PPI , focal lengths. The lengths(in pixels) I receive are obviously different and are non- comparable even when I take each image to a common resolution and a common PPI.
Is there a way such that I can normalise so that the lengths (in pixels) from different phones can be compared to a common standard. It would be great if someone can suggest me way to figure out the conversions I need to normalise.
P.S: I am using front camera for the application(If that makes a difference anyway). I have tried this and found that two phones that had same PPI, same camera and screen resolutions also recorded different lengths of the object. I can guess this is probably due to focal length and sensor size. Please include any extra parameters if you think it helps.

Abhyudai
  • 826
  • 7
  • 16

1 Answers1

0

If I am understanding your question correctly, you are saying that you have detected an object (phone) in the image and also an object of known real-world length (e.g. ruler of 15cm). Now, you want to use a ratio of the length of the ruler in pixels and the rulers true length with the length of the phone in pixels to calculate the true length of the phone.

Check out this paper on single-view metrology: https://www.cs.cmu.edu/~ph/869/papers/Criminisi99.pdf

If you don't like to read papers, you can also find the equation in these slides (look at slides titled cross-ratio and measuring height): https://courses.engr.illinois.edu/cs445/fa2015/lectures/Lecture%2013%20-%20Camera%20Model%20and%20Single%20View%20Metrology%20-%20CP%20Fall%202015.pdf

There are other lecture slides that cover the same topic that can be found once you know that you should be googling for "Single View Metrology".

Hope that helps!

Jomnipotent17
  • 451
  • 7
  • 23
  • The object detected in image is not phone but the 15 cm ruler. – Abhyudai Oct 07 '16 at 03:22
  • Oh okay. I understand your comment. I am a little unsure about what you actually want to get out. Do you want to estimate the focal length of each camera? Can you maybe elaborate a little on the more general goal of this. – Jomnipotent17 Oct 07 '16 at 20:46
  • i wanted to compare the lengths of rulers as seen in images obtained from the different android camera's so that I can build a uniform matrix for further calculations. – Abhyudai Oct 07 '16 at 20:49