[Image-SIG] Help needed in Image Rectification.

Narendra Sisodiya narendra at narendrasisodiya.com
Sat Jan 8 08:02:48 CET 2011


On Sat, Jan 8, 2011 at 12:24 PM, Narendra Sisodiya <
narendra at narendrasisodiya.com> wrote:

>     I want your guidance in following problem.
>
> I have a Rectangle with a known height and width. (aspect ration is fixed)
> It has a plane surface. Something like cardboard. Or Rectangle Drawn on
> wall.
> I am now taking image of this rectangle from webcam.
> After taking image of this rectangle from webcam, rectangle occupy small
> area on image and that is in a form of quadrilateral inside image. I can
> calculate the XY location of Rectangle from image , So I have Following
> Matrix
>
> Co-ordinate on image -> Actual real world co-ordinate
> _______________________________________
> X1 Y1                         -> 0 , 0
> X2 Y2                         -> width, 0
> X3 Y3                         -> 0, height
> X4 Y4                         -> width, height
> ________________________________________
>
> width and height of rectangle is known because I can measure this real
> object
> X1 Y1 to X4 Y4 are 4 co-ordinate of this object in image. Because it is a
> projective transformation, this will be in a shaped of quadrilateral.
>
>
> Now I want to know a matrix operation or any formula, by which I can
> convert a given X Y of image into corresponding co-ordinate on rectangle.
> I think, this is known as homography. seeing on web, i can find complex
> description and formulas which i am unable to understand.
>
> May you give me exact formula for how to do it.
>
> Thanks !
>
>

Also - This code will be useful - I am unable to understand it fully - But i
guess , this is doing exactly what i want.

http://wiiwhiteboard.cvs.sourceforge.net/viewvc/wiiwhiteboard/source/linux/perspective.py?view=markup
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20110108/9671b324/attachment.html>


More information about the Image-SIG mailing list