ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

cv.GetMat(myIplImage)

Since OpenCV seems to be moving away from IplImages, it would make sense for cv_bridge to do the same. Perhaps that should be ticketed.

click to hide/show revision 2
Additional info for the answer
cv.GetMat(myIplImage)

Since OpenCV seems to be moving away from IplImages, it would make sense for cv_bridge to do the same. Perhaps that should be ticketed.

Edit by @Pi Robot: it also seems necessary to then convert this to a numpy array for other OpenCV functions like cvtColor to work; so the above would become:

np.array(cv.GetMat(myIplImage), dtype=np.uint8)
click to hide/show revision 3
Removed edit by Pi Robot
cv.GetMat(myIplImage)

Since OpenCV seems to be moving away from IplImages, it would make sense for cv_bridge to do the same. Perhaps that should be ticketed.

Edit by @Pi Robot: it also seems necessary to then convert this to a numpy array for other OpenCV functions like cvtColor to work; so the above would become:

np.array(cv.GetMat(myIplImage), dtype=np.uint8)