GClasses
|
This class uses heuristics to find sub-images within a larger image. It is slower, but more stable than GSubImageFinder.
#include <GRegion.h>
Public Member Functions | |
GSubImageFinder2 (GImage *pHaystack) | |
pHaystack is the image in which to search. It can have any dimensions. More... | |
~GSubImageFinder2 () | |
void | findSubImage (int *pOutX, int *pOutY, GImage *pNeedle, GRect *pNeedleRect) |
Finds the best x and y positions of pNeedle within pHaystack. It is assumed that the needle fits entirely within the haystack. There are no restrictions on image sizes. More... | |
Static Public Member Functions | |
static void | test () |
Performs unit tests for this class. Throws an exception if there is a failure. More... | |
Protected Attributes | |
GImage * | m_pHaystack |
GClasses::GSubImageFinder2::GSubImageFinder2 | ( | GImage * | pHaystack | ) |
pHaystack is the image in which to search. It can have any dimensions.
GClasses::GSubImageFinder2::~GSubImageFinder2 | ( | ) |
void GClasses::GSubImageFinder2::findSubImage | ( | int * | pOutX, |
int * | pOutY, | ||
GImage * | pNeedle, | ||
GRect * | pNeedleRect | ||
) |
Finds the best x and y positions of pNeedle within pHaystack. It is assumed that the needle fits entirely within the haystack. There are no restrictions on image sizes.
|
static |
Performs unit tests for this class. Throws an exception if there is a failure.
|
protected |