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 double calculate​(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputStack> input)  
    void checkMisconfigured​(org.anchoranalysis.bean.BeanInstanceMap defaultInstances)  
    String describeParameters()  
    int getIndex()
    Which index to return from the HOG descriptor.
    HOGParameters getParameters()
    Parameters used for calculating HOG.
    org.anchoranalysis.image.bean.spatial.SizeXY getResizeTo()
    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​(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.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​(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:
      checkMisconfigured in class org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputStack>>
      Throws:
      org.anchoranalysis.bean.exception.BeanMisconfiguredException
    • describeParameters

      public String describeParameters()
      Overrides:
      describeParameters in class org.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:
      calculate in class org.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

      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.