EasyFindLearn

Support

Required licenses

EasyFind

Recommended images

Any gray level image from the folder Sample Images\EasyFind

Location

[…]C:\Users\Public\Documents\Euresys\Open eVision 24.02\Sample Programs
\[LANGUAGE] samples
\Matching and Measurement\EasyFindLearn

Purpose

EasyFind learns then finds patterns inside images.

This sample program demonstrates how to:

Load an image.
Move and size the region of interest to define the pattern.
Learn the pattern in the region of interest.
Change the tolerances using the Tolerances menu.
Find the pattern using the Find menu.

Code highlights

1. Define a pattern finder object that will serve as a vehicle for the search parameters and to learn the search pattern.
EPatternFinder patternfinder;
2. Modify the parameters of the pattern finder (in this example, an angular tolerance).
patternfinder.SetAngleTolerance(tol);
3. Learn a pattern.
patternfinder.Learn(pattern);
4. Find the pattern that you previously learned inside the image.
Retrieve the results as a vector of EFoundPatterns.
std::vector<EFoundPattern> foundPatterns = patternfinder.Find(image);
5. Retrieve the attributes found pattern (in this example, the angle inside the image).
foundPatterns[n].GetAngle();
6. Draw a found pattern in the same reference frame as the search image.
foundPatterns[n].Draw(…);