Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Get distance between colors

$
0
0
CompareTo only compares the Width*Height of both images. This is what you are looking for:
using (MagickImage navy = new MagickImage("xc:navy"))
{
  using (MagickImage blue = new MagickImage("xc:blue"))
  {
    double distance = navy.Compare(blue, Metric.RootMeanSquaredError);
    Console.WriteLine((Quantum.Max * distance).ToString());
    Console.WriteLine(distance.ToString());
  }
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>