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 (eg 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.


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.

    链接地址: http://www.djcxy.com/p/79630.html

    上一篇: 检测图像中行的一种好方法?

    下一篇: 计算从图像到平面和方形角的距离