At an impasse using OpenCV
Hi all,
I have this snippet of code that was copied from one of the tutorials on cv_bridge:
try
{
ROS_INFO("Trying to convert");
cv_ptr = toCvCopy(msg, sensor_msgs::image_encodings::BAYER_BGGR8);
ROS_INFO("Converted");
}
catch (cv_bridge::Exception& e)
{
ROS_INFO("Not Converted");
ROS_ERROR("cv_bridge exception: %s", e.what());
return;
}
And when I run it using a topic published by my camera I run into this error:
[ INFO] [1435952032.594731416]: Trying to convert
OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in type, file /tmp/buildd/ros-indigo-opencv3-3.0.0-0trusty-20150607-1913/modules/core/src/matrix.cpp, line 1837
terminate called after throwing an instance of 'cv::Exception'
what(): /tmp/buildd/ros-indigo-opencv3-3.0.0-0trusty-20150607-1913/modules/core/src/matrix.cpp:1837: error: (-213) Unknown/unsupported array type in function type
Aborted (core dumped)
(The ROS_INFO's are there to show steps and when there program breaks)
Now I know the error is in that line so I tried a few other things to get it to work. When I change the encoding type to something else, in this case bayer_grbg8, I get this error:
[ INFO] [1435952475.576702858]: Step2
[ INFO] [1435952475.576715724]: Trying to convert
[ INFO] [1435952475.576814017]: Not Converted
[ERROR] [1435952475.576841782]: cv_bridge exception: Unsupported conversion from [bayer_bggr8] to [bayer_grbg8]
What are some possible solutions? I don't know how to change the encoding of the camera (Point Grey Blackfly3)