Comparing images to know if they are visually identical using COM Interface in VBScript
Posted: 2017-08-23T05:56:18-07:00
Hello, I want to compare visually similar images and get difference number in VBScript using COM Interface of ImageMagick.
I tried following command and it worked fine in Windows Command Processor:
It gives the result 1.00 as it should.
But when I use following VBScript and execute it in WSH, COM interface throws the error unrecognized option "-metric PHASH".
I have ImageMagick 64-bit 7.0.2-9 Q16 installed in my 64-bit system.
This is the VBScript:
Please help me to get this script work as it should.
Thanks in advance.
I tried following command and it worked fine in Windows Command Processor:
Code: Select all
convert -metric PHASH C:\A.bmp C:\B.bmp NULL:
But when I use following VBScript and execute it in WSH, COM interface throws the error unrecognized option "-metric PHASH".
I have ImageMagick 64-bit 7.0.2-9 Q16 installed in my 64-bit system.
This is the VBScript:
Code: Select all
Dim IM: Set IM = WScript.CreateObject("ImageMagickObject.MagickImage")
Dim Result: Result = IM.Compare("-metric PHASH", "C:\A.bmp", "C:\B.bmp", "NULL:")
WScript.Echo "PHASH Comparison returned " + CStr(Result)
Thanks in advance.