예제 #1
0
        public void PinkShouldBeRecognizedAsRedTest()
        {
            var referenceBackgrounds = new ReferenceBackgrounds();
            referenceBackgrounds.Add("yellow", new Uri("resources\\yellow.jpg", UriKind.Relative));
            referenceBackgrounds.Add("black", new Uri("resources\\black.jpg", UriKind.Relative));
            referenceBackgrounds.Add("red", new Uri("resources\\red.jpg", UriKind.Relative));
            referenceBackgrounds.Add("green", new Uri("resources\\green.jpg", UriKind.Relative));
            var ip = new ImageProcessor(referenceBackgrounds);

            Assert.AreEqual("red", ip.GetNearestColor(new Uri("resources\\pink.jpg", UriKind.Relative)));
        }
예제 #2
0
 public ImageProcessor(ReferenceBackgrounds referenceBackgrounds)
 {
     this.referenceBackgrounds = referenceBackgrounds;
 }
예제 #3
0
 public ImageProcessor(ReferenceBackgrounds referenceBackgrounds)
 {
     this.referenceBackgrounds = referenceBackgrounds;
 }