Ask Your Question

Revision history [back]

I have tried the above solution. But it didn't work out for me. So i came up with an alternative. The solution is mentioned over down. Hope you find it useful :). Happy Coding!!!

Mat B(4,2,CV_8UC1,Scalar::all(1) ); cout<<b&lt;<endl&lt;<b.row(0).col(0);< p="">

O/p :

[ 1, 1; 1, 1; 1, 1; 1, 1] [ 1]

I have tried the above solution. But it didn't work out for me. So i came up with an alternative. The solution is mentioned over down. Hope you find it useful :). Happy Coding!!!

Mat B(4,2,CV_8UC1,Scalar::all(1) );
cout<<b&lt;<endl&lt;<b.row(0).col(0);< p="">
cout<<B<<endl<<B.row(0).col(0);
 

O/p :

:

[ 1, 1; 1, 1; 1, 1; 1, 1] [ 1]

1]