Common Vision Blox 14.1
Minos

Common Vision Blox Tool


 C-Style 

 C++ 

 .Net API (C#, VB, F#) 

 Python 
 MinosCVC.dll   Cvb::Minos   Stemmer.Cvb.Minos   cvb.minos 

Introduction

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:

  • Inspection of display panels in automobile constructions
  • Identification of serial numbers and comparisons with originals
  • Reading of password IDs, e.g. on guest passes
  • Detection of weld seams
  • Inspection of operating panels
  • Reading labels on packaging

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.

Initial Overview

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

How Minos works

The Training Database (*.mts) always contains:

  • All the Sample Images you add during the learning phase.
    • These images should of course contain samples of the object you want your classifier to be able to recognize later on, but it may also contain an arbitrary number of images that show none of the objects you are interested in.
    • This is still helpful, because these images provide information about what you object's do not look like (in other words: They are evaluated as counter samples for your objects).
  • Information about the "Models" you trained.
    • Models are basically a complete description of the objects you want the classifier to be able to recognize.
    • If, for example, you want to create a classifier for reading number from 0 through 9, you will specify 10 different models, one for each object (character) you want to recognize.
    • The description of a model consists of its name, the anchor point, a feature window size and of course image data that is drawn from one or more instances (that means you can and should provide more than one example image per model!).
    • The models may, but need not differ in their characteristics, which means different models may have different feature window sizes, but different models may also have identical names!

To perform pattern recognition, Minos uses a technique which is comparable with the logic of a neural network.

  • Patterns are recognized on the basis of their distinctive characteristics, i.e. both negative and positive instances of a pattern are used for recognition.
  • Positive instances are examples which fit well with the pattern.
  • Negative Instances are the counterexamples to a pattern, e.g. incorrect version of the same pattern, or images which do not contain the pattern at all.

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 performance

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.

Pattern location

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.

Learning patterns - positive and negative instances

Model

  • ... is an object that we want to recognize.
  • ... possesses a name and a feature window (an area containing the object's properties).
  • ... is characterized by at least one positive instance.

Positive instance

  • ... is the image of the object which is to be recognized.

Generally, Minos is used to learn multiple positive instances.

Negative instance

  • ... are counterexamples to the positive instances. I.e. images which do not depict your object or which depict it in a defective state.

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.

Object class

  • ... is the designator of a model. Different models may have the class name, for example, in the case of a normal »A« and an italic »A«.

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.

Images containing noise

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)

Using coordinate systems and search windows

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.

Quality measures for patterns

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.

Multithreading

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 )

Minos Teach Project

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.