public class SharpenImageProcessor extends java.lang.Object implements ImageProcessor, SessionAwareReadApply
A positive sharpen level means that we sharpen the image.
A negative sharpen level let's us blur the image. -1 is the most useful value there.
Modifier and Type | Field and Description |
---|---|
private static float[] |
KERNEL_BLUR |
private static float[] |
KERNEL_IDENTITY |
private static float[] |
KERNEL_SHARPEN |
private java.awt.image.ConvolveOp |
op |
private float |
sharpenLevel |
Constructor and Description |
---|
SharpenImageProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
applyFromPropertiesMap(java.util.Map<java.lang.String,java.lang.String> properties)
Import settings from a map of properties.
|
private static java.awt.image.ConvolveOp |
generateMixed(float aFactor,
float[] a,
float[] b) |
float |
getSharpenLevel()
Gets the current sharpen level.
|
java.awt.image.BufferedImage |
process(java.awt.image.BufferedImage image)
This method should process given image according to image processors
which is contained in the layer
|
void |
setSharpenLevel(float sharpenLevel)
Sets the sharpening level.
|
java.util.Map<java.lang.String,java.lang.String> |
toPropertiesMap()
Export settings to a map of properties.
|
java.lang.String |
toString() |
private float sharpenLevel
private java.awt.image.ConvolveOp op
private static final float[] KERNEL_IDENTITY
private static final float[] KERNEL_BLUR
private static final float[] KERNEL_SHARPEN
public SharpenImageProcessor()
public float getSharpenLevel()
public void setSharpenLevel(float sharpenLevel)
sharpenLevel
- The level. Clamped to be positive or 0.private static java.awt.image.ConvolveOp generateMixed(float aFactor, float[] a, float[] b)
public java.awt.image.BufferedImage process(java.awt.image.BufferedImage image)
ImageProcessor
process
in interface ImageProcessor
image
- that should be processedpublic void applyFromPropertiesMap(java.util.Map<java.lang.String,java.lang.String> properties)
SessionAwareReadApply
applyFromPropertiesMap
in interface SessionAwareReadApply
properties
- properties mappublic java.util.Map<java.lang.String,java.lang.String> toPropertiesMap()
SessionAwareReadApply
toPropertiesMap
in interface SessionAwareReadApply
public java.lang.String toString()
toString
in class java.lang.Object