Component to compare Images

Component to compare Images

  
Hi all,

I'm looking for a component or an API that returns how different two images are as a percentage value based.

I've looked at forge, there's one component named Image Toolbox,  but it doesn't compare 2 images.

Does anyone of you did something like that? If so, can you "forge" it?

I would appreciate it and it would avoid to create something from scratch.

Thanks

Nelson Freitas

If I remember correctly, ImageMagick, which some of these Forge components are based on has a compare. One approach may be to expand one of these to expose that API call.
Hi Nelson,

I'll upload a new version of Image Toolbox with that feature shortly...

EDIT: Updated component in the Forge. Enjoy!
Hi André and Gerry,

I also started to change the "old" Image Toolbox to support the compare feature. But until yesterday I couldn't put it work. It didn't returned anything.

Anyway, I'll use your version and will peek at the code to see what I was doing wrong.

Thank you very much André :) this has saved me a lot of time.

Nelson
Hi André,

I've tested the compare feature, and Its always returning the error "Input string was not in a correct format." with the stack:

nput string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt)
   at OutSystems.NssImageToolbox.CssImageToolbox.MssCompare(Byte[] ssImageA, Byte[] ssImageB, Decimal& ssResult, Byte[]& ssResultImage)
   at ssBrowserStack_App.RssExtensionImageToolbox.MssCompare(HeContext heContext, Byte[] inParamImageA, Byte[] inParamImageB, Decimal& outParamResult, Byte[]& outParamResultImage)

I'll try to understand what could be, but if you have any clue about it, can you help me somehow?

Thanks
I have an idea...
The images you are comparing must be of the same size. Are they?
First, I've tested with 2 completly different images, but then I've tested, by passing in the 2 inputs, the same image.

It returned the same error.
Hi All,

just for you all to know, and to close this "issue", I have now the extension working correctly on the needed platform environment.

But let me explain briefly what I did found out:

This new extension ImageToolbox works on every platform clouds, but there are some internal platforms that it does not work.

It does not return any error, I've filled out the Extension with Audit functions, and it looked like there was nothing wrong.

So, I went to the machine remotly, and executed the "compare.exe" file (with command prompt), which is used on this extension. And, instead of returning the parameters missing text, it returned an error saying there was a missing dll file, namely vcomp100.dll.

So, the solution here was to copy this dll file to c:\windows\ (system32 or sysWOW64 accordingly to the 32bits or 64bits), or installing the missing software Visual C++ 20XX Redistributable Package (x64)

It looks like this software is defaulty installed on platform clouds, but not on some internal Platforms.

Anyway, this is fixed, and if it happens to any of our community users, now you know what to do.

Thanks everyone.

Nelson Freitas