Page 1 of 1

Comparing 2 Images using Confidence

Posted: Sun Sep 27, 2009 2:15 am
by super22
Hi There,

I am wanting to compare different quality/compression levels of images however the ADRGetLastConfidence always returns the same value: 40. regardless of whether I compare the original image to a high quality format or a low quality format. You can visually see the difference in images attached.

I have based the code on this example - viewtopic.php?t=1450#4728

Code: Select all

        Dim oGdPictureImaging As New GdPicture.GdPictureImaging
        Dim Confidence As Double

        oGdPictureImaging.SetLicenseNumber("XXXX") 'Replace with your own license key
        Dim ImageID1 As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("orig.jpg")
        Dim ImageID2 As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("low.jpg") 'comment to test high quality image
        'Dim ImageID2 As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("high.jpg") 'uncomment to test high quality image

        Dim TemplateID As Integer = oGdPictureImaging.ADRCreateTemplateFromGdPictureImage(ImageID1)
        oGdPictureImaging.ReleaseGdPictureImage(ImageID1)
        oGdPictureImaging.ADRGetCloserTemplateForGdPictureImage(ImageID2)
        oGdPictureImaging.ReleaseGdPictureImage(ImageID2)
        Confidence = oGdPictureImaging.ADRGetLastConfidence()
        oGdPictureImaging.ADRDeleteTemplate(TemplateID)

        MsgBox("The two image are the same at: " & Str(Confidence) & "%")
1) Why is the confidence level so low?

2) Why is the confidence level not changing when I compare different compressed files?

Hope you can help!

Re: Comparing 2 Images using Confidence

Posted: Sun Sep 27, 2009 12:27 pm
by Loïc
Hi Super22,

Your image is a quite special... However, I implemented a patch to the ADR engine to process it correctly.

Please, wait for the next release (next Monday) to get the problem fixed.

With best regards,

Loïc

Re: Comparing 2 Images using Confidence

Posted: Sun Sep 27, 2009 1:15 pm
by super22
Thanks Loïc for your quick response, I look forward to the next release!

I'm interested in what makes the image special. Are you able to share any more information?

Re: Comparing 2 Images using Confidence

Posted: Sun Sep 27, 2009 9:35 pm
by Loïc
You are welcome !

Your image is very bright, so thresholding (for content analys) were resulting in a fully blank image...

But now it is ok :mrgreen:

Loïc

Re: Comparing 2 Images using Confidence

Posted: Mon Oct 05, 2009 4:24 am
by super22
I just tested the Latest version (October 2, 2009) and the issue is resolved.

Thanks Loïc!

Re: Comparing 2 Images using Confidence

Posted: Mon Oct 05, 2009 11:32 am
by Loïc
Thank you for the feedback !

Loïc