1

I have a problem in which i have a stationary video camera in a room and several videos from it, i need to transform the image coordinates into world coordinates.

What i know: 1. all the measurements of the room. 2. 16 image coordinates and their respected world coordinates.

The problem i encounter: At first i thought i just need to create a geometric transformation (According to http://xenia.media.mit.edu/~cwren/interpolator/), but i have a problem since the edge of the room are distorted in the image, and i cant calibrate the camera because i can't get a hold of the room or the camera.

Is there anyway i can overcome those difficulties and measure the distance in the room with some accuracy?

Thanks

Kozolovska
  • 1,090
  • 6
  • 14
  • In the general case that is not possible with a typical single, fixed camera. Even with a calibrated camera you are only able to measure viewing directions or angles between them. Taking an image of a scene is basically a projective transformation from a 3D space to a 2D plane. You unavoidably lose information.To measure depth, you would need a second camera for stereo (depth from stereo) or you have to vary the focus of the camera (depth from focus) or you have to add a constraint e.g. the points you want to measure are on the same plane (this is of course an incomplete list of examples). – gfkri Mar 19 '15 at 19:53
  • See http://stackoverflow.com/questions/27278453/can-opencv-or-similar-be-used-to-measure-a-picture-frame-from-a-photo/27283255#27283255 and the paper cited therein for a survey of what is possible from single view. – Francesco Callari Mar 19 '15 at 21:34
  • @gfkri, the points i'm interested in are on the same plane (floor) even though the object i'm tracking does have a height , but all i care about are the real world coordinates in the floor (X,Y). How would i do so?Thanks! – Kozolovska Mar 21 '15 at 17:23

1 Answers1

1

You can calibrate the distortion of the camera by extracting first the edges of your room and then finding the best set of distortion parameters (that will minimize edge distortion). There are few works that implement this approach though:

  • you can find a skeleton of distortion estimation procedure in R. Szeliski's book, but without an implementation;
  • alternatively, you can find a method + implementation (+ an online demo where you can upload your images) on IPOL.

Regarding the perspective distortion, after removing the lens distortion just proceed with the link that you have found by applying this method to the image of the four corners of the room floor. This will give you the mapping between an image pixel and a ground pixel (and thus the object world coordinate, assuning you only want the X-Y coordinates). If you need the height measurement, then you need to find an object with a known height in your images to calibrate it too.

sansuiso
  • 9,259
  • 1
  • 40
  • 58