openni_camera depth image opencv
Hi
I am Using opencv 2.2 and cv::bridge out of the ros diamondback deb packages. I changed the Makefile of opencv to get a newer version of opencv (Revision 5427)
I convert the const sensor_msgs::ImageConstPt
to cv_bridge::CvImagePtr
with
cv_ptr_depth_ = cv_bridge::toCvCopy(depth_image_msgs, sensor_msgs::image_encodings::TYPE_32FC1);
With cv::VideoWriter
I want to store the depth image as an avi file. That works fine for the rgb image that is converted to sensor_msgs::image_encodings::BGR8
but not for the depth image. The cv::VideoWriter
needs images with depth = IPL_DEPTH_8U and nChannels = 1.
But I cannot convert the 32FC1 type in 8UC1
How can I handle this problem?
Thanks Stefan