gimp script-fu 中的自动阈值功能
在 GIMP UI 中,有一个“应用阈值”功能 (GIMP 2.6),其中有一个名为“自动”的选项。这会自动计算图像的适当下阈值。此功能/选项可以在插件中使用吗? gimp-threshold 和 gimp-histogram 函数似乎没有此选项。
In the GIMP UI, there is an Apply Threshold functionality (GIMP 2.6) which has an option called Auto. This automatically calculates an appropriate lower threshold value for the image. Is this function/option available to use in a plugin? The gimp-threshold and gimp-histogram functions don't seem to have this option.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我最终使用的解决方案。仅适用于灰度图像。它与 gimphistogram.c
http: //git.gnome.org/browse/gimp/tree/app/base/gimphistogram.c
Here's the solution I finally used. Works only for grayscale images. Its the same algorithm as in the gimp_histogram_get_threshold function in gimphistogram.c
http://git.gnome.org/browse/gimp/tree/app/base/gimphistogram.c
不幸的是,从 GIMP 版本 2.6 开始,此功能未向过程数据库 (API) 公开,因此不能在 script-fu 或 Python 脚本中使用。
Unfortunately, as of GIMP version 2.6, this feature is not exposed to the Procedural Database (API) ,and thus can't be used in a script-fu or Python script.