Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

CV::MAT assignment operator "="

I am comfused by the following pseudocode:

cv::mat a(row,col,datatype); /* fill a */ cv::mat b(row,col,datatype);//allocate memory for b, b has same size with a

for(int i=0; i< a.rows; i++) {

b.row(i) = a.row(i);//for each line

}

does b shares the same date with a?

CV::MAT assignment operator "="

I am comfused by the following pseudocode:

cv::mat a(row,col,datatype); /* a(row,col,datatype);

/*

codes fill a */ data in a

*/

cv::mat b(row,col,datatype);//allocate memory for b, b has same size with a

for(int i=0; i< a.rows; i++) {

b.row(i) = a.row(i);//for each line

}

does b shares the same date with a?

click to hide/show revision 3
None

updated 2018-05-10 04:41:33 -0600

berak gravatar image

CV::MAT assignment operator "="

I am comfused confused by the following pseudocode:

cv::mat a(row,col,datatype);

cv::Mat a(row,col,datatype);
 /*
 

/*

codes fill data in a

a */

*/

cv::mat cv::Mat b(row,col,datatype);//allocate memory for b, b has same size with a

a

for(int i=0; i< a.rows; i++) {

{ b.row(i) = a.row(i);//for each line

}

line }

does b shares the same date with a?