官术网_书友最值得收藏!

Size object type

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 matrix
s.width= 200;
int area= s.area(); returns 100x200
主站蜘蛛池模板: 喀喇沁旗| 普格县| 贵南县| 朝阳市| 五莲县| 尚志市| 彭水| 新乡县| 锡林浩特市| 莱西市| 皮山县| 探索| 招远市| 吉隆县| 香河县| 高唐县| 西乡县| 铁力市| 卢氏县| 新晃| 屏东县| 杨浦区| 石阡县| 白银市| 兴安盟| 长岭县| 迁西县| 垣曲县| 沽源县| 浮山县| 即墨市| 富阳市| 盐边县| 芷江| 榕江县| 新密市| 沁阳市| 邯郸县| 绵竹市| 梅河口市| 柞水县|