Pointer image multi-channel access [closed]

asked 2014-07-24 05:15:51 -0500

ROSpioneer gravatar image

Using that simple program how can I access to different channels:

void imageCallback(const sensor_msgs::ImageConstPtr& msg)

        cv_bridge::CvImagePtr cv_ptr;
            cv_ptr = cv_bridge::toCvCopy(msg, sensor_msgs::image_encodings::BGR8);

        catch (cv_bridge::Exception& e)
            ROS_ERROR("cv_bridge exception: %s", e.what());

        cv::imshow("OpenCV viewer uEye RGB", cv_ptr->image);


How can I access to different channel using cv_ptr ?

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by StevenPuttemans
close date 2014-07-24 09:38:17.946064


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.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-07-24 09:37:48 -0500 )edit