| C | |
| ccGetAndLabelConnectedComponentsBBox | |
| ccGetConnectedComponentsBBox | |
| ccLabelConnectedComponents | |
| column | |
| columnGetPageColumns | |
| columnIsColumnSeparator | |
| columnQuality | |
| columnSplitImageByColumns | |
| convertImage | |
| convertIplImage | |
| convolution | |
| H | |
| HitMiss, HitMissElement | |
| hitMissCircle, HitMissElement | |
| hitMissElement, HitMissElement | |
| hitMissElement2, HitMissElement | |
| hitMissElementDelete, HitMissElement | |
| hitMissRectangle, HitMissElement | |
| I | |
| image, Image | |
| imageClone, Image | |
| imageDelete, Image | |
| imageDrawRect, Image | |
| imageGet, Image | |
| imageGrayGet, Image | |
| imageGraySet, Image | |
| imageReadPGM, Image | |
| imageSavePGM, Image | |
| imageSet, Image | |
| imgRLSAH | |
| K | |
| kernel, Kernel | |
| kernelDelete, Kernel | |
| R | |
| rect | |
| rectArea | |
| rectClosest | |
| rectCopy | |
| rectDelete | |
| rectDistance | |
| rectFilter | |
| rectIntersects | |
| rectIsValid | |
| rectMaximalWhiteRectangles | |
| rectPointInside | |
| rectPQDelete | |
| rectPQEnqueue | |
| rectPQGet | |
| rectPQUpdate | |
| rectPrint | |
| rectRectInside | |
| S | |
| skewDetectAvilaLins | |
| skewDetectGatos | |
| U | |
| UFFind | |
| UFJoin | |
| UFNew |
Extract the connected components’ boxes from the image and builds a mtr that ‘labels’ the components, giving fast access to a pixels’ corresponding Rect.
Rect *ccGetAndLabelConnectedComponentsBBox( Image * img, Matrix ** rectMatrix )
Extract the connected components’ boxes from the image.
Rect *ccGetConnectedComponentsBBox( Image * img )
Label the connected components of an image using a UnionFind approach.
Matrix *ccLabelConnectedComponents( Image * img, int * num_components )
Creates a new Column
Column *column( int x1, int y1, int x2, int y2, Column * next )
Finds at maximum n_tries from the page.
Column *columnGetPageColumns( Image * img, Rect * characters, int n_tries, double (*quality) (Rect *r), int (*columnClassifier) (Rect *, Rect *) )
Checks if a Rect is a column separator.
int columnIsColumnSeparator( Rect * r, Rect * characters )
Returns a quality to use with the rectMaximalWhiteRectangles.
double columnQuality( Rect * r )
Split the image in separate column images.
Image **columnSplitImageByColumns( Image * img, Column * col, int * n_sections )
Converts an Image to the IplImage used in OpenCV.
IplImage *convertImage( Image * img )
Converts an IplImage to the Image type of smartreader.
Image *convertIplImage( IplImage * img )
Does the convolution of the image img with the Kernel k
void convolution( Image * img, Kernel * k )
Do the HitMiss operation in a 8-bit unsigned binary image.
void HitMiss( Image * src, Image * dest, HitMissElement * se )
Create a circular structuring element with the specified radius
HitMissElement *hitMissCircle( int radius )
Creates a new HitMissElement.
HitMissElement *hitMissElement( Matrix * m )
Creates a new HitMissElement with a pre defined center.
HitMissElement *hitMissElement2( Matrix * m, int anchorx, int anchory )
Creates a new HitMissElement.
void hitMissElementDelete( HitMissElement * se )
Create a rectangular structuring element
HitMissElement *hitMissRectangle( int w, int h )
Creates a new image
Image *image( int width, int height, int n_channels )
Returns a clone of img.
Image *imageClone( Image * img )
Delete the image
void imageDelete( Image * img )
Draws all the Rects in a IplImage using color.
void imageDrawRect( Image * img, Rect * r, Color color, int filled )
Gets the value at position i, j from a the n-th channel of the image.
int imageGet( Image * img, int i, int j, int n )
Gets the value at position i, j from a gray image.If the parameters are invalid returns 0.
int imageGrayGet( Image * img, int i, int j )
Sets the value at position i, j from a gray image
void imageGraySet( Image * img, int i, int j, int value )
Reads a PGM image from path.
Image *imageReadPGM( char * path )
Save an image to the file system
void imageSavePGM( Image * img, char * path )
Sets the value at position i, j in the n-th channel of an image
void imageSet( Image * img, int i, int j, int n, int value )
Do a horizontal run-lenght smoothing algorithm
void imgRLSAH( Image * img, int C )
Creates a new kernel to be used with a convolution or hit and miss operation.
Kernel *kernel( Matrix * values, int anchorx, int anchory )
Deletes a kernel created by another function
void kernelDelete( Kernel * k )
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 )
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 )