Fuzzing but only at one direction

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

Fuzzing but only at one direction

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Fuzzing but only at one direction

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
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

Post 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
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

Re: Fuzzing but only at one direction

Post by broucaries »

thanks it work better with +2%
User avatar
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

Post by fmw42 »

Adjust as desired, obviously.
Post Reply