

How does RoboRealm computes Perspective Transformation quitana from Germany [20 posts] 
12 years

Hi,
RoboRealm has a module for perspective correction (http://www.roborealm.com/help/Perspective.php).
As i know, one need 4 corresponding points to compute a planar homography/perspective transformation H (3x3 matrix).
In RoboRealm you just "tilt" the image. But the image is just 2D in a 2D space. So how "tilting" is possible.
My question ist:
1)How does RoboRealm actually performs planar homography for perspective correction? Is this some aproximation of "real" homography?
2) What is the parameter "tilt" under the hood?
Thank you for your awnsers!



quitana from Germany [20 posts] 
12 years



Anonymous 
12 years

Quintana,
The perspective module makes some assumptions that simplifies the need for a 4 point homography. Basically, most robots are placed on a flat planar floor so the assumption is that the depth of the two front and two back points are the same (i.e. when you think of the four points being the corners of the image). Plus you know that the y values of the coordinates are also in pairs. Given this planar assumption what requires 4 x,y points or 8 values is reduced to a single value that reflects the tilt of the plane or the amount of perspective correction that needs to be applied to the image. Since we require much fewer values a human can quite easily figure out what is the right value. Most will use this module while looking at square tiles and tweaking the values until things look square.
If you are looking for arbitrary points see the Affine Transform module which has an interface for those 4 points or the Transform module that allows you to enter the homographic matrix in order to view the transform.
http://www.roborealm.com/help/Affine.php
http://www.roborealm.com/help/Transform_Image.php
Not sure which image you are referring to in the plus.maths.org site.
STeven.



quitana from Germany [20 posts] 
12 years

Hi Steven,
Thank you very much for your answer. I did a slightly different way. I computed the homography via OpenCV and used the OpenCV script via a Pipe as it is discribed here: http://www.roborealm.com/help/Pipe_Program.php First I had problem with pixel order but finaly i got it.
Now i have a question: Is it possible to change the image size (I want to transform to a wider view). If you could give me a YES or NO i could better define and find the error.
Thank you!



Anonymous 
12 years

Yes, you should be able to do that. You can either use the Scale module after the Transform module or you can multiply the upper left 2x3 of the matrix with the scale factor. (or the upper 3x2 depending on the matrix orientation). Is that what you were looking for?
STeven.



Anonymous 
12 years

Hi Steven,
I have explained my question poorly:)
Is it possible to change the size of the image IN THE PIPE PROGRAM?
So can I delete the robo image and "new" another, wider robo image in the Pipe and return a bigger image to robo?
Thanks again.

