GClasses
GClasses::GSubImageFinder2 Class Reference

Detailed Description

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

GImagem_pHaystack
 

Constructor & Destructor Documentation

GClasses::GSubImageFinder2::GSubImageFinder2 ( GImage pHaystack)

pHaystack is the image in which to search. It can have any dimensions.

GClasses::GSubImageFinder2::~GSubImageFinder2 ( )

Member Function Documentation

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.

Member Data Documentation

GImage* GClasses::GSubImageFinder2::m_pHaystack
protected