- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有一个下面的 CLI,并尝试使用 magickwand c 获得相同的结果。一切似乎都很完美,或者不知道可能是我错过了什么,但 MagickUnsharpMaskImage 对我不起作用。检查我的源代码。我还附上了源代码和两个由 CLI 和 C API 生成的输出图像。
命令行
convert testsharp.jpg -unsharp 0x1 unsharpC.jpg
C代码
int main(int argc, char const *argv[]) {
MagickWand * wand;
wand = NewMagickWand();
MagickReadImage(wand, "testsharp.jpg");
MagickUnsharpMaskImage(wand, 0.0, 1.0, 0.0, 0.0);
MagickWriteImage(wand, "unsharpW.jpg");
return 0;
}
源图
使用 CLI 输出图像
使用C输出图像
ImageMagick 版本
版本:ImageMagick 7.0.5-5 Q16 x86_64 2017-05-23 http://www.imagemagick.org
最佳答案
来自 the man
MagickUnsharpMaskImage()
sharpens an image. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 andUnsharpMaskImage()
selects a suitable radius for you.
强调我的
你称它为 radius=0
sigma=1.0
此外default value for those parameters are
正确 c代码为
MagickUnsharpMaskImage(wand, 0.0, 1.0, 1.0, 0.05);
关于c - MagickWand C 的 MagickUnsharpMaskImage 方法是否存在错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44180384/
我有一个下面的 CLI,并尝试使用 magickwand c 获得相同的结果。一切似乎都很完美,或者不知道可能是我错过了什么,但 MagickUnsharpMaskImage 对我不起作用。检查我的源
我是一名优秀的程序员,十分优秀!