I’m looking for the C++ equivalent of cvConvertImage in OpenCV.
cvConvertImage(const CvArr* src, CvArr* dst, int flags=0)
Specifically, I have a cv::Mat image with the red and blue channels flipped, and I wish to swap them back. In cvConvertImage you can do this by setting flags to be CV_CVTIMG_SWAP_RB.
Late answer, but you can use
cv::cvtColor(...)with optionCV_BGR2RGBif you want to swapRandB.If you want more complex operations
mixchannelsis the way to go