使用OpenCV怎么实现一个图像切割功能-创新互联
本篇文章为大家展示了使用OpenCV怎么实现一个图像切割功能,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
一、代码部分:
#include "stdafx.h" #include#include #include #include #include #include using namespace std; using namespace cv; //Cut an image into m*n patch void Cut_img(Mat src_img, int m, int n, vector ceil_img) { int t = m * n; int height = src_img.rows; int width = src_img.cols; int ceil_height = height / m; int ceil_width = width / n; Mat roi_img; //String concatenation ostringstream oss; string str, str1, str2; Point p1, p2; for (int i = 0; i ceil_img ; Cut_img(img, m, n, ceil_img); cvWaitKey(0); return 0; }
上述内容就是使用OpenCV怎么实现一个图像切割功能,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注创新互联网站建设公司行业资讯频道。
另外有需要云服务器可以了解下创新互联建站www.cdcxhl.com,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
当前文章:使用OpenCV怎么实现一个图像切割功能-创新互联
网页链接:http://myzitong.com/article/dggoie.html