CIEDE2000 implements ImageCombiner<MBFImage, MBFImage, FImage> { public static double calculateDeltaE(double [] lab1, double[] lab2) { return calculateDeltaE(lab1[0],lab1[1],lab1[2],lab2[0],lab2[1],lab2[2]); }  static double calculateDeltaE(double [] lab1, double[] lab2); static float calculateDeltaE(float [] lab1, float[] lab2); static float calculateDeltaE(Float [] lab1, Float[] lab2); static double calculateDeltaE(double L1, double a1, double b1, double L2, double a2, double b2); static FImage makeDisparityMap(MBFImage im1, MBFImage im2); @Override FImage combine(MBFImage image1, MBFImage image2);  }
@Test public void test() { for (double[] data : testData) { double L1 = data[0]; double a1 = data[1]; double b1 = data[2]; double L2 = data[3]; double a2 = data[4]; double b2 = data[5]; double de = data[6]; double cde = CIEDE2000.calculateDeltaE(L1, a1, b1, L2, a2, b2); assertEquals(de, cde, 5e-5); } }
@Test public void testReverse() { for (double[] data : testData) { double L1 = data[3]; double a1 = data[4]; double b1 = data[5]; double L2 = data[0]; double a2 = data[1]; double b2 = data[2]; double de = data[6]; double cde = CIEDE2000.calculateDeltaE(L1, a1, b1, L2, a2, b2); assertEquals(de, cde, 5e-5); } }