title: Warping Images using cvWarpPerspective Results in Some Parts of the images out of the viewable area
body: <p>I am trying to stich two images together.<br>
  In order to do so I extracted sift features and find matches on the two images using this C implementation.  </p>
  
  <p><a href="http://web.engr.oregonstate.edu/~hess/index.html" rel="nofollow noreferrer">http://web.engr.oregonstate.edu/~hess/index.html</a>  </p>
  
  <p>After that I found the homography matrix using the matched points.</p>
  
  <p><a href="http://www.ics.forth.gr/~lourakis/homest/" rel="nofollow noreferrer">http://www.ics.forth.gr/~lourakis/homest/</a></p>
  
  <p>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). </p>
  
  <p>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.</p>
  
  <p>Is there any way for warping an image and keeping it in the viewable area?</p>
  
  <p>I would appreciate any help. Thanks in advance...</p>