简体   繁体   English

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

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

I am using NI VISION imaqColorHistogram(...) in CVI which gives me a report for each plane , for a colorMode that i choose ( RGB , HSL HSV, HSI,CIE, CIEXYZ ) on an image which needs to contains a GREEN spot (the spot is most of the image) 我在CVI中使用NI VISION imaqColorHistogram(...) ,它为每个平面提供了一份报告 ,针对我选择的colorMode(RGB,HSL HSV,HSI,CIE,CIEXYZ)在需要包含绿色斑点的图像上的报告(斑点是大部分图像)

A report includes: 报告包括:

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.

I want to verify that the most of colored image is as closest to GREEN. 我想验证大多数彩色图像是否最接近绿色。

What ColorMode should i use? 我应该使用哪种ColorMode? and what should be my criteria on that report? 我对该报告的标准是什么?

I used HSL color mode and checked the Hue plane only. 我使用HSL色彩模式,仅检查了色相平面。

By observing the hue Value (in windows Paint) of several pictures, i set the tolerance of the Hue value and checked it via mean field in the report. 通过观察几张图片的色相值(在Windows Paint中),我设置了色相值的公差并通过报告中的mean字段对其进行了检查。

Works like a charm. 奇迹般有效。

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

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