public class GeoRasterImageProcessUtil
extends java.lang.Object
GeoRasterImageProcessUtil
class provides the following basic image processing functions:
normalize equalize scale piecewiseLinearStretch changeContrast changeBrightness changeThreshold
The GeoRasterImageProcessUtil
object is initiated by a RenderedImage object as follows:
GeoRasterImageProcessUtil util=new GeoRasterImageProcessUtil(image);
When creating a GeoRasterImageProcessUtil
object, it is the application's responsibility to ensure that the current working image is not null.
Constructor and Description |
---|
GeoRasterImageProcessUtil(java.awt.image.RenderedImage img)
Constructs an
GeoRasterProcessUtil object using the given RenderedImage object. |
Modifier and Type | Method and Description |
---|---|
java.awt.image.RenderedImage |
amplitudeRescaling()
Performs amplitude rescaling; the method will calculate extreme values for the image at first, and then scale extreme low and extreme high values to 0 and 256 respectively.
|
java.awt.image.RenderedImage |
amplitudeRescaling(double low, double high)
Performs amplitude rescaling; low value and high value will be scaled to 0 and 256, respectively.
|
java.awt.image.RenderedImage |
changeBrightness(int b)
change brightness of the current working image
|
java.awt.image.RenderedImage |
changeContrast(double contrast)
Changes the contrast of the current working image.
|
java.awt.image.RenderedImage |
changeThreshold(double low_p, double high_p, double target)
Applies a threshold operation on the current working image; maps all the pixels of this image whose value falls within a specified range to a specified constant.
|
java.awt.image.RenderedImage |
equalize()
Applies an equalization operation on the current working image.
|
java.awt.image.RenderedImage |
getImage()
Gets the current working image.
|
java.awt.image.RenderedImage |
normalize()
Applies a normalization operation on the current working image.
|
java.awt.image.RenderedImage |
piecewiseLinearStretch()
Applies a piecewise linear stretch operation on the current working image.
|
void |
setImage(java.awt.image.RenderedImage img)
Sets the current working image.
|
public GeoRasterImageProcessUtil(java.awt.image.RenderedImage img)
GeoRasterProcessUtil
object using the given RenderedImage object.img
- a RenderedImage objectpublic void setImage(java.awt.image.RenderedImage img)
img
- current working RenderedImagepublic java.awt.image.RenderedImage getImage()
public java.awt.image.RenderedImage amplitudeRescaling(double low, double high)
low
- low value, which will be scaled to 0high
- high value, which will be scaled to 256public java.awt.image.RenderedImage amplitudeRescaling()
public java.awt.image.RenderedImage normalize()
public java.awt.image.RenderedImage piecewiseLinearStretch()
public java.awt.image.RenderedImage equalize()
public java.awt.image.RenderedImage changeBrightness(int b)
b
- brightness, data range is 0-256public java.awt.image.RenderedImage changeThreshold(double low_p, double high_p, double target)
low_p
- low end of data rangehigh_p
- high end of data rangetarget
- constant value for specific range of valuespublic java.awt.image.RenderedImage changeContrast(double contrast)
contrast
- contrast, data range is 0-256