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

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
主站蜘蛛池模板: 长阳| 乌鲁木齐县| 宁武县| 察雅县| 临汾市| 古浪县| 桐城市| 吴桥县| 肃南| 赫章县| 巨野县| 沧州市| 织金县| 海林市| 原平市| 永昌县| 灵宝市| 博客| 花垣县| 迁安市| 南漳县| 葫芦岛市| 兴海县| 磐石市| 千阳县| 凌海市| 宜宾市| 尉犁县| 长白| 鄂伦春自治旗| 类乌齐县| 吴忠市| 左权县| 三门县| 建瓯市| 上杭县| 临邑县| 贵港市| 内丘县| 延川县| 犍为县|