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

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
主站蜘蛛池模板: 大埔区| 平远县| 固始县| 安仁县| 龙口市| 虎林市| 报价| 合江县| 凤阳县| 兴山县| 印江| 太湖县| 班戈县| 台安县| 宜州市| 博客| 成武县| 广昌县| 天津市| 益阳市| 自治县| 乃东县| 柯坪县| 盈江县| 大化| 昌江| 麦盖提县| 平顶山市| 岚皋县| 克拉玛依市| 麻栗坡县| 资源县| 武定县| 隆子县| 陆河县| 北安市| 大名县| 精河县| 大足县| 太和县| 江都市|