@Test public void evaluateTest_solid0000FF_solid0099ff() { BufferedImage left = BufferedImageHelper.createSolidImage(new Color(0, 0, 255)); BufferedImage right = BufferedImageHelper.createSolidImage(new Color(0, 153, 255)); MaeQa maeQa = new MaeQa(); TransientOperation<Float, StaticColor> op = maeQa.evaluate(left, right); float[] expected = {0.0f, 0.6f, 0.0f}; checkOperationEqual(op, 0.2f, expected); }
@Override public TransientOperation<Float, StaticColor> evaluate(final BufferedImage left, final BufferedImage right) { CheckEqualSizePreprocessor equalSize = new CheckEqualSizePreprocessor(left, right); equalSize.process(); equalSize = null; MAEMetric metric = new MAEMetric(new SRGBColorConverter(new ConvenientBufferedImageWrapper(left)), new SRGBColorConverter(new ConvenientBufferedImageWrapper(right)), new Point(0, 0), new Point(left.getWidth(), left.getHeight())); return metric.execute(); }
MaeQa implements Qa<Float, StaticColor> { @Override public TransientOperation<Float, StaticColor> evaluate(final BufferedImage left, final BufferedImage right) { CheckEqualSizePreprocessor equalSize = new CheckEqualSizePreprocessor(left, right); equalSize.process(); equalSize = null; MAEMetric metric = new MAEMetric(new SRGBColorConverter(new ConvenientBufferedImageWrapper(left)), new SRGBColorConverter(new ConvenientBufferedImageWrapper(right)), new Point(0, 0), new Point(left.getWidth(), left.getHeight())); return metric.execute(); } }
MaeQa implements Qa<Float, StaticColor> { @Override public TransientOperation<Float, StaticColor> evaluate(final BufferedImage left, final BufferedImage right) { CheckEqualSizePreprocessor equalSize = new CheckEqualSizePreprocessor(left, right); equalSize.process(); equalSize = null; MAEMetric metric = new MAEMetric(new SRGBColorConverter(new ConvenientBufferedImageWrapper(left)), new SRGBColorConverter(new ConvenientBufferedImageWrapper(right)), new Point(0, 0), new Point(left.getWidth(), left.getHeight())); return metric.execute(); }  }
MaeQa implements Qa<Float, StaticColor> { @Override public TransientOperation<Float, StaticColor> evaluate(final BufferedImage left, final BufferedImage right) { CheckEqualSizePreprocessor equalSize = new CheckEqualSizePreprocessor(left, right); equalSize.process(); equalSize = null; MAEMetric metric = new MAEMetric(new SRGBColorConverter(new ConvenientBufferedImageWrapper(left)), new SRGBColorConverter(new ConvenientBufferedImageWrapper(right)), new Point(0, 0), new Point(left.getWidth(), left.getHeight())); return metric.execute(); }  @Override TransientOperation<Float, StaticColor> evaluate(final BufferedImage left, final BufferedImage right); }
MaeQa implements Qa<Float, StaticColor> { @Override public TransientOperation<Float, StaticColor> evaluate(final BufferedImage left, final BufferedImage right) { CheckEqualSizePreprocessor equalSize = new CheckEqualSizePreprocessor(left, right); equalSize.process(); equalSize = null; MAEMetric metric = new MAEMetric(new SRGBColorConverter(new ConvenientBufferedImageWrapper(left)), new SRGBColorConverter(new ConvenientBufferedImageWrapper(right)), new Point(0, 0), new Point(left.getWidth(), left.getHeight())); return metric.execute(); }  @Override TransientOperation<Float, StaticColor> evaluate(final BufferedImage left, final BufferedImage right);  }