Hi Adam<br><br>Afraid this is a bug... please raise a ticket in the ROS trac against image_pipeline, and assign it to me, jamesb<br><br>Thanks.<br><br><div class="gmail_quote">On Tue, Apr 6, 2010 at 11:26 AM, Adam Leeper <span dir="ltr"><<a href="mailto:aleeper@stanford.edu">aleeper@stanford.edu</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-<br><br>I've successfully used cameracalibrator.py on a 640x480 image stream, but now I'm trying to use it on a 320x240 image feed. I do<br>
<br>$rosrun camera_calibration cameracalibrator.py --size 7x6 --square 0.0127 image:=/my_camera/image camera:=/my_camera<br>
<br>like the tutorial says, but it gives the following error:<br><br>Exception in thread Thread-4:<br>Traceback (most recent call last):<br>  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner<br>

    self.run()<br>  File "/opt/ros/boxturtle/stacks/image_pipeline/camera_calibration/nodes/cameracalibrator.py", line 59, in run<br>    self.function(m)<br>  File "/opt/ros/boxturtle/stacks/image_pipeline/camera_calibration/nodes/cameracalibrator.py", line 147, in handle_monocular<br>

    scrib = cv.CreateMat(self.height / scale, self.width / scale, cv.GetElemType(rgb))<br>ZeroDivisionError: integer division or modulo by zero<br><br><br>I think the issue is line 144 in cameracalibrator.py, <br>scale = int(math.ceil(self.width / 640))<br>

<br>but if I try doing either 640.0, or changing it to 320, I get this error<br><br>Traceback (most recent call last):<br>  File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner<br>    self.run()<br>

  File "/opt/ros/boxturtle/stacks/image_pipeline/camera_calibration/nodes/cameracalibrator.py", line 59, in run<br>    self.function(m)<br>  File "/opt/ros/boxturtle/stacks/image_pipeline/camera_calibration/nodes/cameracalibrator.py", line 187, in handle_monocular<br>

    self.redraw_monocular(scrib, rgb)<br>  File "/opt/ros/boxturtle/stacks/image_pipeline/camera_calibration/nodes/cameracalibrator.py", line 410, in redraw_monocular<br>    self.buttons(display)<br>  File "/opt/ros/boxturtle/stacks/image_pipeline/camera_calibration/nodes/cameracalibrator.py", line 389, in buttons<br>

    self.button(cv.GetSubRect(display, (x,180,100,100)), "CALIBRATE", self.goodenough)<br>error<br><br>Any ideas? <br><br>Thanks!<br>--Adam<br><font color="#888888"><br><br><br><br><br clear="all">Adam Leeper<br>
Stanford University<br>
<a href="mailto:aleeper@stanford.edu" target="_blank">aleeper@stanford.edu</a><br>719.358.3804<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><br clear="all"><br>-- <br>J.<br><br>