public class Enhance extends Object
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_UNSHARP_FRACTION |
static int |
DEFAULT_UNSHARP_HALFWIDTH |
Constructor and Description |
---|
Enhance() |
Modifier and Type | Method and Description |
---|---|
static Pix |
unsharpMasking(Pix pixs)
Performs unsharp masking (edge enhancement) using default values.
|
static Pix |
unsharpMasking(Pix pixs,
int halfwidth,
float fraction)
Performs unsharp masking (edge enhancement).
|
public static final int DEFAULT_UNSHARP_HALFWIDTH
public static final float DEFAULT_UNSHARP_FRACTION
public static Pix unsharpMasking(Pix pixs)
pixs
- Source imageunsharpMasking(Pix, int, float)
public static Pix unsharpMasking(Pix pixs, int halfwidth, float fraction)
Notes:
halfwidth
parameter for these is
(size - 1)/2; i.e., 1, 2, 3, etc.fract
parameter is typically taken in the range: 0.2
< fract
< 0.7pixs
- The source imagehalfwidth
- The half-width of the smoothing filter.fraction
- The fraction of edge to be added back into the source
image.