我想分割输入图像和模糊它的瓦片,但毕竟在相邻瓷砖cv::blur
invocations我已经有边界像素,这与我所不同的是,当将cv::blur
同时应用于整个图像时得到了。模糊图像一块瓦片
Mat upper(im, Rect(0,0, 10,10));
Mat lower(im, Rect(0,11, 10,20))
blur(upper, upper, Size(5, 5));
blur(lower, lower, Size(5, 5));
它看起来像库版本我用(2.4.8)没有做什么,我希望通过以下阅读:
与早期版本的OpenCV的,现在的过滤操作完全支持图像ROI的概念,即像素在ROI之外,但图像内部可用于过滤操作。
(来自:See FilterEngine::apply description here)
P.S.1:我试图提取cv::boxFilter
实施和改变srcRoi
参数值,但无论是有错误的结果。
Mat src = im.clone();
Mat dst = src; // Trying to perform the operation in-place
Size ksize(5, 5);
Point anchor(-1,-1);
Ptr<FilterEngine> f = createBoxFilter(
src.type(), dst.type(),
ksize, anchor, true, BORDER_DEFAULT
);
f->apply(
src, dst,
Rect(0,0,10,10),
Point(0,0), false
);
f->apply(
src, dst,
Rect(0,0,10,10),
Point(0,11), false
);
P.S.2:帮助上着色的源代码将是有益的。
P.S.3是我的最爱。安慰。只是说:D然而,你的意思是*'着色源代码'* – 2014-10-09 16:03:17
注意:添加语言标签可以修复你的语法着色。 – 2014-10-09 16:05:55
致@PaulR:我的声望级别太低,无法添加C++标记。 – parallelgeek 2014-10-09 20:33:33