예제 #1
0
 /**
  * Construct with the template to match, the mode with which to estimate template responses and
  * the bounds rectangle in which to search. The search bounds rectangle is defined with respect to
  * the centre of the template.
  *
  * @param template The template
  * @param mode The mode.
  * @param bounds The bounding box for search.
  */
 public TemplateMatcher(FImage template, Mode mode, Rectangle bounds) {
   this.searchBounds = bounds;
   this.mode = mode;
   this.template = mode.prepareTemplate(template);
   this.workingSpace = mode.prepareWorkingSpace(this.template);
 }
예제 #2
0
 /**
  * Default constructor with the template to match and the mode with which to estimate template
  * responses. When matching is performed by {@link #analyseImage(FImage)}, the whole image will be
  * searched.
  *
  * @param template The template
  * @param mode The mode.
  */
 public TemplateMatcher(FImage template, Mode mode) {
   this.mode = mode;
   this.template = mode.prepareTemplate(template);
   this.workingSpace = mode.prepareWorkingSpace(this.template);
 }