com.pearsoneduc.ip.op
Class RankFilterOp
java.lang.Object
|
+--com.pearsoneduc.ip.op.StandardGreyOp
|
+--com.pearsoneduc.ip.op.NeighbourhoodOp
|
+--com.pearsoneduc.ip.op.RankFilterOp
- Direct Known Subclasses:
- MaximumFilterOp, MedianFilterOp, MinimumFilterOp
- public class RankFilterOp
- extends NeighbourhoodOp
Performs general rank filtering of a BufferedImage.
- Version:
- 1.0 [1999/07/23]
- Author:
- Nick Efford
Field Summary |
protected int[] |
neighbourhood
Array holding values from neighbourhood. |
protected int |
rank
Rank of filter. |
Constructor Summary |
RankFilterOp(int n)
Constructs a RankFilterOp with the specified rank. |
RankFilterOp(int n,
int w,
int h)
Constructs a RankFilterOp with the specified rank and neighbourhood
dimensions. |
RankFilterOp(int n,
int w,
int h,
int strategy)
Constructs a RankFilterOp with the specified rank, neighbourhood
dimensions and border processing strategy. |
Method Summary |
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dest)
Performs a rank filtering operation on an image. |
int |
getRank()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
rank
protected int rank
- Rank of filter.
neighbourhood
protected int[] neighbourhood
- Array holding values from neighbourhood.
RankFilterOp
public RankFilterOp(int n)
- Constructs a RankFilterOp with the specified rank. The filter will
operate in a 3x3 neighbourhood and will do no special border
processing.
- Parameters:
n
- rank of filter
RankFilterOp
public RankFilterOp(int n,
int w,
int h)
- Constructs a RankFilterOp with the specified rank and neighbourhood
dimensions. The filter will do no special border processing.
- Parameters:
n
- rank of filterw
- width of neighbourhoodh
- height of neighbourhood
RankFilterOp
public RankFilterOp(int n,
int w,
int h,
int strategy)
- Constructs a RankFilterOp with the specified rank, neighbourhood
dimensions and border processing strategy.
- Parameters:
n
- rank of filterw
- width of neighbourhoodh
- height of neighbourhoodstrategy
- border processing strategy
getRank
public int getRank()
- Returns:
- rank of filter.
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dest)
- Performs a rank filtering operation on an image.
- Parameters:
src
- source imagedest
- destination image, or null- Returns:
- processed image.
- Overrides:
- filter in class StandardGreyOp