Hi, I am trying to compare two images using im4java's compare.run()..
I want the value of -meric AE to a variable but not sure how to get one..
Here is my code snippet..
CompareCmd compare = new CompareCmd(); ArrayListOutputConsumer output = new ArrayListOutputConsumer(); IMOperation cmpOp = new IMOperation();
cmpOp.metric("AE"); // root mean squared (normalized root mean squared) cmpOp.fuzz(10.0); cmpOp.addImage(); cmpOp.addImage(); cmpOp.addImage();
compare.setOutputConsumer(output); compare.run(cmpOp, getScreenshotDir+ "/MIFF-"+nonBaseImg, getScreenshotDir+ "/MIFF-"+baseImg, getScreenshotDir+ "/MIFF-"+nonBaseImg+"__diff"); ArrayList<String> cmdOP = output.getOutput(); log.info("before O/P"); for (String line : cmdOP) { log.info("----------> "+line); }
I am not able to print the value using the log statements here..
Any help would be appreciated..
Log in to post a comment.
Hi,
I am trying to compare two images using im4java's compare.run()..
I want the value of -meric AE to a variable but not sure how to get one..
Here is my code snippet..
CompareCmd compare = new CompareCmd();
ArrayListOutputConsumer output = new ArrayListOutputConsumer();
IMOperation cmpOp = new IMOperation();
cmpOp.metric("AE"); // root mean squared (normalized root mean squared)
cmpOp.fuzz(10.0);
cmpOp.addImage();
cmpOp.addImage();
cmpOp.addImage();
compare.setOutputConsumer(output);
compare.run(cmpOp, getScreenshotDir+ "/MIFF-"+nonBaseImg,
getScreenshotDir+ "/MIFF-"+baseImg,
getScreenshotDir+ "/MIFF-"+nonBaseImg+"__diff");
ArrayList<String> cmdOP = output.getOutput();
log.info("before O/P");
for (String line : cmdOP) {
log.info("----------> "+line);
}
I am not able to print the value using the log statements here..
Any help would be appreciated..