Пример #1
0
        public void AssignBestMatchColors()
        {
            Image <Bgr, byte> result = ColorQuantization.AssignBestMatchColors(image, colorTable);

            Assert.AreEqual(new Bgr(0, 0, 0), result[0, 0]);
            Assert.AreEqual(new Bgr(0, 0, 0), result[0, 1]);
            Assert.AreEqual(new Bgr(100, 100, 100), result[1, 0]);
            Assert.AreEqual(new Bgr(0, 0, 0), result[1, 1]);
        }
Пример #2
0
 private bool QuantizeImage(Image <Bgr, byte> i)
 {
     quantizedImage = ColorQuantization.AssignBestMatchColors(i, testTable);
     return(true);
 }