I have a bitmap in ARGB format in android
Bitmap bitmapRGB=Bitmap.createBitmap(capturedImageMat.cols(),capturedImageMat.rows(),Bitmap.Config.ARGB_8888);
I send this image into Android NDK part to process the image using Opencv libaray in C++. Now i want to change the ARGB format into RGB format and then change it to BGR because Opencv uses BGR format. At first i want to change using cvtColor method in opencv but there is no ARGB2RGB conversion. I also tried to see how opencv team change BGRA2BGR in github and based on that to write a code to change ARGB2RGB but am unable to find the function in opencv source code.
Thanks to Alexander i swapped the image channels using mixChannels method in opencv. When we use bitmapToMat method the ARGB image format of android is changed into RGBA image format in opencv mat. The code i used to separate the RGBA image format into two different images i.e RGB and A
cv::Mat inputImage = *(cv::Mat *) inputImageAddress_;
cv::Mat inputImageBGR(inputImage.rows, inputImage.cols,CV_8UC3);
cv::Mat inputImageALPHA(inputImage.rows, inputImage.cols,CV_8UC1);
int from_to[]={0,2, 1,1, 2,0, 3,3};
Mat out[]={inputImageBGR,inputImageALPHA};
cv::mixChannels(&inputImage,1,out,2,from_to,4);