com.pearsoneduc.ip.op
Class MedianFilterOp
java.lang.Object
|
+--com.pearsoneduc.ip.op.StandardGreyOp
|
+--com.pearsoneduc.ip.op.NeighbourhoodOp
|
+--com.pearsoneduc.ip.op.RankFilterOp
|
+--com.pearsoneduc.ip.op.MedianFilterOp
- public class MedianFilterOp
- extends RankFilterOp
Performs median filtering of a BufferedImage.
Note: this can also be done with RankFilterOp, but the algorithm
used here is faster for neighbourhoods larger than 3x3.
- Version:
- 1.0 [1999/07/23]
- Author:
- Nick Efford
Constructor Summary |
MedianFilterOp()
Constructs a MedianFilterOp for a 3x3 neighbourhood, with no
special processing at the image borders. |
MedianFilterOp(int w,
int h)
Constructs a MedianFilterOp with given neighbourhood dimensions
and no special processing at the image borders. |
MedianFilterOp(int w,
int h,
int strategy)
Constructs a MedianFilterOp with the specified neighbourhood
dimensions and border processing strategy. |
Method Summary |
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dest)
Performs median filtering on an image. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
MedianFilterOp
public MedianFilterOp()
- Constructs a MedianFilterOp for a 3x3 neighbourhood, with no
special processing at the image borders.
MedianFilterOp
public MedianFilterOp(int w,
int h)
- Constructs a MedianFilterOp with given neighbourhood dimensions
and no special processing at the image borders.
- Parameters:
w
- width of neighbourhoodh
- height of neighbourhood
MedianFilterOp
public MedianFilterOp(int w,
int h,
int strategy)
- Constructs a MedianFilterOp with the specified neighbourhood
dimensions and border processing strategy.
- Parameters:
w
- width of neighbourhoodh
- height of neighbourhoodstrategy
- border processing strategy
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dest)
- Performs median filtering on an image.
- Parameters:
src
- source imagedest
- destination image, or null- Returns:
- processing image.
- Overrides:
- filter in class RankFilterOp