使用ios中的opencv进行高斯模糊

时间:2015-05-19 16:18:45

标签: android ios opencv blur gaussian

我试图用ios中的opencv进行高斯模糊。我已经将opencv包含在我的应用程序中,但我不知道如何调用它以使其变得高斯模糊。

在Android中我称之为:

Mat source = Highgui.imread(filepath, Highgui.CV_LOAD_IMAGE_COLOR);
Mat destination = new Mat(source.rows(),source.cols(),source.type());
Imgproc.GaussianBlur(source, destination, new Size(45, 45), 0);
Highgui.imwrite(getDir().getPath() + File.separator +"Gaussian45.jpg", destination);

iOS中是否也有类似内容?

感谢您的回答。

1 个答案:

答案 0 :(得分:0)

By the looks of things,您必须将其转换为cv :: Mat,然后您可以使用普通的guassian blur c ++方法然后将其转换回ULLImage

以上链接演示了如何转换和转换为两种图像类型。将它转换为cv :: Mat后,您只需use this method

void GaussianBlur(InputArray src, OutputArray dst, Size ksize, double sigmaX, double sigmaY=0, int