Page 1 of 1

help about white-threshold

Posted: 2018-08-20T13:35:04-07:00
by dark76
Hello, sorry for my bad english.
I am using ImageMagick-7.0.8-Q16 on Windows 7 32 bit.

I am a newbie, and probably this is an easy task. I would like to make white the dirty paper scan i did many years ago with old scanner.
Image

Code: Select all

magick convert %1 -selective-blur 0x2+08%% -white-threshold 70%% 2a.jpg
Image

How can i improve the result? I would like that yellow would remain yellow, i tried to play with -white-threshold but changing the values i dont't get much better results. Any idea? I would like to get "uniform colours" if you understand what i mean :) thx!

Re: help about white-threshold

Posted: 2018-08-20T13:42:02-07:00
by fmw42
try this:

Code: Select all

convert image.jpg -fuzz 10% -fill white -opaque "rgb(220,200,160)" result.jpg
If on Windows in bat file, then double the % to %%.

Adjust the rgb color to better match the region you want to change to white and/or adjust the fuzz value.

See
https://www.imagemagick.org/Usage/color_basics/#replace
https://www.imagemagick.org/script/comm ... s.php#fuzz
https://www.imagemagick.org/script/comm ... s.php#fill
https://www.imagemagick.org/script/comm ... php#opaque

Re: help about white-threshold

Posted: 2018-08-21T08:52:13-07:00
by dark76
thx for the help, it works much better. In the end i used this and for the moment i am satisfied :)

Code: Select all

magick convert %1 -modulate 100,200 -selective-blur 0x2+05%% -fuzz 12%% -fill white -opaque "rgb(250,200,140)" %~n1_fuzzblur.jpg