Class SharpenImageProcessor
java.lang.Object
org.openstreetmap.josm.gui.layer.imagery.SharpenImageProcessor
- All Implemented Interfaces:
SessionAwareReadApply,ImageProcessor
Sharpens or blurs the image, depending on the sharpen value.
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.
- Since:
- 10547
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final float[]private static final float[]private static final float[]private ConvolveOpprivate float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyFromPropertiesMap(Map<String, String> properties) Import settings from a map of properties.private static ConvolveOpgenerateMixed(float aFactor, float[] a, float[] b) floatGets the current sharpen level.process(BufferedImage image) This method should process given image according to image processors which is contained in the layervoidsetSharpenLevel(float sharpenLevel) Sets the sharpening level.Export settings to a map of properties.toString()
-
Field Details
-
sharpenLevel
-
op
-
KERNEL_IDENTITY
-
KERNEL_BLUR
-
KERNEL_SHARPEN
-
-
Constructor Details
-
SharpenImageProcessor
public SharpenImageProcessor()
-
-
Method Details
-
getSharpenLevel
Gets the current sharpen level.- Returns:
- The level.
-
setSharpenLevel
Sets the sharpening level.- Parameters:
sharpenLevel- The level. Clamped to be positive or 0.
-
generateMixed
-
process
Description copied from interface:ImageProcessorThis method should process given image according to image processors which is contained in the layer- Specified by:
processin interfaceImageProcessor- Parameters:
image- that should be processed- Returns:
- processed image
-
applyFromPropertiesMap
Description copied from interface:SessionAwareReadApplyImport settings from a map of properties.- Specified by:
applyFromPropertiesMapin interfaceSessionAwareReadApply- Parameters:
properties- properties map
-
toPropertiesMap
Description copied from interface:SessionAwareReadApplyExport settings to a map of properties.- Specified by:
toPropertiesMapin interfaceSessionAwareReadApply- Returns:
- map of properties
-
toString
-