Package net.sourceforge.jiu.filters
Class MinimumFilter
java.lang.Object
net.sourceforge.jiu.ops.Operation
net.sourceforge.jiu.ops.ImageToImageOperation
net.sourceforge.jiu.filters.AreaFilterOperation
net.sourceforge.jiu.filters.MinimumFilter
Filter operation that replaces each sample by the minimum value of itself
and its neighbors.
See
MaximumFilter for a usage example.- Since:
- 0.9.0
- Author:
- Marco Schmidt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intcomputeSample(int[] samples, int numSamples) Determine the resulting sample for an array with the source sample and zero or more of its neighbors.Methods inherited from class net.sourceforge.jiu.filters.AreaFilterOperation
checkAreaHeight, checkAreaWidth, getAreaHeight, getAreaWidth, process, setArea, setAreaHeight, setAreaWidthMethods inherited from class net.sourceforge.jiu.ops.ImageToImageOperation
canInputAndOutputBeEqual, ensureImagesHaveSameResolution, ensureInputImageIsAvailable, ensureOutputImageResolution, getInputImage, getOutputImage, setCanInputAndOutputBeEqual, setInputImage, setOutputImageMethods inherited from class net.sourceforge.jiu.ops.Operation
addProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgress
-
Constructor Details
-
MinimumFilter
public MinimumFilter()
-
-
Method Details
-
computeSample
public final int computeSample(int[] samples, int numSamples) Description copied from class:AreaFilterOperationDetermine the resulting sample for an array with the source sample and zero or more of its neighbors. This abstract method must be implemented by classes extending this operation. The array will holdnumSamplessamples, which will be stored starting at offset0.Normally,
numSamplesis equal toAreaFilterOperation.getAreaWidth()timesAreaFilterOperation.getAreaHeight(). Near the border of the image you may get less samples. Example: the top left sample of an image has only three neighbors (east, south-east and south), so you will only get four samples (three neighbors and the sample itself).- Specified by:
computeSamplein classAreaFilterOperation- Parameters:
samples- the array holding the sample(s)numSamples- number of samples in the array- Returns:
- sample to be written to the output image
-