c#如何检测图像颜色

c# how to detect image color

我有一张照片,在我的照片里有几滴不同颜色的血。我想获得每一滴血的颜色(通过颜色名称或颜色代码)

您可以使用它来获取图像中的每个像素颜色

using System.Drawing;


Bitmap b = new Bitmap( "Image file Path" );
Color x = b.GetPixel( x, y );