How to update Mat with multiple channels?
I have three CV_8U
Mat objects(Mat r,g,b
) representing each one channels of an image. How to update an CV_8UC3 Mat
with that separated channels(r, g, b)?
Example:
Mat rgb = new Mat(height, width, CvType.CV_8UC3);
Mat r = new Mat(height, width, CvType.CV_8U);
Mat g = new Mat(height, width, CvType.CV_8U);
Mat b = new Mat(height, width, CvType.CV_8U);
...Do some process in r, g and b objects...
Now how I can update a red channel of 'rgb' with 'r' object, a green channel of 'rgb' with 'g' and a blue channel with 'b'?
Obs: I'm using OpenCV for Android.
Thanks