Cleaning scanned grayscale images with ImageMagick

痞子三分冷 提交于 2019-12-03 17:18:49

The Color Modifications page shows many color manipulation algorithms by ImageMagick.

In this specific case, two algorithms are interesting:

-level gives you perfect black/white pixels near the ends of the curve and a linear distribution between.

The sigmoidal option creates a smoother curve between the extremes, which works better for color photos.

To get a similar result like in GIMP, you can try to apply one after the other (to make text and black areas really black).

In all cases, you will want to run -normalize first (or even -contrast-stretch to merge most of the noise) to make sure no black/white levels are wasted. Without this, the darkest color could be lighter than rgb(0,0,0) and the brightest color could be below pure white.

[magick-users] Curves in ImageMagick

The first link in that archived message is a shell script that I think does what you're looking for.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!