GClasses
|
This class uses heuristics to find sub-images within a larger image. It is slower, but more stable than GSubImageFinder. More...
#include <GRegion.h>
Public Member Functions | |
GSubImageFinder2 (GImage *pHaystack) | |
pHaystack is the image in which to search. It can have any dimensions. | |
~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. | |
Static Public Member Functions | |
static void | test () |
Performs unit tests for this class. Throws an exception if there is a failure. | |
Protected Attributes | |
GImage * | m_pHaystack |
This class uses heuristics to find sub-images within a larger image. It is slower, but more stable than GSubImageFinder.
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 void GClasses::GSubImageFinder2::test | ( | ) | [static] |
Performs unit tests for this class. Throws an exception if there is a failure.
GImage* GClasses::GSubImageFinder2::m_pHaystack [protected] |