Class UtilFeature

java.lang.Object
boofcv.alg.descriptor.UtilFeature

public class UtilFeature extends Object
Various utilities related to image features
  • Constructor Details

    • UtilFeature

      public UtilFeature()
  • Method Details

    • createArray

      public static <TD extends TupleDesc<TD>> DogArray<TD> createArray(DescriptorInfo<TD> detDesc, int initialMax)
      Creates a DogArray and declares new instances of the descriptor using the provided DetectDescribePoint. The array will have declareInstance set to true, otherwise why would you be using this function?
    • createArrayF64

      public static DogArray<TupleDesc_F64> createArrayF64(int length)
    • combine

      public static TupleDesc_F64 combine(List<TupleDesc_F64> inputs, TupleDesc_F64 combined)
      Concats the list of tuples together into one big feature. The combined feature must be large enough to store all the inputs.
      Parameters:
      inputs - List of tuples.
      combined - Storage for combined output. If null a new instance will be declared.
      Returns:
      Resulting combined.
    • normalizeL2

      public static void normalizeL2(TupleDesc_F64 desc)

      Normalized the tuple such that the L2-norm is equal to 1. This is also often referred to as the Euclidean or frobenius (all though that's a matrix norm).

      value[i] = value[i]/sqrt(sum(value[j]*value[j], for all j))

      Parameters:
      desc - tuple
    • normalizeSumOne

      public static void normalizeSumOne(TupleDesc_F64 desc)

      Normalized the tuple such that it's sum is equal to 1.

      value[i] = value[i]/sqrt(sum(value[j], for all j))

      Parameters:
      desc - tuple
    • setSource

      public static <TD extends TupleDesc<TD>> void setSource(FastAccess<TD> descriptors, DogArray_I32 sets, AssociateDescriptionArraySets<TD> association)
      Adds the feature descriptor and its set to the association algorithm
      Parameters:
      descriptors - (Input) Descriptor of each feature
      sets - (Input) Set each feature belongs in
      association - (Output) association algorithm which is having its source configured
    • setDestination

      public static <TD extends TupleDesc<TD>> void setDestination(FastAccess<TD> descriptors, DogArray_I32 sets, AssociateDescriptionArraySets<TD> association)
      Adds the feature descriptor and its set to the association algorithm
      Parameters:
      descriptors - (Input) Descriptor of each feature
      sets - (Input) Set each feature belongs in
      association - (Output) association algorithm which is having its destination configured
    • setSource

      public static <TD extends TupleDesc<TD>> void setSource(FastAccess<TD> descriptors, DogArray_I32 sets, FastAccess<Point2D_F64> locs, AssociateDescriptionSets2D<TD> association)
      Adds the feature descriptor and its set to the association algorithm
      Parameters:
      descriptors - (Input) Descriptor of each feature
      sets - (Input) Set each feature belongs in
      locs - (Input) Pixel coordinate that each feature was found at
      association - (Output) association algorithm which is having its source configured
    • setDestination

      public static <TD extends TupleDesc<TD>> void setDestination(FastAccess<TD> descriptors, DogArray_I32 sets, FastAccess<Point2D_F64> locs, AssociateDescriptionSets2D<TD> association)
      Adds the feature descriptor and its set to the association algorithm
      Parameters:
      descriptors - (Input) Descriptor of each feature
      sets - (Input) Set each feature belongs in
      locs - (Input) Pixel coordinate that each feature was found at
      association - (Output) association algorithm which is having its destination configured