Ask Your Question

Coordinate System Transform

asked 2014-11-19 11:09:35 -0500

defunktlemon gravatar image

Hi. Hi. I'm just gonna throw this one out there to see if anyone will knock around some ideas with me.

I have a camera which has been calibrated and it takes shots of the same scene with the same type of objects in to analyse if there are any differences on the objects. Lets say the top_left of the image is (0,0), top_right (60,0), bottom_left (0,50) and bottom_right (60,50), for example. If someone comes along and knocks the camera then the image plane will be in different coordinates. I would like to find a way for the system to transform the coordinates, to allow for this coordinate difference in the next series of images captured so that they appear the same as the original ones before the camera knock, given that there may now need transformations in rotation, scale, translation and maybe even warping has occurred.

The camera runs in different modes • Stereo camera • Laser and camera • SRS camera internally there are 3 calibrations (one for each of the above)

The end result is that after applying the target check routine the camera should give identical results as if the camera hadn’t been moved or replaced.

So, if anyone has any suggestions on how to go about achieving this that would be cool - holler back on this line. Thanks

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2014-11-19 18:35:24 -0500


I am assuming that your object is flat because otherwise you can't find an homography transformation (rotation, scale, translation) which put the object back in the same position : the perspective will change the object 2D projection (for example, one face of the object can be hidden)...

If your object is flat, this tutorial will probably help you! If not, please ask for details!

edit flag offensive delete link more


Hi. Thanks for your response petititi. I'm not actually concerned with any objects in the scene just yet. The purpose is to negate camera knock, so if the camera is moved, then an algorithm compensates for that difference. So, the algorithm will have the offset values from the template image and the images taken after camera movement has occurred and can then perform the necessary homograph translations on it. I guess I can use three corner points on each of the images as that makes up a plane on each. Haven't heard of a homography transformation before - I guess it must be an affine transformation? I think this would probably be the standard way to perform the operation, with an affine transformation matrix, but I'm also wondering whether there is another option?

defunktlemon gravatar imagedefunktlemon ( 2014-11-20 03:24:26 -0500 )edit

An homography is like an affine transformation, but allows perspective deformations...

If you just want to correct the motion of camera, you can follow the tutorial I posted before... Instead of matching points from one object image to "live" image, you will match points from first image of your sequence to current image. Then, using the homography computed by findHomography, you will be able to correct the transformation using warpPerspective. Depending the way you match your points, you will probably need to invert the transformation (or use the WARP_INVERSE_MAP flag).

petititi gravatar imagepetititi ( 2014-11-20 06:57:15 -0500 )edit

Thanks. Unfortunately, there is no theory or explanation on that tutorial which makes it hard for a novice in image processing and programming, such as myself, to follow it. I haven't actually started using OpenCV yet either, but would really like to as it's one of the few places in the image processing world which seems to have an open forum; which to me is a very powerful thing. I do appreciate your comments very much, however, as I am still learning some from the experience. I'm going to try and take a look at it over the weekend, time allowing. Will have to see how many chores the girlfriend (weekend boss) has planned for me first :). Thanks again petititi.

defunktlemon gravatar imagedefunktlemon ( 2014-11-21 03:15:14 -0500 )edit

Question Tools


Asked: 2014-11-19 11:09:35 -0500

Seen: 1,280 times

Last updated: Nov 20 '14