Thanks David, this was a bug in image_geometry. It's now fixed on trunk, issue <a href="https://code.ros.org/trac/ros-pkg/ticket/4053">#4053</a>.<br><br>Patrick<br><br><div class="gmail_quote">On Sun, May 2, 2010 at 3:16 AM, David Feil-Seifer <span dir="ltr"><<a href="mailto:david.feilseifer@gmail.com">david.feilseifer@gmail.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;">When using the PinholeCameraModel class, I'm getting the following<br>
runtime error:<br>
<br>
OpenCV Error: Assertion failed (src.isContinuous() && src.depth() ==<br>
CV_32F && ((src.rows == 1 && src.channels() == 2) ||<br>
src.cols*src.channels() == 2)) in undistortPoints, file<br>
/home/dfseifer/ros/stacks/vision_opencv/opencv2/build/opencv-svn/src/cv/cvundistort.cpp,<br>
line 383<br>
<br>
with the following code:<br>
<br>
          cv::Point2d uv;<br>
          uv.x = b.x; uv.y = b.y; //valid image coords<br>
          cv::Point2d uvrect;<br>
          pcam_.rectifyPoint( uv, uvrect );<br>
<br>
I made this error go away when I changed the rectifyPoint section to<br>
the following:<br>
<br>
<br>
  const cv::Mat src_pt(1, 1, CV_32FC2, const_cast<double*>(&uv_raw.x));<br>
  cv::Mat dst_pt(1, 1, CV_32FC2, &uv_rect.x);<br>
  cv::undistortPoints(src_pt, dst_pt, K_, D_, R_, P_);<br>
<br>
where CV_32FC2 used to be CV_64FC2<br>
<br>
I am using box_turtle release (updated today) with Ubuntu 10.04.<br>
<br>
My question is, was this a bug in the image_geometry package, or was<br>
my code wrong?<br>
<br>
Thanks as always,<br>
-Dave<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>
</blockquote></div><br>