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

Revision history [back]

click to hide/show revision 1
initial version

In the code on your image publisher side you need to fill the encoding. After

 cv_ptr->image = cv::imread("socio_32.jpg",CV_LOAD_IMAGE_COLOR);

add a line like:

cv_ptr->encoding = "bgr8";

Note that opencv's highgui (e. g. imread, imwrite) functions by default assume BGR8 color space.