@Test(expected = PreprocessingException.class) public void evaluateTest_differentWidth() { BufferedImage left = BufferedImageHelper.createSolidImage(new Color(0, 0, 0), 500, 500); BufferedImage right = BufferedImageHelper.createSolidImage(new Color(0, 0, 0), 400, 500); MseQa mseQa = new MseQa(); TransientOperation<Float, StaticColor> op = mseQa.evaluate(left, right); }
@Override public TransientOperation<Float, StaticColor> evaluate(final BufferedImage left, final BufferedImage right) { CheckEqualSizePreprocessor equalSize = new CheckEqualSizePreprocessor(left, right); equalSize.process(); equalSize = null; MSEMetric metric = new MSEMetric(new SRGBColorConverter(new ConvenientBufferedImageWrapper(left)), new SRGBColorConverter(new ConvenientBufferedImageWrapper(right)), new Point(0, 0), new Point(left.getWidth(), left.getHeight())); return metric.execute(); }
MseQa 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; MSEMetric metric = new MSEMetric(new SRGBColorConverter(new ConvenientBufferedImageWrapper(left)), new SRGBColorConverter(new ConvenientBufferedImageWrapper(right)), new Point(0, 0), new Point(left.getWidth(), left.getHeight())); return metric.execute(); } }
MseQa 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; MSEMetric metric = new MSEMetric(new SRGBColorConverter(new ConvenientBufferedImageWrapper(left)), new SRGBColorConverter(new ConvenientBufferedImageWrapper(right)), new Point(0, 0), new Point(left.getWidth(), left.getHeight())); return metric.execute(); }  }
MseQa 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; MSEMetric metric = new MSEMetric(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); }
MseQa 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; MSEMetric metric = new MSEMetric(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);  }