© dolphin9 11th Sep. 2017
The CA allows to describe, store, compare and find the objects presented in the form of the exterior outlines - contours.
CA allows to effectively solve the main problems of a pattern recognition - transposition, turn and a rescaling of the image of object. CA methods are invariant to these transformations.
we define such an object contour. The contour is a boundary of object, a population of points (pixels), separating object from a background. in a CA the contour is encoded by the sequence consisting of complex numbers. On a contour, the point which is called as starting point is fixed. Then, the contour is scanned (is admissible - clockwise), and each vector of offset is noted by a complex number a+ib. Where a - point offset on x axis, and b - offset on y axis. Offset is noted concerning the previous point.
- Preliminary handling of the image - smoothing, a filtration of noise, a contrast raise
- Binarization of the image and selection of contours of objects
- Initial filtration of contours on perimeter, squares, to a crest factor, fractality and so on
- Coercion of contours to uniform length, smoothing
- Search of all discovered contours, searching of the template maximum similar to the given contour
The library includes two projects. The first project ContourAnalysis - implements base functions of the contour analysis - creation of contours, a scalar product of contours, equalization, evaluation ICF and ACF, comparing and searching of templates.
- The class Contour - creates and stores contours. It contains basic operations for contours - scalar product, scaling, equalization, normalization, a spectrum evaluation, evaluation ACF and ICF.
- The class Template is used for creation of base of templates. This class stores a contour, it ACF, descriptors ACF, the linear parameters of an initial contour (area), norm of a contour. Also, the template has a name which is used as the recognized value.
- Class TemplateFinder implements fast searching of a template for the given contour. Outcome of operation of this class is FoundTemplateDesc which contains an initial contour, and the template discovered for the given contour.
- Besides, FoundTemplateDesc contains similarity rate, angle of rotation and a scale of a contour, relative to a template.
The second project - ContourAnalysisProcessing - contains methods for preliminary handling of the image, selection of contours, their filtrations and a recognition. Also, it contains tools for automatic generation of templates for recognition of printing symbols.
Project ContourAnalysisProcessing uses library OpenCV (EmguCV .NET wrapper) for operation with the image.
- The class ImageProcessor is used for image handling. It, also, stores base of templates.
- Method ImageProcessor.ProcessImage() receives the image on an input. Outcome of operation are lists discovered contours (ImageProcessor.samples) and the list of the recognized contours (ImageProcessor.foundTemplates).
- The class ImageProcessor contains also settings for searching of contours. The ImageProcessor works as follows:
- At first, the image will be transformed to gray-scale
- Then it is binarized by AdaptiveThreshold
- Contours are extracted
- Contours are filtered on linear parameters (length, square, etc.)
- Contours are equalized, there is calculation ACF and ACF descriptors
- And then there is maximum suitable template
- The static class TemplateGenerator is used for automatic generation of templates of numerals of a certain font.
Except two library projects, there is a demo-example showing operation of library with the webcam. The demo contains tools for creation and editing of templates, recognition tuning, and allows to produce recognition of contours from the webcam, and also allows to create the augmented reality.
- Translate to Chinese
- Write the Form "tips" to introduce CA and how to use the program
- Write the AboutBox.