IMAQ_IGNORE_BLACK_AND_WHITE

Hi all

I am writing in LabWindows/CVI function for research of color on the image of grabed pattern. Unfortunately I can not very good results, only more indifferent because part of the assessment model is black or white. I want to eliminate to mark these 2 colors by imaqLearnColorPattern Vision function of NOR.

There is ignoreMode of variable ColorIgnoreMode;  IMAQ_IGNORE_BLACK_AND_WHITE, but it is a part of LearnColorPatternOptions_struct and there ColorInformation_struct where I do not understand:

Double * info; An array of color information that represents the analysis of the spectrum of colors of a region of an image in a shape compact.

What is the region color spectrum analysis in a compact?

Can someone help me I have to pass on the News ?

Thank you!!!

Radovan Demko

used structs:

typedef struct ColorInformation_struct {}
infoCount int;
int saturation;
Double * info; An array of color information that represents the analysis of the spectrum of colors of a region of an image in a shape compact.
} ColorInformation;

typedef struct LearnColorPatternOptions_struct {}
LearningMode learnMode;
ImageFeatureMode featureMode;
int threshold;

hue values.
ColorIgnoreMode ignoreMode;
ColorInformation * colorsToIgnore; An array of structures ColorInformation, providing a set of colors to exclude the characteristics of the color of the image of the model.
int numColorsToIgnore;
} LearnColorPatternOptions;

Hi Radovan,

This is Austin Hill in the technique of applications! Thanks for asking about this Vision function in the CVI. The answer is a bit involved, so let me know if one of my points need clarification.

You can use the imaqLearnColor () function to acquire the table you can colorInformation LearnColorPatternOptions_struct. You can use the function LearnColor to detect shades of black and white, you want to avoid in your color match model and put it in the Options_struct. Technically unnecessary to pass anything to "info *' in the ColorInformation struct, because you get to learn colors."

Basically, what you need to do to eliminate these 2 colors is:

1. call the imaqLearnColor to determine the color you want to ignore

2. run ColorInformation * in the LearnColorPatternOptions as colorsToIgnore

3 call imaqLearnColorPattern as options to say the image of what to look for / ignore

I also recommend you take a look at / try running the example that calls this function located at C:\Users\Public\Documents\National Instruments\CVI\samples\Vision\2. Functions\Color Pattern Matching. If you open the workspace called Color Pattern Matching, you can see how this is implemented in a specific way.

If you have any questions, feel free to let me know and answer here.

Best!

Austin H.

Engineering applications

NEITHER

Tags: NI Software

Similar Questions

Maybe you are looking for