0
我想用opencv在ios中做出高斯模糊。我已经将opencv包含到了我的应用程序中,但我不知道如何调用它以使它成为高斯模糊。用opencv在ios中进行高斯模糊
在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中类似的东西吗?
感谢您的回答。
谢谢,这是解决方案的一部分。首先,我必须将我的文件从xx.m重命名为xx.mm,以便opencv可以正常工作,但我不知道为什么。最后,我调用了这样的函数:cv :: GaussianBlur(cvImage,cvImageGauss,cvSize(45,45),0); – jps90
@ jps90 OpenCV是一个C++库。 Objective C只与C兼容。要使用C++,您需要客观的C++(标准扩展名.mm)。 – Antzi