繁体   English   中英

使用NI VISION在Labwindows \\ CVI中识别图像中的绿色

[英]Identify GREEN color in an image with NI VISION in Labwindows\CVI

我在CVI中使用NI VISION imaqColorHistogram(...) ,它为每个平面提供了一份报告 ,针对我选择的colorMode(RGB,HSL HSV,HSI,CIE,CIEXYZ)在需要包含绿色斑点的图像上的报告(斑点是大部分图像)

报告包括:

int* histogram; //An array describing the number of pixels that fell into each class.
int histogramCount; //The number of elements in the histogram array.
float min; //The smallest pixel value that the function classified.
float max; //The largest pixel value that the function classified.
float start; //The smallest pixel value that fell into the first class.
float width; //The size of each class.
float mean; //The mean value of the pixels that the function classified.
float stdDev; //The standard deviation of the pixels that the function classified.
int numPixels; //The number of pixels that the function classified.

我想验证大多数彩色图像是否最接近绿色。

我应该使用哪种ColorMode? 我对该报告的标准是什么?

我使用HSL色彩模式,仅检查了色相平面。

通过观察几张图片的色相值(在Windows Paint中),我设置了色相值的公差并通过报告中的mean字段对其进行了检查。

奇迹般有效。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM