UtilAForgeMatchImage(String, String, Single) Method

Matches a part of an image inside of the specified source image, and returns the relative top-left corner coordinates of any matched image and their similarity percent.

Definition

Namespace: DevCase.ThirdParty.AForge
Assembly: DevCase.net48.ThirdParty.AForge (in DevCase.net48.ThirdParty.AForge.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static TemplateMatch[] MatchImage(
	string srcImagePath,
	string findImagePath,
	float similarity
)

Parameters

srcImagePath  String
The filepath of the source image.
findImagePath  String
The filepath of the image to find inside srcImagePath image.
similarity  Single
The similarity percentage threshold to compare the images.

A value of 100 means find a 100% identical image.

Note: High percentage values with images of big resolutions could take several minutes to accomplish.

Return Value

TemplateMatch
An Array of TemplateMatch that contains the relative top-left corner coordinates of any matched image and their similarity percent.

Remarks

Note: Some functionalities of this assembly may require to install one or all of the listed NuGet packages:

https://www.nuget.org/packages/AForge/

https://www.nuget.org/packages/AForge.Imaging/

https://www.nuget.org/packages/AForge.Math/

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

Exceptions

ArgumentOutOfRangeException similarity

See Also