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 )
Vector of the channels that compose the image
Matrix **channel
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 )
Used in some connected components functions.
double fill
Height of the image
int h
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 )
A Structuring element used in the HitMiss operation.
typedef Kernel HitMissElement
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 )
The kernel matrix with
Matrix *matrix
Number of channels in the image
int n_channels
The quality of the element.
double quality