The documentation for the IMAQ Classify Color Advanced VI says that:
- Class is the class into which the classifier session categorizes the input sample.
- Class Results is an array with one element for every class in the classifier session, where Class is one of the classes in Classifier Session, and Distance is the distance from the closest sample in Class to the input sample when performing Nearest Neighbor and K-Nearest Neighbor classification. Distance is the distance between the input sample and the center of each class when performing Minimum Mean Distance classification.
I am noticing that the Class output is not always the same as the lowest distance Class in the Class Results output. Logically, I feel the final class should be the smallest Distance.
Please see in the example snapshot here. The Class Distance for Orange is 91.76 and for Green it is 375.75. However, the Classes output is returned as Green.
By the way, for the engine option for the classifier file I am using K-nearest Neighbor with K as 3 and Metric as Sum.
Can you please explain the mismatch between the Classes output and the smallest Distance Class in the Class Results output? Seems like a bug in the VI.