Class HOGFeature
Object
org.anchoranalysis.bean.AnchorBean<B>
org.anchoranalysis.bean.initializable.InitializableBean<org.anchoranalysis.feature.bean.Feature<T>,org.anchoranalysis.feature.initialization.FeatureInitialization>
org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputStack>
org.anchoranalysis.image.feature.bean.FeatureStack
org.anchoranalysis.plugin.opencv.bean.feature.HOGFeature
public class HOGFeature
extends org.anchoranalysis.image.feature.bean.FeatureStack
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
Constructors Constructor Description HOGFeature()HOGFeature(org.anchoranalysis.image.bean.spatial.SizeXY resizeTo, int index)Create with a specific size to resize to, and index. -
Method Summary
Modifier and Type Method Description protected doublecalculate(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputStack> input)voidcheckMisconfigured(org.anchoranalysis.bean.BeanInstanceMap defaultInstances)StringdescribeParameters()intgetIndex()Which index to return from the HOG descriptor.HOGParametersgetParameters()Parameters used for calculating HOG.org.anchoranalysis.image.bean.spatial.SizeXYgetResizeTo()The input is rescaled to this width/height before calculating HOG descriptors.voidsetIndex(int index)Which index to return from the HOG descriptor.voidsetParameters(HOGParameters parameters)Parameters used for calculating HOG.voidsetResizeTo(org.anchoranalysis.image.bean.spatial.SizeXY resizeTo)The input is rescaled to this width/height before calculating HOG descriptors.Methods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toStringMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized
-
Constructor Details
-
HOGFeature
public HOGFeature(org.anchoranalysis.image.bean.spatial.SizeXY resizeTo, int index)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
public void checkMisconfigured(org.anchoranalysis.bean.BeanInstanceMap defaultInstances) throws org.anchoranalysis.bean.exception.BeanMisconfiguredException- Overrides:
checkMisconfiguredin classorg.anchoranalysis.bean.AnchorBean<org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputStack>>- Throws:
org.anchoranalysis.bean.exception.BeanMisconfiguredException
-
describeParameters
- Overrides:
describeParametersin classorg.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputStack>
-
calculate
protected double calculate(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputStack> input) throws org.anchoranalysis.feature.calculate.FeatureCalculationException- Specified by:
calculatein classorg.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputStack>- Throws:
org.anchoranalysis.feature.calculate.FeatureCalculationException
-
getResizeTo
public org.anchoranalysis.image.bean.spatial.SizeXY getResizeTo()The input is rescaled to this width/height before calculating HOG descriptors. -
setResizeTo
public void setResizeTo(org.anchoranalysis.image.bean.spatial.SizeXY resizeTo)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.
-