Documentation of 'boofcv.alg.feature.detect.template.TemplateMatching' Java class
TemplateMatching
boofcv.alg.feature.detect.template

Class TemplateMatching<T extends ImageBase>



  • public class TemplateMatching<T extends ImageBase>
    extends java.lang.Object
    Runs a template matching algorithm across the image. Local peaks are found in the resulting intensity image and the best solutions returned.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      FastQueue<Match> getResults()
      Returns all the found matches.
      void process(T image)
      Performs template matching.
      void setMinimumSeparation(int radius)
      Adjust how close to objects can be found to each other
      void setTemplate(T template, T mask, int maxMatches)
      Specifies the template to search for and the maximum number of matches to return.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TemplateMatching

        public TemplateMatching(TemplateMatchingIntensity<T> match)
        Specifies internal algorithm
        Parameters:
        match - Provide template matching intensity algorithm
    • Method Detail

      • setMinimumSeparation

        public void setMinimumSeparation(int radius)
        Adjust how close to objects can be found to each other
        Parameters:
        radius - Distance in pixels. Try using the template's radius or 2
      • setTemplate

        public void setTemplate(T template,
                                T mask,
                                int maxMatches)
        Specifies the template to search for and the maximum number of matches to return.
        Parameters:
        template - Template being searched for
        mask - Optional mask. Same size as template. 0 = pixel is transparent, values larger than zero determine how influential the pixel is. Can be null.
        maxMatches - The maximum number of matches it will return
      • process

        public void process(T image)
        Performs template matching.
        Parameters:
        image - Image being processed
      • getResults

        public FastQueue<Match> getResults()
        Returns all the found matches. The location is the location of the top left corner of the template. Score is the first score with higher number being better
        Returns:
        List of found templates

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.