Warping Images using cvWarpPerspective Results in Some Parts of the images out of the viewable area

Posted by Birkan Cilingir on Stack Overflow See other posts from Stack Overflow or by Birkan Cilingir
Published on 2010-05-21T22:17:04Z Indexed on 2010/05/21 22:20 UTC
Read the original article Hit count: 1076

Filed under:
|
|
|

Hi,

I am trying to stich two images together.
In order to do so I extracted sift features and find matches on the two images using this C implementation.

http://web.engr.oregonstate.edu/~hess/index.html

After that I found the homography matrix using the matched points.

http://www.ics.forth.gr/~lourakis/homest/

But if I use this Homography Matrix in "cvWarpPerspective" function, some of the parts of the image goes out of the viewable area (negative corrdinates).

To solve this I tried to calculate the bounding box first by piping the four corners of the image through Homography matrix. And move the initial image then warp it. But this caused the warping result to change.

Is there any way for warping an image and keeping it in the viewable area?

I would appreciate any help. Thanks in advance...

© Stack Overflow or respective owner

Related posts about c

    Related posts about c++