Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

How to initialize a Mat object with zeros

$
0
0
I want to create a Mat object initially initialized with zeros, and i want to avoid doing that using two nested for-loops. is there any alternative solution to the one posted below? **code**: this.mDest = new Mat(this.mMatEdges.rows(), this.mMatEdges.cols(), CvType.CV_8U); for (int i = 0; i < this.mMatEdges.size().height; i++) { for (int j = 0; j < this.mMatEdges.size().width; j++) { this.mDest.put(i, j, 0); } }

Viewing all articles
Browse latest Browse all 19555

Trending Articles



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