j2d
Class TemplateMatching

java.lang.Object
  extended by j2d.TemplateMatching

public class TemplateMatching
extends java.lang.Object

This class demonstrates an implementation of a basic Template Matching algorithm, using Raster(s) to access the data. This class inherits from ImageProcessingTask. IMPORTANT: This implementation does not lock access to the data while the template matching is being done.


Constructor Summary
TemplateMatching(javax.media.jai.PlanarImage input, javax.media.jai.PlanarImage template)
           
 
Method Summary
 javax.media.jai.TiledImage getOutput()
          This method returns the output image.
static java.awt.Image getSpatialCorrelation(java.awt.Image inputImage, java.awt.Image templateImage)
           
static void main(java.lang.String[] args)
           
 void run()
          This method is the main driver of the algorithm, it will perform the template matching.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateMatching

public TemplateMatching(javax.media.jai.PlanarImage input,
                        javax.media.jai.PlanarImage template)
Method Detail

getSpatialCorrelation

public static java.awt.Image getSpatialCorrelation(java.awt.Image inputImage,
                                                   java.awt.Image templateImage)

main

public static void main(java.lang.String[] args)

run

public void run()
This method is the main driver of the algorithm, it will perform the template matching.


getOutput

public javax.media.jai.TiledImage getOutput()
This method returns the output image.

Returns:
the template matching resulting image.