Find Matches

Hint

To speed up the search process, you can also use multicore processing. This is especially interesting when you use EasyMatch with angle and scale tolerances.

Matching Workflow

        flowchart TD
    A[Acquire an image]
    A --> B[Call the **Match** method]
    B --> C[Display or process the found instances]
    

Matching Parameters

Min/Max Angle

Min/Max Scale

Min Score and Max Positions

EasyMatch returns a vector of EFoundPattern, sorted in decreasing Score order.

Contrast Mode

  • Lighting effects can cause an object to appear with inverted contrast.

  • Use EMatcher::SetContrastMode .NET Python to search for matches with same contrast, inverted contrast or both.

  • By default, only matches with the same contrast are searched.

Match Timeout

EMatcher::Match .NET Python possesses a timeout:

Note

This timeout mechanism is used to prevent the application from freezing while tuning parameters. This is especially useful in eVision Studio. Note that this does not correspond to the behavior of code reader timeouts, which aim to prevent long processing times in production settings.

Advanced Parameters

Max Overlap

EasyMatch can filter out instances that completely or partially overlap with each other in the search results if EMatcher::GetMaxOverlap .NET Python is less than 1.0.

  • The overlap is defined as the area of the intersection of the two instances divided by the area of the smallest instance.

  • The maximum allowed overlap can take any value between 0 (no overlap allowed) and 1 (complete overlap allowed).

  • By default, all overlaps are allowed (MaxOverlap = 1).

Correlation Mode

EasyMatch computes the score of an EFoundPattern by using a correlation metric. Several correlation metrics are available through EMatcher::SetCorrelationMode .NET Python:

Extension

  • EasyMatch can match patterns that are partially outside of the matching image.

  • This feature is disabled by default. Use the parameter EMatcher::SetExtension .NET Python to enable and set it.

Initial Min Score and Initial Max Positions

Early Candidate Rejection

Final Reduction

  • Use EMatcher::SetFinalReduction .NET Python to stop the iterative position refinement in the pyramid before reaching the initial image.

  • This setting is interesting if speed is important and having a coarse location is sufficient for your application.

  • Note that the best candidate at reduction i is not necessarily the best candidate in the initial image, so setting this too aggressively can result in incorrect locations and not just coarse ones.

Interpolate

  • By default, EasyMatch performs interpolation at the last reduction of the pyramid to achieve sub-pixel accuracy.

  • If speed is more important than accuracy for your application, you may disable this interpolation with EMatcher::SetInterpolate .NET Python.