Class HOGFeature
One part of a Histogram
of Oriented Gradients descriptor, as applied to an image stack.
See OpenCV HOGDescriptor documentation for details of implementation.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionHOGFeature
(SizeXY resizeTo, int index) Create with a specific size to resize to, and index. -
Method Summary
Modifier and TypeMethodDescriptionprotected double
Calculates a value for some input.void
checkMisconfigured
(BeanInstanceMap defaultInstances) Checks that a bean's properties conform to expectations.A human-readable description of the parameterization of the bean.int
getIndex()
Which index to return from the HOG descriptor.Parameters used for calculating HOG.The input is rescaled to this width/height before calculating HOG descriptors.void
setIndex
(int index) Which index to return from the HOG descriptor.void
setParameters
(HOGParameters parameters) Parameters used for calculating HOG.void
setResizeTo
(SizeXY resizeTo) The input is rescaled to this width/height before calculating HOG descriptors.Methods inherited from class org.anchoranalysis.image.feature.bean.FeatureStack
inputType
Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
Methods inherited from class org.anchoranalysis.bean.AnchorBean
describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
HOGFeature
Create with a specific size to resize to, and index.- Parameters:
resizeTo
- the size to resize to.index
- the index to return from the HOG descriptor.
-
HOGFeature
public HOGFeature()
-
-
Method Details
-
checkMisconfigured
Description copied from class:AnchorBean
Checks that a bean's properties conform to expectations.- Overrides:
checkMisconfigured
in classAnchorBean<Feature<FeatureInputStack>>
- Parameters:
defaultInstances
- all available default instances if theDefaultInstance
annotation is used- Throws:
BeanMisconfiguredException
- if the bean has not been configured properly as XML
-
describeParameters
Description copied from class:Feature
A human-readable description of the parameterization of the bean.- Overrides:
describeParameters
in classFeature<FeatureInputStack>
- Returns:
- the description.
-
calculate
protected double calculate(FeatureCalculationInput<FeatureInputStack> input) throws FeatureCalculationException Description copied from class:Feature
Calculates a value for some input.- Specified by:
calculate
in classFeature<FeatureInputStack>
- Parameters:
input
- the input to the calculation.- Returns:
- the result of the calculation.
- Throws:
FeatureCalculationException
- if the calculation cannot successfully complete.
-
getResizeTo
The input is rescaled to this width/height before calculating HOG descriptors. -
setResizeTo
The input is rescaled to this width/height before calculating HOG descriptors. -
getParameters
Parameters used for calculating HOG. -
setParameters
Parameters used for calculating HOG. -
getIndex
public int getIndex()Which index to return from the HOG descriptor. -
setIndex
public void setIndex(int index) Which index to return from the HOG descriptor.
-