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
推薦閱讀
- 數據庫基礎教程(SQL Server平臺)
- Visual Studio 2015 Cookbook(Second Edition)
- 分布式數據庫系統:大數據時代新型數據庫技術(第3版)
- 文本挖掘:基于R語言的整潔工具
- 工業大數據分析算法實戰
- 區塊鏈通俗讀本
- OracleDBA實戰攻略:運維管理、診斷優化、高可用與最佳實踐
- MATLAB Graphics and Data Visualization Cookbook
- AI時代的數據價值創造:從數據底座到大模型應用落地
- 新手學會計(2013-2014實戰升級版)
- 數字IC設計入門(微課視頻版)
- 貫通SQL Server 2008數據庫系統開發
- Expert Python Programming(Third Edition)
- 數據庫應用系統技術
- 醫療大數據分析與應用