ImageLocator

Created: 2011-07-17 17:38
Updated: 2014-03-01 02:28

README.markdown

ImageLocator

License:

Dual licensed under MIT or GPL Version 2.0 by Glenn Nelson

Description:

A Java library that compares two images and finds all instances of the "compare" image within the "base" image. Library can check for small variances within images such as fluxuations in RGB values.

Requirements

JDK (Tested on 6.24)
JVM

Usage:

ImageLocator locator = new ImageLocator(base, compare);
locator.search();			// Raw search, no tolerance for variation
locator.search(5);			// Tolerance search, allow for RGB variance +- 5

Functions:

ImageLocator(BufferedImage base, BufferedImage compare);
void search();							// Raw search; no tolerance
void search(int tolerance);				// Search w/ RGB variance tolerance
boolean isAtLocation(int x, int y);		// Check for occourrence at x,y
boolean isImageFound();					// Returns true if at least one occurrence is found
Point getFirstOccourrence();			// Get Point (Object) of first match
Point getLastOccourrence();				// Get Point (Object) of last match (null if 0/1 match)
int numberOfOccourrences();				// Number of matches
List<Point> getOccurrences();			// Returns all occurrences in a List
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more