<a id="purpose-principles"></a>

# Purpose and Principles

<a id="purpose"></a>

## Purpose

Based on an innovative feature-point technology, **EasyFind** is a matching tool designed to rapidly locate one or more instances of a pattern in an image. With an adjustable accuracy up to sub-pixel level, it reports very precise information about the instances found, such as their location, rotation angle, scale and matching score.

![image](assets/images/easyfind/purpose_illu_purpose.webp)
* Fast Processing and Improved Robustness:

  **EasyFind** is based on a new feature-point technology. Instead of comparing the pattern to the sample image pixel-wise, it carefully selects relevant feature points in the pattern. This method allows **EasyFind** to match only the areas that convey valuable information, resulting in faster processing and much improved robustness.
* **EasyFind** supports learn regions, a feature that allows the creation of complex pattern shapes.
* **EasyFind** supports learning multiple patterns, a feature that allows the creation of patterns robust to differences in illumination or deformations.
* Training on vector patterns:

  In this mode, the learning is done on collections of 2D geometrical shapes rather than on rasterized patterns. The learning model is constructed using the class [`EVectorModel`](../../../doxygen_cpp/classeVision_1_1EVectorModel.html) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1EVectorModel.html) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EVectorModel.html) either by loading it from a `dxf` file or, programmatically, by using [`EShape`](../../../doxygen_cpp/classeVision_1_1Legacy_1_1EShape.html) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1Legacy_1_1EShape.html) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1Legacy_1_1EShape.html) objects.

  This extension is well-suited to find objects with a known geometry.

#### NOTE
In practice, you can assume an accuracy of 1/15<sub>th</sub> pixel in position and 1/15<sub>th</sub> of a degree in rotation.

#### NOTE
Compared to **EasyMatch**, **EasyFind** is computationally fast, robust against noise, occlusion, blurring, missing parts and illumination variations but only supports grayscale images while **EasyMatch** also supports color images.

<a id="easy-find-principle"></a>

## Principle

* **EasyFind** uses edge feature points to find instances in a search field:
  - An **edge feature point** is an abrupt change of gray level between two pixels.
  - It indicates that there is an edge at this location in the search field.
* To start the [`EPatternFinder::Find`](../../../doxygen_cpp/classeVision_1_1EPatternFinder.html#aeeb160cde9343ffc0d8583ac1d330e4d) [<sub>.NET</sub>](../../../doxygen_cs/classeVision_1_1EPatternFinder.html#a9c35c544243729d9907eb708f7d2a0e2) [<sub>Python</sub>](../../../doxygen_python/classeVision_1_1EPatternFinder.html#a44780e599d160cbb5f8e405042ace771) function, **EasyFind** needs either a pattern image on which it computes the edge feature points or directly a geometrically-defined feature model.

![image](assets/images/easyfind/purpose_illu_features_points.webp)![image](assets/images/easyfind/learn_from_a_vector_model.webp)
* To use this tool:
  - The patterns must be well contrasted with sharp edges.
  - They should be substantially different from the rest of the expected search fields.
  - They can be scaled or rotated.
* **EasyFind** is very robust regarding:
  - Blurring
  - Noise
  - Occlusion
  - Illumination variation

![](assets/images/easyfind/purpose_illu_consistent_edges_model.webp)![](assets/images/easyfind/purpose_illu_consistent_edges_rotation.webp)![](assets/images/easyfind/purpose_illu_consistent_edges_occlusion.webp)![](assets/images/easyfind/purpose_illu_consistent_edges_blurring.webp)
