Common Vision Blox Tool
C-Style | C++ | .Net API (C#, VB, F#) | Python |
MinosCVC.dll | Cvb::Minos | Stemmer.Cvb.Minos | cvb.minos |
Minos is a software product for the development of applications in the pattern recognition, alignment and optical character recognition (OCR) fields.
It consists of the TeachBench program and a programming library. The Library components serve as an interface between the objects learned in TeachBench and the user application.
Because of its flexibility and reliability, Minos is ideally suited for the development of applications designed, for example, to perform the following tasks:
To get an idea what else may be done with Minos, we strongly recommend to have a look at the tutorial programs in %CVB%Tutorial/Minos directory. Different Training Sets (*.mts files and images) are available under Images.
For object recognition CVB Minos uses discrete features in the grey value range that are automatically extracted from sample images during the training phase. CVB Minos not only detects features to differentiate between each trained object type, but also uses negative examples in the sample images to further secure correct detection and classification. This provides the ability to differentiate between two similar objects and also to deal with patterns that are mixed with varying backgrounds, for example in OCR or security print used in bank notes or credit cards. CVB Minos is used mainly in object recognition and alignment as well as for optical character recognition and verification, even in tough circumstances. The tool is able to correctly identify even characters with overlapping extremities or partially hidden characters.
Since 2016 version of Common Vision Blox 12, a new teaching application called TeachBench is included allowing easy teaching of image models for the CVB tools Minos and Polimago.
How Minos works
The Training Database (*.mts) always contains:
To perform pattern recognition, Minos uses a technique which is comparable with the logic of a neural network.
The criteria which distinguish between positive and negative instances are combined in a classifier in a so-called »filtered« form.
The classifier contains all the information necessary to recognize a pattern. The information is gathered together in various images (Minos training set, or MTS for short) in which the positive and negative instances of the pattern are defined. Once the pattern has been learned within TeachBench, it can be detected in other images. To do this, the classifier is integrated into a search function. We distinguish between two types of search function: pattern recognition and OCR. The search result of the pattern recognition function takes the form of the position at which the pattern is found, together with a quality measure which represents the extent to which the pattern matches. The result returned by the OCR search functions takes the form of a string (token) which contains the detected characters.
Minos offers a level of flexibility and performance which cannot be achieved by pattern recognition software which works on the basis of correlations. Despite this, correlations, with their absolute measurement of quality, offer advantages for many applications. For this reason, Minos also contains an algorithm for normalized gray-scale correlation. In this procedure, the pattern and the images for comparison are compared pixel for pixel on the basis of their gray-scale information. If up to now you have only worked with the correlation method, there is a danger that you will approach your work with Minos with certain preconceptions which may lead you to unintentionally restrict the available possibilities. We therefore recommend that you read the following section carefully to make sure that you understand how to work with Minos and are able to apply this knowledge in order to take full advantage of its performance.
Minos is extremely efficient in searching for learned patterns. Thanks to its unique search strategy, it is able to locate patterns much more rapidly and with a far lighter computing load than software products which use correlation methods. Unlike the correlation methods, these search functions can also be used to recognize patterns which differ from the learned pattern in their size of alignment.
Recognition of multiple patterns
In Minos it is enough to learn a single classifier in order to be able to search for a variety of patterns. This classifier may be used, for example, to locate the first occurrence or the first match for the learned pattern in the image. Alternatively, you may use the classifier to detect all occurrences of all learned patterns and record these, for example, in order to read all the characters on a page of text.
Flexibility of the Minos modules
You can combine different search functions and multiple classifiers in Minos. This makes it possible to develop high-performance search routines for applications such as part recognition, alignment, completeness inspection, quality control, OCR or text verification. Easy-to-use tools and parameters allow you to control the search processes, the location and size of the image segment to be searched as well as the pixel density to be scanned. This means that Minos can be quickly optimized for individual application needs. The following section describes how you optimize the use of Minos's special properties for your application.
Generally, Minos is used to learn multiple positive instances.
During the learning process, Minos searches for characteristics which are common to all the instances of a model and differences to everything else which is not defined as an instance of the object.
You should take care when selecting the positive instances of a pattern which Minos is to learn for later recognition. For most applications it is advisable to create more than one positive instance for a pattern before testing the classifier. In the case of patterns which are difficult to recognize, you should create at least ten positive instances before assessing the performance of a classifier. In general, the more positive and negative instances that are learned, the more robust the classifier will be. However, excessive numbers of positive instances, which barely differ in their properties, cannot increase the performance of the classifier. The learning and testing processes are of decisive importance for the application's subsequent success. You should not continue with application development until you are absolutely certain that the classifier operates reliably. For this reason, Minos provides development tools together with a large selection of sample code.
Minos can recognize patterns without any problems even in images exhibiting differing level of brightness. However, the software is sensitive to large differences in the contrast of neighboring pixels (in images which contain a high level of noise or reflection). Minos is most successful when searching in images in which the shifts in contrast within the pattern are predictable and uniform.
If the pattern to be learned exhibits a high level of local contrast fluctuation, or if the background is extremely varied, you will need to learn more positive instances than is normally the case. Using this approximation method, you can ensure that Minos will acquire the largest possible range of pattern variations which are likely to occur in your application.
In addition, you must set the values of the Minos learning parameters to accept a higher noise level in the image (MinQual parameter) or reduce sensitivity to local contrast (Indifference Window parameter). Another way to reduce noise in an image is to preprocess the search image using the image processing functions provided by Minos (Normalization, Image filtering)
Minos possesses two utilities which you can use to create »smart« search routines: flexible coordinate systems and intelligent search windows. Each pixel in an image is unambiguously defined in Minos in terms of its relationship to a coordinate system which is superimposed on the image. For its part, the coordinate system is flexible. That means that you can shift its origin and define its size and alignment starting from the point at which the pattern was located. This means that the position of a pattern can be described with reference to any other point. Similarly, the angle of rotation of a pattern can be expressed with reference to an alignment of your choice. Minos makes it easy to define the angle of rotation of a pattern and align the coordinate system correspondingly so that the image is normally aligned with reference to the coordinate system. In this way, you can also search in rotated images just as if they were non-rotated.
Minos allows you to draw an oblique rectangle as an AOI (Area Of Interest) in the search image. You can specify the origins, proportions, alignment and search directions for this area. The properties of the search window are set with reference to the coordinate system, i.e. if you modify the coordinate system, the changes are also applied in the search window.
Example:
If you invert the coordinate system and its origin, Minos can recognize an inverted pattern just as if it was present in its normal alignment.
In Minos it is very often not necessary to create a large search window which demands considerable application processing time. In comparison with the search pattern, the dimensions of the search window may even be very small. It simply needs to be large enough to accommodate a pattern reference point. In this way, it is possible to develop very fast running programs.
Example:
If the positioning point of a pattern is likely to be found within the region drawn in the bottom left corner, Minos need only search for the pattern in this area. Minos is able to find this pattern on the basis of its reference point.
Minos contains a correlation tool which measure the quality of a pattern. The correlation function present in Minos is not used to locate patterns! Instead, you use Minos's search functions for pattern recognition. You then perform the correlation between the original and detected pattern so that the correlation value can be returned as a quality measure for the match. This measurement is performed on the basis of all pixels of the pattern. In order to increase speed, Minos allows you to use only certain pixels for the calculation of the correlation. Minos automatically determines these pixels during the learning process and automatically uses them when searching for the potential object position.
This method is efficient, because you only have to perform the correlation once. Also you can perform correlations for patterns which have been rotated, something which is not possible using pure correlation methods alone.
By combining these various techniques within Minos, it is possible to develop high-performance quality control systems.
Modern CPUs don´t increase their speed with higher clock rates like in the past. Instead, they provide increasing capacity to run more tasks concurrently on more CPU cores. But the application which is executed on the multicore CPUs has to use several threads which then can be executed on the available cores which is managed by the operation system.
Minos can be executed concurrently on several threads when strict rules are followed:
1. Own classifier for every thread
You have to use an own classifier for every thread. If you need only one classifier in every thread you have to load this classifier for every thread. ( Parameter: CLF )
2. Own result for every thread
You have to use an own result list for every thread. ( Parameter: Results )
For details refer to Minos Teach Tutorial in %CVB%Tutorial/Minos.
The Teach Bench program is used to teach Minos patterns with the help of example images. Use New Project => Minos Teach Project therefore:
The images which constitute the learning material may either be acquired by means of an external device, e. g. a camera ( vin-driver), opened as an image file (BMP, MIO) or imported via the Windows clipboard.
To create a classifier, you can either learn a simple pattern, for example a component from a production process, or multiple patterns, e.g. the characters of a character set.