Or, if you do want to change the scaling post-calibration, you can change the P matrix in the camera_info by scaling the P(0,0), P(0,3), P(1,1) entries. You can find the value to scale by with a little trial and error.<br>
<br><div class="gmail_quote">On Thu, Apr 8, 2010 at 12:32 PM, James Bowman <span dir="ltr"><<a href="mailto:jamesb@willowgarage.com">jamesb@willowgarage.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Dave,<br><br>you can actually use the slider in the  cameracalibration app to do this border operation for you.  Tutorial:<br><br><a href="http://www.ros.org/wiki/camera_calibration/Tutorials/MonocularCalibration" target="_blank">http://www.ros.org/wiki/camera_calibration/Tutorials/MonocularCalibration</a><br>

<br>I've just added a paragraph (copied from the corresponding StereoCalibration tutorial) to make this clearer:<br><br><div style="margin-left: 40px;">After a successful calibration, you can use the slider at the top of
the calibration window to change the size of the rectified image. A
scale of 0.0 means that the image is sized so that all pixels in the
rectified image are valid. The rectified image has no border, but some
pixels from the original image are discarded. A scale of 1.0 means that
all pixels in the original image are visible, but the rectified image
has black borders where there are no input pixels in the original
image.<br></div><div class="gmail_quote"><div class="im"><br>On Wed, Apr 7, 2010 at 3:51 PM, David Feil-Seifer <span dir="ltr"><<a href="mailto:david.feilseifer@gmail.com" target="_blank">david.feilseifer@gmail.com</a>></span> wrote:<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
I am trying to use image_proc to rectify an image which is just a<br>
camera image that has a border added around. The purpose is to make a<br>
rectified image that includes all of the image (including what does<br>
not strictly fit into a square), not just the centermost part. To do<br>
this I made a new node image_letterboxer (included source) to add the<br>
border and to adjust the camera calibration cx and cy params to<br>
reflect the new center of the image. This has worked when not using<br>
image_proc to do the undistort.<br>
<br>
However, when I try to use this node with image_proc, it does not work<br>
at all. I dug a little into the source and found that the image<br>
transport is subscribing to the new image topics correctly, and that<br>
image transport is registering that subscription, but no callbacks are<br>
being called. My image_letterboxer node works well enough so that<br>
image_view can display the new image_raw topic with the letterboxed<br>
image, but image_proc does not work, though it does work on the camera<br>
itself.<br>
<br>
I assume that the problem is in the image_letterboxer node, but I<br>
cannot figure out what I did wrong. Is there some flaw in the way that<br>
I'm using image_transport to publish the images? Or is there something<br>
wrong with image_proc?<br>
<br>
Thanks in advance,<br>
-Dave<br>
<br></div></div><div class="im">_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></div></blockquote></div><br><br clear="all"><br>-- <br><font color="#888888">J.<br><br>
</font><br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br>