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
推薦閱讀
- 數據存儲架構與技術
- 公有云容器化指南:騰訊云TKE實戰與應用
- 數據庫基礎與應用:Access 2010
- MongoDB管理與開發精要
- Access 2007數據庫應用上機指導與練習
- Learning Proxmox VE
- “互聯網+”時代立體化計算機組
- AI時代的數據價值創造:從數據底座到大模型應用落地
- Proxmox VE超融合集群實踐真傳
- 大數據精準挖掘
- Solaris操作系統原理實驗教程
- 大數據技術原理與應用:概念、存儲、處理、分析與應用
- Expert Python Programming(Third Edition)
- Spring Boot 2.0 Cookbook(Second Edition)
- Kubernetes快速進階與實戰