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
Fuzzing but only at one direction
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Fuzzing but only at one direction
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.
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.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Fuzzing but only at one direction
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
-
- Posts: 467
- Joined: 2008-12-21T11:51:10-07:00
Re: Fuzzing but only at one direction
thanks it work better with +2%