Defining a 3D scene from a circle photo

Given a photo containing a circle, such as this photo of a fountain: fountain photo

Is it possible to determine the three-dimensional position and rotation of the fountain in relation to the camera?

I understand that we need to determine the scale, so let's say that the fountain has a width of 2 m (the diameter of the circle consisting of the inner edge of the fountain is 2 m).

So, if a circle is an ideal circle and defines a diameter of up to 2 m, is it possible to determine how the circle and the camera are spatially connected? I do not know a single camera matrix or anything else, the only information I have is the image.

I specifically want to determine the 3D coordinates of a given pixel on the edge of the fountain.

What will be the math and / or OpenCV code for this?

+4
source share
1 answer

A circle with a perspective is an ellipse. Therefore, you mainly need an ellipse detector. This algorithm should work:

  • Detection of all ellipses in a given image.
  • Filter ellipses that you think are not circles by origin. (This is not possible using only one camera, so you should depend on previous knowledge. Something like this you know that you are taking a photo for a circle).
  • mmm , , ! , . , :

https://www.researchgate.net/publication/265212988_Homography_estimation_using_one_ellipse_correspondence_and_minimal_additional_information

http://www.macs.hw.ac.uk/bmvc2006/papers/306.pdf

, , !

+3

Source: https://habr.com/ru/post/1624807/


All Articles