opencv3.3.1+vs2015+c++实现直接在图像上画掩码,保存掩码图片
发布日期:2022-04-04 06:36:25 浏览次数:18 分类:博客文章

本文共 796 字,大约阅读时间需要 2 分钟。

左键红右键蓝,保存为k

#include "opencv2\imgproc\imgproc.hpp"  // Gaussian Blur#include "opencv2\core\core.hpp"        // Basic OpenCV structures (cv::Mat, Scalar)#include 
// OpenCV window I/O#include
// for standard I/O#include
// for strings#include
// for controlling float print precision#include
// string to number conversionusing namespace cv;using namespace std; bool rButtonDown = false;bool lButtonDown = false;int numUsedBins = 0;float varianceSquared = 0;int scribbleRadius = 10;Mat inputImg = imread("0.jpg", 3), showImg = imread("0.jpg", 3);Mat fgScribbleMask;Mat bgScribbleMask;static void onMouse(int event, int x, int y, int, void*){ cout << "On Mouse: (" << x << "," << y << ")" <

  

转载地址:https://www.cnblogs.com/l2017/p/8371124.html 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:声明函数指针、回调函数、函数对象------c++程序设计基础、编程抽象与算法策略
下一篇:c++迭代递归实现汉诺塔(5种迭代方法满足你)

发表评论

最新留言

网站不错 人气很旺了 加油
[***.192.178.218]2024年04月09日 07时04分05秒