Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ classify VI concept needed

Solved!
Go to solution

Hi

How does Labview Classify objects by using IMAQ classify VI?

What are the different parameters that it checks to determine whether an object belongs to the class or not?

Any example program to illustrate this will be highly useful.

Regards

Aveo

0 Kudos
Message 1 of 27
(6,862 Views)

Hello aveo,

 

the classification uses shape descriptors (feature vectors) as follows:

 

Invariant Features

The NI Particle Classifier uses the following features for scale-invariant, rotation-invariant, and reflection-invariant shape descriptors:

  • Feature 1 describes the circularity of the sample.
  • Feature 2 describes the degree of elongation of the sample.
  • Feature 3 represents the convexity of the sample shape.
  • Feature 4 is a more detailed description of the convexity of a sample shape.
  • Feature 5 is used for the discrimination of samples with holes.
  • Feature 6 is used for more detailed discrimination of samples with holes.
  • Feature 7 represents the spread of the sample.
  • Feature 8 represents the slenderness of the sample.

Classification

The NI Particle Classifier can apply the following classification algorithms: Minimum Mean Distance, Nearest Neighbor, and K-Nearest Neighbor. Each of these methods may employ different distance metrics: Maximum distance (L∞), Sum distance (L1), and Euclidean distance (L2).

 

There is some more information available in the NI Vision Concepts manual (more about classification and distance metrics). Search for the examples via the "Help -> Find examples" and search for "classification". You have two examples there.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 2 of 27
(6,854 Views)

Hi Klemen,

Thanks for the quick info about classifiers.

Hey just wanted you to know that the link(classification algorithms:) which you referred me to read is not opening. 

That's fine. I read a few articles about it from the NI website.

I have one more question regarding classifiers.

While trying out the classifier training interface i noticed that there was no option to enter any FEATURE VECTOR for the classes.

IS THERE ANY WAY IN WHICH I CAN MAKE A CUSTOM FEATURE VECTOR AND DESIGN A CUSTOM CLASSIFIER?

Regards

Aveo 

0 Kudos
Message 3 of 27
(6,843 Views)

Sorry about that link - it should not be a link. I copied that from NI Vision Concepts Manual and forgot to remove the link. You have all the explanation about the NI classification there (I suggest if you come across any problems, this is the first reference to use). It is located in:

 

"C:\Program Files (x86)\National Instruments\Vision\Documentation"

 

I think it is possible to define your descriptors for custom feature vector. You just need to think about the best description of your objects you need to classify. Take a look at the "Classifier Types -> Create Custom Classifier".

 

I have been eager to try the NI classification library for some time, but never got to it. The nearest I've come across classifiation was throught SIFT and MSER matching and SVM classification in Matlab. And I've forgotten most about it.

 

I hope someone with more experience can help you.

 

I am planning to try the classification in the near future, but not just yet because of the other current projects.

 

Best regards,

K

 

 

 

 


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 4 of 27
(6,840 Views)
Solution
Accepted by topic author aveo

Hello aveo,

 

I got around doing some classification testing and maybe this can help you in your project somehow.

 

I have followed the paper algorithm to create a feature vector:

 

http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=5376498&url=http%3A%2F%2Fieeexplore.ieee.org%2...

 

or

 

http://hal.archives-ouvertes.fr/docs/00/75/25/09/PDF/118.pdf

 

I am attaching this vi.


Then I created custom classifier using two examples of built feature vectors, trained the nearest-neighbour classifier and classified the sample (see the attached vi also).

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 5 of 27
(6,828 Views)

Vision Assistant comes with a custom classifier example.

Look at the Lego example in the Solution Wizard. In the corresponding folder, there is code that shows how to implement it in LabVIEW, as the Vision Assistant script uses a Run LabVIEW step.

0 Kudos
Message 6 of 27
(6,826 Views)

Hi Klemen,

Your replies work wonders for me. 

Thanks a lot for this.

I was able to build a custom classifier for my need based on the VI that you attached 🙂

Regards

Aveo

 

0 Kudos
Message 7 of 27
(6,801 Views)
Glad to be of help.

Good luck with your projects.

Best regards,
K

https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 8 of 27
(6,789 Views)

Hi Klemen,

Hey i've been working with IMAQ Train Nearest Neighbor VI. There is an indicator called Training Results. I'm not able to understand on what basic are they calculating the Standard Deviation? 

I searched the NI documents and all i could find was, I quote- "Standard Deviation is the standard deviation from the mean of all samples in Class."

Here's the link http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_train_nearest_neighbor/

How do I get the minimum and maximum sample value to determine how low my standard deviation is?

Regards

Aveo

0 Kudos
Message 9 of 27
(6,766 Views)

Hello,

 

also try this:

 

http://zone.ni.com/reference/en-XX/help/372916M-01/nivisionconcepts/classification_indepth_discussio...

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 10 of 27
(6,740 Views)