net.aerith.misao.image.filter
Class MedianFilter
java.lang.Object
|
+--net.aerith.misao.image.filter.Filter
|
+--net.aerith.misao.image.filter.MedianFilter
- public class MedianFilter
- extends Filter
The MedianFilter
is an image processing filter of
median filter. The result is stored in the original image.
Field Summary |
protected int |
filter_size
The area size to calculate median value. |
Constructor Summary |
MedianFilter()
Constructs a filter. |
MedianFilter(int initial_filter_size)
Constructs a filter with initial filter size. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
filter_size
protected int filter_size
- The area size to calculate median value.
MedianFilter
public MedianFilter()
- Constructs a filter.
MedianFilter
public MedianFilter(int initial_filter_size)
- Constructs a filter with initial filter size.
- Parameters:
initial_filter_size
- the initial value of filter size.
setFilterSize
public void setFilterSize(int new_filter_size)
- Sets the filter size.
- Parameters:
new_filter_size
- the new value of filter size.
getFilteredValue
public double getFilteredValue(MonoImage image,
int x,
int y)
- Gets the filtered value at the specified position.
- Parameters:
image
- the original image to process.x
- the x.y
- the y.- Returns:
- the filtered value.
operate
public MonoImage operate(MonoImage image)
- Operates the image processing filter and stores the result into
the original image buffer.
- Overrides:
- operate in class Filter
- Parameters:
image
- the original image to process.- Returns:
- the original image buffer.