Re: Help needed in Image Rectification.

Narendra Sisodiya <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
On Sat, Jan 8, 2011 at 12:24 PM, Narendra Sisodiya <
[email protected]> 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

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.