How to get not RGBA image but RGB image.

Post Reply
Mitsuru Takeda
Posts: 5
Joined: Wed Jan 08, 2020 10:59 pm

How to get not RGBA image but RGB image.

Post by Mitsuru Takeda » Mon Feb 10, 2020 8:11 am

Hi, I want to get RGB image.
But I only know how to get RGBA image. I don't need alpha.

I know this RGBA code works.
cv::Mat result(cv::Size(cameraWidth, cameraHeight), CV_8UC4, cv::Scalar(0));
Frame* frame = frameGroup->GetFrame(0);
frame->Rasterize(cameraWidth, cameraHeight, 0, 32, result.data);

However, this RGB code doesn't work
cv::Mat result(cv::Size(cameraWidth, cameraHeight), CV_8UC3, cv::Scalar(0));
Frame* frame = frameGroup->GetFrame(0);
frame->Rasterize(cameraWidth, cameraHeight, 0, 24, result.data);

Please give me some advice.
Thank you in advance.

Post Reply