Documentation of 'boofcv.alg.tracker.tld.TldTemplateMatching' Java class
TldTemplateMatching
boofcv.alg.tracker.tld

Class TldTemplateMatching<T extends ImageGray>



  • public class TldTemplateMatching<T extends ImageGray>
    extends java.lang.Object
    Created NCC templates to describe the target region. Each template is composed of a 15x15 area. The descriptor is computed by sampling evenly spaced points through out the rectangular region. Confidence values are computed based in the distance a point is from the closest positive and negative template.
    • Constructor Detail

    • Method Detail

      • reset

        public void reset()
        Discard previous results and puts it back into its initial state
      • setImage

        public void setImage(T gray)
        Must call this function before any of the others which process descriptions
        Parameters:
        gray - Input image
      • addDescriptor

        public void addDescriptor(boolean positive,
                                  ImageRectangle rect)
        Creates a new descriptor for the specified region
        Parameters:
        positive - if it is a positive or negative example
      • addDescriptor

        public void addDescriptor(boolean positive,
                                  float x0,
                                  float y0,
                                  float x1,
                                  float y1)
      • computeNccDescriptor

        public void computeNccDescriptor(NccFeature f,
                                         float x0,
                                         float y0,
                                         float x1,
                                         float y1)
        Computes the NCC descriptor by sample points at evenly spaced distances inside the rectangle
      • createDescriptor

        public NccFeature createDescriptor()
        Creates a new descriptor or recycles an old one
      • computeConfidence

        public double computeConfidence(int x0,
                                        int y0,
                                        int x1,
                                        int y1)
        Compute a value which indicates how confident the specified region is to be a member of the positive set. The confidence value is from 0 to 1. 1 indicates 100% confidence. Positive and negative templates are used to compute the confidence value. Only the point in each set which is closest to the specified region are used in the calculation.
        Returns:
        value from 0 to 1, where higher values are more confident
      • computeConfidence

        public double computeConfidence(ImageRectangle r)
        see the other function with the same name
      • distance

        public double distance(NccFeature observed,
                               java.util.List<NccFeature> candidates)
        Computes the best distance to 'observed' from the candidate list.
        Parameters:
        observed - Feature being matched
        candidates - Set of candidate matches
        Returns:
        score from 0 to 1, where lower is closer
      • getTemplatePositive

        public java.util.List<NccFeature> getTemplatePositive()
      • getTemplateNegative

        public java.util.List<NccFeature> getTemplateNegative()

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.