November 2018
Beginner
310 pages
7h 25m
English
Another template class that is very important and widely used in OpenCV is the template class for specifying the size of an image or rectangle—Size. This class adds two members, width and height, and the useful area() function. In the following sample, we can see a number of ways of using size:
Size s(100,100);Mat img=Mat::zeros(s, CV_8UC1); // 100 by 100 single channel matrixs.width= 200;int area= s.area(); returns 100x200
Read now
Unlock full access