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

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
主站蜘蛛池模板: 同心县| 柏乡县| 清镇市| 扶余县| 武邑县| 铜川市| 清新县| 山阴县| 永川市| 沛县| 竹山县| 锡林浩特市| 无锡市| 舟曲县| 龙门县| 崇礼县| 罗田县| 房山区| 舞钢市| 宜宾县| 历史| 丰顺县| 昌宁县| 镶黄旗| 浮梁县| 康乐县| 姚安县| 敦煌市| 凤山市| 杂多县| 栖霞市| 东安县| 梓潼县| 旺苍县| 衢州市| 辽阳市| 嘉善县| 舒兰市| 汽车| 阳朔县| 保定市|