[VB.NET/C#] Image Comparison using GdPicture ADR Technology

Example requests & Code samples for GdPicture Toolkits.
Post Reply
User avatar
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

[VB.NET/C#] Image Comparison using GdPicture ADR Technology

Post by Loïc » Sun Apr 19, 2009 2:49 pm

Here is a sample to compare two images. This sample uses GdPicture ADR Technology included in GdPicture.NET (including the latest V10 major release of course).
More information at: https://www.gdpicture.com/solutions/GdPicture-ADR.php

Using VB.NET

Code: Select all

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
	Dim oGdPictureImaging As New GdPicture.GdPictureImaging
	Dim Confidence As Double

	oGdPictureImaging.SetLicenseNumber("XXX") 'Replace XXX by a demo or commercial license key
	Dim ImageID1 As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("") 'Openning image 1
	Dim ImageID2 As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("") 'Openning image 2

	Dim TemplateID As Integer = oGdPictureImaging.ADRCreateTemplateFromGdPictureImage(ImageID1)
	Confidence = oGdPictureImaging.ADRGetLastConfidence()

	MessageBox.Show("The two image are the same at: " & Str(Confidence) & "%")
End Sub
Using C#

Code: Select all

private void Button1_Click(System.Object sender, System.EventArgs e)
	GdPicture.GdPictureImaging oGdPictureImaging = new GdPicture.GdPictureImaging();
	double Confidence = 0;

	oGdPictureImaging.SetLicenseNumber("XXX"); //Replace XXX by a demo or commercial license key	
	int ImageID1 = oGdPictureImaging.CreateGdPictureImageFromFile(""); //Openning image 1	
	int ImageID2 = oGdPictureImaging.CreateGdPictureImageFromFile(""); //Openning image 2	

	int TemplateID = oGdPictureImaging.ADRCreateTemplateFromGdPictureImage(ImageID1);
	Confidence = oGdPictureImaging.ADRGetLastConfidence();

	MessageBox.Show("The two image are the same at: " + Conversion.Str(Confidence) + "%");

Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: [VB.NET/C#] Image Comparison using GdPicture ADR Technology

Post by Gabriela » Fri Mar 29, 2019 10:24 pm

You can find the Document Recognition (ADR) Sample project in the installation directory:
https://www.gdpicture.com/guides/gdpicture/web ... ement.html

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest