pzo
pzo

Reputation: 2157

Calculating distance to plane and square's corners from image

I'm taking camera images of white paper with black square that has specified size (e.g. 10 cm). Image is taken with different distance to paper plane and with different camera angle.

Now I need to deduce from those images camera rotation, camera translation and distance to paper plane as well distance to squares corners.

I'm quite new to image processing so maybe somebody can direct me to some keywords, algorithms or basic math to look for or even OpenCV functions to investigate. On the paper there will be always some primitive objects like squares so I don't need some algorithms that will work any arbitary image but I will definitely need a fast algorithm.

Upvotes: 4

Views: 1433

Answers (1)

Jav_Rock
Jav_Rock

Reputation: 22245

To calculate camera rotation and translation you need to follow sevral steps that are always the same in this kind of problems:

  • Run a detector on a sample of the image (FAST)
  • Run a detector on all images you want to process, could be a frame captured from video.
  • Generate descriptors of points detected (SIFT).
  • Match descriptors with a matcher (flannMatcher)
  • Find homography form matched pairs (findHomography())
  • Find camera pose from homography.

You have some links to the methods in this tutorial.

Upvotes: 4

Related Questions