Creates a new Rect or adds a new Rect to a list
Rect *rect( int x1, int y1, int x2, int y2, double fill, Rect * next )
Returns the area of the Rect.
double rectArea( Rect * r )
Returns the closest Rect to the (x, y) point
Rect *rectClosest( Rect * r, int x, int y )
Makes a copy of a Rect
Rect *rectCopy( Rect * r )
Frees the memory used by a Rect
void rectDelete( Rect * r )
Returns the between two Rects
double rectDistance( Rect * r1, Rect * r2 )
Filter the Rects on the list based on a criteria.
Rect *rectFilter( Rect * r, int criteria, double min, double max )
Check if the Rects intersect each other
int rectIntersects( Rect * r1, Rect * r2 )
Checks if the Rect is valid (left < right and top < bottom)
int rectIsValid( Rect * r )
An implementation of the algorithm described in “T.
Rect *rectMaximalWhiteRectangles( Rect * bound, Rect * obstacles, int N, double (*quality)(Rect *r) )
Checks if the passed point is inside the Rect
int rectPointInside( Rect * r, int x, int y )
Delete the priority queue
void rectPQDelete( RectPQ * pq )
Enqueue a triple of bound, obstacles and quality
RectPQ *rectPQEnqueue( RectPQ * pq, Rect * bound, Rect * obstacles, double quality )
Get the best element of the queue
RectPQ *rectPQGet( RectPQ * pq, Rect ** bound, Rect ** obstacles, double * q )
For every element, add new to the obstacles list if new intersects bound
RectPQ *rectPQUpdate( RectPQ * pq, Rect * new )
Prints all the Rects in r preceded by msg
void rectPrint( char * msg, Rect * r )
Checks if a Rect is inside another
int rectRectInside( Rect * r, Rect * r2 )
Region of interest on the image.
Rect *ROI
Detects the skew of a document page using the technice described in Ávila B.T., Lins R.D., “A Fast Orientation and Skew Detection Algorithm for Monochromatic Document Images”.
double skewDetectAvilaLins( Image * img )
Detects the skew of a document page using the technice described in B.
double skewDetectGatos( Image * img, double max_skew )
Finds the top-most parent of the element a.
int UFFind( UF * set, int a )
Creates the structure to use the unionfind algorithm
UF *UFJoin( UF * set, int a, int b )
Creates the structure to use the unionfind algorithm
UF *UFNew( int max_sets )
Width of the image
int w