[solved] Calculations in RGB565 color space

Just a quick question: if I have a cv::Mat (I code in C) that is RGB565, if I perform any calculation like “cv::resize(destmat, rgb565mat, cv::Size(newWidth, newHeight), 0, 0, cv::INTER_LANCZOS4);” is this OK and will it provide a correct resized RGB565 cv::Mat?
Thank you

Not OK.

RGB565 is considered “packed”. It does not have “channels”. It has one 16 bit channel carrying the packed pixel.

For all kinds of image processing operations, you need a matrix with “channels”.

use cvtColor.

Thanks a lot for your quick answer. I will do so.