title: OpenCV cvRemap Cropping Image
body: <p>So I am very new to OpenCV (2.1), so please keep that in mind.</p>
  
  <p>So I managed to calibrate my cheap web camera that I am using (with a <strong>wide angle</strong> attachment), using the checkerboard calibration method to produce the intrinsic and distortion coefficients. </p>
  
  <p>I then have no trouble feeding these values back in and producing image maps, which I then apply to a video feed to correct the incoming images. </p>
  
  <p>I run into an issue however. I know when it is warping/correcting the image, it creates several skewed sections, and then formats the image to crop out any black areas. My question then is can I view the complete warped image, including some regions that have black areas? Below is an example of the black regions with skewed sections I was trying to convey if my terminology was off: </p>
  
  <p>An image better conveying the regions I am talking about can be <a href="http://photo.net/learn/fisheye/fe06.jpg" rel="nofollow noreferrer" title="correcting fisheye distortion">found here</a>! This image was discovered in this <a href="https://stackoverflow.com/questions/2477774/correcting-fisheye-distortion-programmatically" title="correcting fisheye distortion">post</a>.</p>
  
  <p><strong>Currently:</strong> The cvRemap() returns basically the yellow box in the image linked above, but I want to see the whole image as there is relevant data I am looking to get out of it.</p>
  
  <p><strong>What I've tried:</strong>  Applying a scale conversion to the image map to fit the complete image (including stretched parts) into frame</p>
  
  <pre><code>        CvMat *intrinsic = (CvMat*)cvLoad( "Intrinsics.xml" );
          CvMat *distortion = (CvMat*)cvLoad( "Distortion.xml" );
  
          cvInitUndistortMap( intrinsic, distortion, mapx, mapy );
  
          cvConvertScale(mapx, mapx, 1.25, -shift_x);   // Some sort of scale conversion
          cvConvertScale(mapy, mapy, 1.25, -shift_y);   // applied to the image map
  
          cvRemap(distorted,undistorted,mapx,mapy);
  </code></pre>
  
  <p>The cvConvertScale, when I think I have aligned the x/y shift correctly (guess/checking), is somehow distorting the image map making the correction useless. There might be some math involved here I am not correctly following/understanding.</p>
  
  <p>Does anyone have any other suggestions to solve this problem, or what I might be doing wrong? I've also tried trying to write my own code to fix distortion issues, but lets just say OpenCV knows already how to do it well.</p>