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

I know I should use cv::Mat, in fact I want to use it. But specifically in this problem I cannot use it. (see: http://tech.dir.groups.yahoo.com/group/OpenCV/message/81826).

Anyway I found a (not elegant) way to convert it :

            for(int ko=0; ko< frame_size.width*frame_size.height ; ko++)

{ image2->imageData[ko] = (char) cv_ptr->image.data[ko*3]; }

I know I should use cv::Mat, in fact I want to use it. But specifically in this problem I cannot use it. (see: http://tech.dir.groups.yahoo.com/group/OpenCV/message/81826).

Anyway I found a (not elegant) way to convert it :

  for(int ko=0; ko< frame_size.width*frame_size.height ; ko++)

{ image2->imageData[ko] = (char) cv_ptr->image.data[ko*3]; }

}