[C++] ipcamera -> cv::Map -> RGB24
Hello,
I am using OpenCV for the first time and what i have to do is to convert the image data I get from the camera in RGB24 format. I get the data in a cv::Map in CV_8UC3 format. (that's what i get from the Type() method) I need to convert it in RGB24 format, and i don't know how I can do that from the Map data.
Thank you very much
Roboxx
Which data type does your original image have? Is it already a cv::Mat? cv::cvtColor is normally used to change the types. In your case, the flag COLOR_BGR2RGB could be all you need.
the original data type is 8 bit what i have to do is to create a buffer of raw RGB24 data and i have no idea of the underlying data structure of the cv::Mat and how to to convert it to that raw RGB24 buffer.
The original image is already in the cv::Mat in unsigned 8 bit and 3 channel. I am going to have a look at the COLOR_BGR2RGB flag you're taking about.