Page 1 of 1

Fuzzing but only at one direction

Posted: 2017-02-14T11:00:12-07:00
by broucaries
Hi,

I have the following scanned text with a yellowish background that I want to remove.
http://nvlpubs.nist.gov/nistpubs/bullet ... 05_a2b.pdf

Under matlab I usually get the average of color here srgba(91%,80%,58%,1) set in hvs colorspace and remove all arround a fuzz 3D ellipsoid in HSV space.

Any idea to do better ?

Bastien

Re: Fuzzing but only at one direction

Posted: 2017-02-14T11:09:27-07:00
by snibgo
I don't know what you are asking.

IM's "-fuzz" takes one parameter, which is the radius of a sphere in the 3D colour cube. (Or 4D, for CMYK). This is always a sphere, not ellipsoid. But you can get the same effect by first multiplying channels, or using "-level".

With a smarter script, you can find the mean colour of an area, and also the maximum and minimum, and calculate the fuzz that covers the entire range.

Re: Fuzzing but only at one direction

Posted: 2017-02-14T12:54:24-07:00
by fmw42
try this on the first page. if you like it, then you can do all pages.

Code: Select all

convert -density 300 nbsbulletinv3n2p305_a2b.pdf[0] -colorspace gray -negate -lat 25x25+10% -negate result.pdf

Re: Fuzzing but only at one direction

Posted: 2017-02-14T14:07:29-07:00
by broucaries
thanks it work better with +2%

Re: Fuzzing but only at one direction

Posted: 2017-02-14T15:27:38-07:00
by fmw42
Adjust as desired, obviously.