Class HOGFeature

Object
AnchorBean<Feature<FeatureInputStack>>
InitializableBean<Feature<FeatureInputStack>, FeatureInitialization>
Feature<FeatureInputStack>
FeatureStack
HOGFeature

public class HOGFeature extends 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(SizeXY resizeTo, int index)
    Create with a specific size to resize to, and index.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected double
    calculate(FeatureCalculationInput<FeatureInputStack> input)
     
    void
    checkMisconfigured(BeanInstanceMap defaultInstances)
     
     
    int
    Which index to return from the HOG descriptor.
    Parameters used for calculating HOG.
    SizeXY
    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
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • HOGFeature

      public HOGFeature(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(BeanInstanceMap defaultInstances) throws BeanMisconfiguredException
      Overrides:
      checkMisconfigured in class AnchorBean<Feature<FeatureInputStack>>
      Throws:
      BeanMisconfiguredException
    • describeParameters

      public String describeParameters()
      Overrides:
      describeParameters in class Feature<FeatureInputStack>
    • calculate

      protected double calculate(FeatureCalculationInput<FeatureInputStack> input) throws FeatureCalculationException
      Specified by:
      calculate in class Feature<FeatureInputStack>
      Throws:
      FeatureCalculationException
    • getResizeTo

      public SizeXY getResizeTo()
      The input is rescaled to this width/height before calculating HOG descriptors.
    • setResizeTo

      public void setResizeTo(SizeXY resizeTo)
      The input is rescaled to this width/height before calculating HOG descriptors.
    • getParameters

      public HOGParameters getParameters()
      Parameters used for calculating HOG.
    • setParameters

      public void setParameters(HOGParameters parameters)
      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.