Class NccFeature

java.lang.Object
boofcv.struct.feature.NccFeature
All Implemented Interfaces:
TupleDesc<NccFeature>, Serializable

public class NccFeature extends Object implements TupleDesc<NccFeature>

Description for normalized cross correlation (NCC). The descriptor's value in a NCC feature is the pixel intensity value minus the mean pixel intensity value.

value[i] = I(x,y) - mean
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double[]
    Storage for each element in the feature
    double
    Mean pixel intensity Can be used to reconstruct the original values of the template.
    double
    standard deviation of pixel intensity
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
     
    NccFeature(int numFeatures)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a copy of this description
    void
    fill(double value)
     
    double
    get(int index)
     
    double
    getDouble(int index)
    Returns the value of a tuple's element as a double.
    boolean
    Returns true if the type data structure are identical
     
    void
    setTo(double... value)
     
    void
    Sets this tuple to be the same as the provided tuple
    int
    Number of elements in the tuple.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • mean

      public double mean
      Mean pixel intensity Can be used to reconstruct the original values of the template.
    • sigma

      public double sigma
      standard deviation of pixel intensity
    • data

      public double[] data
      Storage for each element in the feature
  • Constructor Details

    • NccFeature

      public NccFeature(int numFeatures)
    • NccFeature

      protected NccFeature()
  • Method Details

    • copy

      public NccFeature copy()
      Description copied from interface: TupleDesc
      Creates a copy of this description
      Specified by:
      copy in interface TupleDesc<NccFeature>
      Returns:
      Copy
    • get

      public double get(int index)
    • setTo

      public void setTo(double... value)
    • fill

      public void fill(double value)
    • setTo

      public void setTo(NccFeature src)
      Description copied from interface: TupleDesc
      Sets this tuple to be the same as the provided tuple
      Specified by:
      setTo in interface TupleDesc<NccFeature>
      Parameters:
      src - The tuple which this one is to become a copy of.
    • getDouble

      public double getDouble(int index)
      Description copied from interface: TupleDesc
      Returns the value of a tuple's element as a double. In general this function should not be used because of how inefficient it is.
      Specified by:
      getDouble in interface TupleDesc<NccFeature>
      Parameters:
      index - Which element
      Returns:
      Element's value as a double
    • isEquals

      public boolean isEquals(NccFeature tuple)
      Description copied from interface: TupleDesc
      Returns true if the type data structure are identical
      Specified by:
      isEquals in interface TupleDesc<NccFeature>
    • size

      public int size()
      Description copied from interface: TupleDesc
      Number of elements in the tuple.
      Specified by:
      size in interface TupleDesc<NccFeature>
      Returns:
      Number of elements in the tuple
    • newInstance

      public NccFeature newInstance()
      Specified by:
      newInstance in interface TupleDesc<NccFeature>