public class ColourDenseSIFT extends AbstractDenseSIFT<MBFImage>
DenseSIFT
extractor to each channel of the image (in the target
ColourSpace
) and then aggregating the descriptors across all
ColourSpace
s for the same spatial location.
Any ColourSpace
can be used. To compute the contrast energy of a
descriptor, the luminance is extracted across channels using
ColourSpace.computeIntensity(float[])
. This means that if you choose
a ColourSpace
that doesn't support intensities, then the contrast
energy will be zero. In practice this should not matter as it's most usual to
use the ColourSpace.RGB
, ColourSpace.HSV
or
ColourSpace.OPPONENT
colour spaces, which can compute intensities.
Constructor and Description |
---|
ColourDenseSIFT(DenseSIFT dsift,
ColourSpace colourSpace)
Construct with the given internal
DenseSIFT extractor to apply to
each band of the image created by converting the input to
#analyseImage(MBFImage) or
analyseImage(MBFImage, Rectangle) to the given
ColourSpace . |
Modifier and Type | Method and Description |
---|---|
void |
analyseImage(MBFImage image,
Rectangle bounds)
Compute the dense sift descriptors inside the bounds rectangle of the
given image.
|
int |
getBinHeight()
(Optional operation) Get the height of a single bin of the sampling
window (in pixels).
|
int |
getBinWidth()
(Optional operation) Get the width of a single bin of the sampling window
(in pixels).
|
LocalFeatureList<ByteDSIFTKeypoint> |
getByteKeypoints()
Get the SIFT descriptors from the previous call to
AbstractDenseSIFT.analyseImage(Image) or AbstractDenseSIFT.analyseImage(Image, Rectangle)
in the form of a list of local features with byte vectors. |
LocalFeatureList<ByteDSIFTKeypoint> |
getByteKeypoints(float energyThreshold)
Get the SIFT descriptors from the previous call to
AbstractDenseSIFT.analyseImage(Image) or AbstractDenseSIFT.analyseImage(Image, Rectangle)
in the form of a list of local features with byte vectors. |
float[][] |
getDescriptors()
Get the computed raw dense SIFT descriptors from the previous call to
AbstractDenseSIFT.analyseImage(Image) or AbstractDenseSIFT.analyseImage(Image, Rectangle) . |
LocalFeatureList<FloatDSIFTKeypoint> |
getFloatKeypoints()
Get the SIFT descriptors from the previous call to
AbstractDenseSIFT.analyseImage(Image) or AbstractDenseSIFT.analyseImage(Image, Rectangle)
in the form of a list of local features with float vectors. |
LocalFeatureList<FloatDSIFTKeypoint> |
getFloatKeypoints(float energyThreshold)
Get the SIFT descriptors from the previous call to
AbstractDenseSIFT.analyseImage(Image) or AbstractDenseSIFT.analyseImage(Image, Rectangle)
in the form of a list of local features with float vectors. |
int |
getNumBinsX()
Get the number of spatial bins in the X direction
|
int |
getNumBinsY()
Get the number of spatial bins in the Y direction
|
int |
getNumOriBins()
Get the number of orientation bins
|
void |
setBinHeight(int size)
(Optional operation) Set the height of a single bin of the sampling
window (in pixels).
|
void |
setBinWidth(int size)
(Optional operation) Set the width of a single bin of the sampling window
(in pixels).
|
analyseImage, clone
public ColourDenseSIFT(DenseSIFT dsift, ColourSpace colourSpace)
DenseSIFT
extractor to apply to
each band of the image created by converting the input to
#analyseImage(MBFImage)
or
analyseImage(MBFImage, Rectangle)
to the given
ColourSpace
.dsift
- the dense sift extractorcolourSpace
- the target colour spacepublic void analyseImage(MBFImage image, Rectangle bounds)
AbstractDenseSIFT
analyseImage
in class AbstractDenseSIFT<MBFImage>
image
- the imagebounds
- the bounds rectanglepublic LocalFeatureList<FloatDSIFTKeypoint> getFloatKeypoints()
AbstractDenseSIFT
AbstractDenseSIFT.analyseImage(Image)
or AbstractDenseSIFT.analyseImage(Image, Rectangle)
in the form of a list of local features with float vectors.getFloatKeypoints
in class AbstractDenseSIFT<MBFImage>
FloatDSIFTKeypoint
s.public LocalFeatureList<ByteDSIFTKeypoint> getByteKeypoints()
AbstractDenseSIFT
AbstractDenseSIFT.analyseImage(Image)
or AbstractDenseSIFT.analyseImage(Image, Rectangle)
in the form of a list of local features with byte vectors.getByteKeypoints
in class AbstractDenseSIFT<MBFImage>
ByteDSIFTKeypoint
s.public LocalFeatureList<FloatDSIFTKeypoint> getFloatKeypoints(float energyThreshold)
AbstractDenseSIFT
AbstractDenseSIFT.analyseImage(Image)
or AbstractDenseSIFT.analyseImage(Image, Rectangle)
in the form of a list of local features with float vectors. Only the
features with an energy above the given threshold will be returned.getFloatKeypoints
in class AbstractDenseSIFT<MBFImage>
energyThreshold
- the threshold on the feature energyFloatDSIFTKeypoint
s.public LocalFeatureList<ByteDSIFTKeypoint> getByteKeypoints(float energyThreshold)
AbstractDenseSIFT
AbstractDenseSIFT.analyseImage(Image)
or AbstractDenseSIFT.analyseImage(Image, Rectangle)
in the form of a list of local features with byte vectors. Only the
features with an energy above the given threshold will be returned.getByteKeypoints
in class AbstractDenseSIFT<MBFImage>
energyThreshold
- the threshold on the feature energyByteDSIFTKeypoint
s.public void setBinWidth(int size)
AbstractDenseSIFT
AbstractDenseSIFT.getNumBinsX()
.setBinWidth
in class AbstractDenseSIFT<MBFImage>
size
- size to setpublic void setBinHeight(int size)
AbstractDenseSIFT
AbstractDenseSIFT.getNumBinsY()
.setBinHeight
in class AbstractDenseSIFT<MBFImage>
size
- size to setpublic int getBinWidth()
AbstractDenseSIFT
AbstractDenseSIFT.getNumBinsX()
.getBinWidth
in class AbstractDenseSIFT<MBFImage>
public int getBinHeight()
AbstractDenseSIFT
AbstractDenseSIFT.getNumBinsY()
.getBinHeight
in class AbstractDenseSIFT<MBFImage>
public int getNumBinsX()
AbstractDenseSIFT
getNumBinsX
in class AbstractDenseSIFT<MBFImage>
public int getNumBinsY()
AbstractDenseSIFT
getNumBinsY
in class AbstractDenseSIFT<MBFImage>
public int getNumOriBins()
AbstractDenseSIFT
getNumOriBins
in class AbstractDenseSIFT<MBFImage>
public float[][] getDescriptors()
AbstractDenseSIFT
AbstractDenseSIFT.analyseImage(Image)
or AbstractDenseSIFT.analyseImage(Image, Rectangle)
.getDescriptors
in class AbstractDenseSIFT<MBFImage>