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實戰與應用
- Python絕技:運用Python成為頂級數據工程師
- 信息系統與數據科學
- Creating Mobile Apps with Sencha Touch 2
- 大數據:規劃、實施、運維
- Neural Network Programming with TensorFlow
- 大數據Hadoop 3.X分布式處理實戰
- 深入淺出 Hyperscan:高性能正則表達式算法原理與設計
- 數據科學實戰指南
- 數據庫原理與應用
- 區域云計算和大數據產業發展:浙江樣板
- 從實踐中學習sqlmap數據庫注入測試
- 數據庫與數據處理:Access 2010實現
- 大數據數學基礎(R語言描述)
- Spring MVC Beginner’s Guide