【发布时间】:2013-09-24 19:36:02
【问题描述】:
我正在做一个用于图像处理的安卓应用程序。
为了更快地做事,我曾经在示例图像上应用过滤器(使用 inSampleSize 作为谷歌推荐)
当我保存照片(并将效果应用于原始图像)时,该过程大约需要 16 秒才能完成(5 mpx 与银河系连结)所以我在想是否有更快的方法来处理图像。
这是我将效果应用于真实图像的代码:
public void executeRealEffect(FileOutputStream ostream)
throws InstantiationException, IllegalAccessException,
ClassNotFoundException {//...
ImageProcessing imp;
imp = (ImageProcessing) Class.forName(effectUsed).newInstance();
savePhoto = imp.doEffect(BitmapFactory.decodeFile(pathToPhotoUsed));
savePhoto.compress(CompressFormat.JPEG, 100, ostream);//...
}
这是从互联网上试用该应用程序的效果:http://xjaphx.wordpress.com/2011/06/21/image-processing-grayscale-image-on-the-fly/
【问题讨论】:
-
好的,感谢@Waqas 的链接,如果我使用矩阵,它需要 3-4 秒并且更容易接受。对于 Selvin,我现在找到了 opencv