Ask Your Question

napalm's profile - activity

2020-10-20 12:12:33 -0600 received badge  Nice Question (source)
2020-06-10 09:06:55 -0600 received badge  Famous Question (source)
2016-06-16 12:14:59 -0600 received badge  Notable Question (source)
2015-07-23 14:47:35 -0600 received badge  Popular Question (source)
2012-09-04 15:30:23 -0600 received badge  Student (source)
2012-09-04 09:30:13 -0600 asked a question 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