I want to compare two images and get a metric on their similarity returned to be used by a subsequent program in the script.
I found a usage example hereand I'm trying to model my command after this example:
Code: Select all
compare -metric MAE image1 image2 null: 2>1
Code: Select all
compare -identify -metric MAE Crop1.jpg Interactive_Template.jpg null:
Code: Select all
Crop1.jpg[0] JPEG 345x855 345x855+0+0 8-bit sRGB 7.45KB 0.016u 0:00.017
Interactive_Template.jpg[0] JPEG 345x855 345x855+0+0 8-bit sRGB 14.5KB 0.016u 0:00.013
25.0933 (0.0984051)
Code: Select all
compare -identify -metric MAE Crop1.jpg Interactive_Template.jpg null: > result.txt
Code: Select all
Crop1.jpg[0] JPEG 345x855 345x855+0+0 8-bit sRGB 7.45KB 0.016u 0:00.017
Interactive_Template.jpg[0] JPEG 345x855 345x855+0+0 8-bit sRGB 14.5KB 0.016u 0:00.013
I don't understand what the "null: " parameter is doing, so I tried removing it.
Then I get this error:
Code: Select all
C:\Data\DEV\>compare -identify -metric MAE Crop1.jpg Interactive_Template.jpg
compare.exe: missing an image filename `Crop1.jpg' @ error/compare.c/CompareImageCommand/951.