Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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 separeted 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

click to hide/show revision 2
No.2 Revision

How to update Mat with multiple channels?

I have three CV_8U CV_8U Mat objects(Mat r,g,b) objects(Mat r,g,b) representing each one channels of an image. How to update an CV_8UC3 Mat Mat with that separeted separated channels(r, g, b)?

Example: 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);

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 OpenCV for android.Android.

Thanks

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