Ask Your Question

Revision history [back]

How to concat Mat1's top half with Mat2's bottom half

Hi All,

Greeting.

I have a 2 mats, in opencv android

Mat1 = Mat(width,height,CvType.cv.8U); Mat2 = Mat(width,height,CvType.cv.8U);

I did submat on Mat1 & Mat2. Mat3 = Mat1.submat(0,height/2,0,width); Mat4 = Mat2.submat(height/2,height,0,width);

Created Array list Mat5 to hold Mat3 & Mat4.

When i Tried vconcat(Mat5,DstMat); i am getting Assertion failed error. Please tell me whether the approach i did was correct or any thing anything went wrong.

Thanks in Advance.

click to hide/show revision 2
retagged

updated 2018-10-26 05:02:00 -0600

berak gravatar image

How to concat Mat1's top half with Mat2's bottom half

Hi All,

Greeting.

I have a 2 mats, in opencv android

Mat1 = Mat(width,height,CvType.cv.8U); Mat2 = Mat(width,height,CvType.cv.8U);

I did submat on Mat1 & Mat2. Mat3 = Mat1.submat(0,height/2,0,width); Mat4 = Mat2.submat(height/2,height,0,width);

Created Array list Mat5 to hold Mat3 & Mat4.

When i Tried vconcat(Mat5,DstMat); i am getting Assertion failed error. Please tell me whether the approach i did was correct or any thing anything went wrong.

Thanks in Advance.