【发布时间】:2015-11-01 22:12:09
【问题描述】:
我有以下代码:
MagickWand *wand = NewMagickWand();
char* cmdargs[] = {
"compare",
"receipt-expected.png",
"-metric",
"psnr",
"difference.png",
"difference2.png",
NULL
};
int argcount = 6;
// Allocate memory for MagickCommand
ImageInfo * info = AcquireImageInfo();
ExceptionInfo* e = AcquireExceptionInfo();
// Execute command
char *metadata = NULL;
MagickBooleanType status = MagickCommandGenesis(info, CompareImageCommand, argcount, cmdargs, &metadata, e);
status 为 0,我认为它可以正常工作,因为它没有错误并且命令在 CLI 中正常工作。
我如何获得它产生的指标? meta 是 NULL。
$ compare receipt-expected.png -metric psnr difference.png difference2.png
15.4169
【问题讨论】:
标签: image-processing imagemagick