Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

copy small part of mat to another

$
0
0
I can't figure how to copy a part of mat to another mat. ( or to itself) I want for example to copy (or to keep) only the first row of srcMat. I am using : for ( int x = 0; x < height; x++ ) { for ( int y = 0; y < width; y++ ) { destMat = scrMat.at(0,y); // or destMat.at(x,y) = scrMat.at(0,y); } } I am not sure about using: srcMat.copyTo( destMat( Rect( y, 0, srcMat.cols, srcMat.rows ) ) );

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>