Main Page | Alphabetical List | Class List | File List | Class Members | File Members

Rac Class Reference

Detect a pattern in the image. More...

#include <racdetect.h>

List of all members.

Public Member Functions

 Rac ()
 ~Rac ()
void setSize (const int width, const int height)
 Set the image size Based on width and height of the image, it allocs memory for the process.

void find (BYTE *imgSrc)
 Find the conex component of the image and classify using the label's list.

void findVertices ()
 Based on the label's list, finds the correspondent vertices for the pattern.

void reset ()
 Reset the labels list to start finding everything again.


Public Attributes

RacLabelList labelList
 Label's list with all the labels found in the image.

int * imgLabel
bool ok

Private Member Functions

void findRecur (int x, int y, int label, unsigned int depth)
 Recursive method to find the conex components.

int chainHull (RacPixelArray &P, int n, RacPixelArray &H)
 Find the chain hull.

int isLeft (RacPixel P0, RacPixel P1, RacPixel P2)
bool filterVertices (RacPixelArray &verticesArray, int size, RacPixel *vertices)
 Reduce the vertices to just for.

float dot (RacPixel &a, RacPixel &b, RacPixel &c)
 DotProduct (ab).(cb).


Private Attributes

int width
int height
BYTE * img
RacLabelListItrlabelItr
unsigned int nextPoolPixel
RacPixelArray pool
 Pixel's pool to avoid allocating too many times.


Static Private Attributes

int label


Detailed Description

Detect a pattern in the image.

Rac has methods who finds the conex components, finds the convex hull, and call a method who finds the pattern and the correspondent pixels

Definition at line 60 of file racdetect.h.


Constructor & Destructor Documentation

Rac::Rac  ) 
 

Rac::~Rac  ) 
 


Member Function Documentation

int Rac::chainHull RacPixelArray P,
int  n,
RacPixelArray H
[private]
 

Find the chain hull.

Parameters:
P pixel's array source
n number of pixels in source
H pixel's array found
Returns:
number of pixels found

float Rac::dot RacPixel a,
RacPixel b,
RacPixel c
[private]
 

DotProduct (ab).(cb).

bool Rac::filterVertices RacPixelArray verticesArray,
int  size,
RacPixel vertices
[private]
 

Reduce the vertices to just for.

Parameters:
verticesArray source
size source size
vertices vertices found

void Rac::find BYTE *  imgSrc  ) 
 

Find the conex component of the image and classify using the label's list.

void Rac::findRecur int  x,
int  y,
int  label,
unsigned int  depth
[private]
 

Recursive method to find the conex components.

Parameters:
x x coord to start the search
y y coord to start the search
label current label
depth current recursion's depth

void Rac::findVertices  ) 
 

Based on the label's list, finds the correspondent vertices for the pattern.

int Rac::isLeft RacPixel  P0,
RacPixel  P1,
RacPixel  P2
[private]
 

void Rac::reset  ) 
 

Reset the labels list to start finding everything again.

void Rac::setSize const int  width,
const int  height
 

Set the image size Based on width and height of the image, it allocs memory for the process.

It must be called before the others methods


Member Data Documentation

int Rac::height [private]
 

Definition at line 117 of file racdetect.h.

BYTE* Rac::img [private]
 

Definition at line 118 of file racdetect.h.

int* Rac::imgLabel
 

Definition at line 83 of file racdetect.h.

int Rac::label [static, private]
 

Definition at line 115 of file racdetect.h.

RacLabelListItr* Rac::labelItr [private]
 

Definition at line 120 of file racdetect.h.

RacLabelList Rac::labelList
 

Label's list with all the labels found in the image.

Definition at line 82 of file racdetect.h.

unsigned int Rac::nextPoolPixel [private]
 

Definition at line 122 of file racdetect.h.

bool Rac::ok
 

Definition at line 84 of file racdetect.h.

RacPixelArray Rac::pool [private]
 

Pixel's pool to avoid allocating too many times.

Definition at line 123 of file racdetect.h.

int Rac::width [private]
 

Definition at line 116 of file racdetect.h.


The documentation for this class was generated from the following file:
Generated on Fri Dec 12 10:47:34 2003 for RacLib by doxygen 1.3.4