Pointer image multi-channel access [closed]
Using that simple program how can I access to different channels:
void imageCallback(const sensor_msgs::ImageConstPtr& msg)
{
cv_bridge::CvImagePtr cv_ptr;
try
{
cv_ptr = cv_bridge::toCvCopy(msg, sensor_msgs::image_encodings::BGR8);
}
catch (cv_bridge::Exception& e)
{
ROS_ERROR("cv_bridge exception: %s", e.what());
return;
}
cv::imshow("OpenCV viewer uEye RGB", cv_ptr->image);
cv::waitKey(3);
}
How can I access to different channel using cv_ptr ?
Actually this is a ROS problem and not an OpenCV problem even it does work based on OpenCV. These types are NOT available in OpenCV. I suggest addressing the proper forum for this.