public class MeanPatchIntensityHistogram extends AbstractFeatureDescriptor
For each pixel in the image, a patch of size
1 + 2 * size
is extracted, where
size
is determined by setSize(int)
. Mean intensities of all patches are summarized in a
histogram.
Mean intensities are computed efficiently by using IntegralImage
.
Descriptor.Supports
Modifier and Type | Field and Description |
---|---|
protected int |
m_bins |
protected double |
m_histMax |
protected double |
m_histMin |
protected IntegralImage |
m_integralImage |
protected int |
m_patchArea |
protected int |
m_patchSize |
protected int |
m_size |
pcs
DOES_ALL
Constructor and Description |
---|
MeanPatchIntensityHistogram() |
Modifier and Type | Method and Description |
---|---|
protected void |
createIntegralImage(ij.process.ByteProcessor ip) |
String |
getDescription()
Returns a short plain Text description about the Descriptor and the
semantics of the double array obtained from
FeatureDescriptor.getFeatures() . |
double |
getHistogramMax() |
double |
getHistogramMin() |
protected float |
getMeanIntensity(int x,
int y) |
int |
getNumberOfBins() |
int |
getSize() |
protected void |
retrieveMinAndMaxFromImage(ij.process.ImageProcessor ip) |
void |
run(ij.process.ImageProcessor ip)
Start processing of this algorithm on the given image processor.
|
void |
setHistogramRange(double min,
double max)
Set the minimum and maximum value that the histogram should consider.
|
void |
setNumberOfBins(int bins)
Set the number of bins of the histogram.
|
void |
setProperties(LibProperties properties)
Injects the properties class that can be used to retrieve several
properties.
|
void |
setSize(int size)
Set size of neighborhood which determines the patch size.
|
EnumSet<Descriptor.Supports> |
supports()
Determine the capabilities of this algorithm.
|
addData, addData, addData, addPropertyChangeListener, endProgress, firePropertyChange, getFeatures, getMask, inMask, setMask, startProgress
protected int m_size
protected int m_bins
protected double m_histMin
protected double m_histMax
protected int m_patchSize
protected int m_patchArea
protected IntegralImage m_integralImage
public String getDescription()
FeatureDescriptor
FeatureDescriptor.getFeatures()
.
May return null if no description is implemented - even though this
should be avoided by any means.public EnumSet<Descriptor.Supports> supports()
Descriptor
supports
in interface Descriptor
supports
in class AbstractFeatureDescriptor
public void setProperties(LibProperties properties) throws IOException
FeatureDescriptor
setProperties
in interface FeatureDescriptor
setProperties
in class AbstractFeatureDescriptor
IOException
- if something went wrongpublic void run(ij.process.ImageProcessor ip)
Descriptor
protected void createIntegralImage(ij.process.ByteProcessor ip)
protected void retrieveMinAndMaxFromImage(ij.process.ImageProcessor ip)
protected float getMeanIntensity(int x, int y)
public int getSize()
public void setSize(int size)
The outer most size pixels will not be considered because they have incomplete neighborhoods.
size
- IllegalArgumentException
- if size <= 0
public int getNumberOfBins()
public void setNumberOfBins(int bins)
bins
- IllegalArgumentException
- if bins <= 0
public double getHistogramMin()
public double getHistogramMax()
public void setHistogramRange(double min, double max)
If both min and max are set to zero (default), limits are retrieved from data.
min
- max
- IllegalArgumentException
- if min > max
Copyright © 2013. All Rights Reserved.