02-03-2016 05:30 AM
hello all
i am trying to do feature extraction and classification of an image
my project is to take an input image extract hue of the image and threshold it and extract the features of the image and based on those feature clasify its color and shape of the image using imaq classifier.
questios:
1) what features are required to calculate size and shape of the image
2) what feature are required to calculate color of the image.
can you please guide me how to go forward to complete this task. here i ma attaching my code and snapshots and the input diagram please go through it and help me with possible ideas
thanks in advance.
02-03-2016 06:17 PM
You can use the IMAQ match pattern functions to find things like circles and squares as well as matching their colors. This will require that you create match images, which are just cropped areas of one of your sample images.
There are excellent examples of how to do this in the LV examples. Go to Help:Find Examples:Toolkits and Modules:Vision:Pattern matching
Once you've digested those examples, come back here for further help.
02-04-2016 04:09 AM
hey hi
thank you very much for your suggestion i am going through it but in my project i need to extract the features and use imaq classify for classification. i tried to do a simple example program for color classification by training color clasification interface but it is taking only rgb image but after thresholding it is converted to binary image so i litter bit stuck for feature extraction i have an idea to use imaq particle analysis but i am confused what factors to use for shape and color extractions.
as i am new to labview i really need your valuable suggestions to complete my project.
02-04-2016 01:15 PM
There is actually an example shipped with Vision Assistant that shows exactly how to do that.
Go to the folder C:\Program Files (x86)\National Instruments\Vision Assistant\solutions\manufacturing\legos
The source code you want to look at is located in the Custom Classifier.llb.
Custom Classifier.llb\RunLV_Custom Classifier - Extract Particles.vi shows you how to combine the information returned by IMAQ Color Learn and IMAQ Particle Analysis to create a Feature vector characterizing each object.
You first want to create a Custom Classifier using IMAQ Create Custom Classifier, then use the VI mentioned above on your images to learn know objects (use IMAQ Add Custom Sample).
You then want to learn your classifier using one of the VIs in the Classifier Engines palette and save it using IMAQ Write Classifier File.
This is not shown in the example.
Once this part is done, you want to use Custom Classifier.llb\RunLV_Custom Classifier - Extract Particles.vi again to compute the Feature vector of an unknown part (on new images), and classify it using IMAQ Classify Custom, as shown in Custom Classifier.llb\RunLV_Custom Classifier - Classify All Objects.vi
Hope this helps. Feel free to post again if you have some difficulties, but this example shows 80% of what needs to be done.
Best regards,
-Christophe
02-05-2016 06:49 AM
hi
thank you for your valuable suggetion i will go through first come back with my doubts
02-26-2016 05:59 AM
Hello all
I am working on brain mri feature extraction and classification. I completed the preprocessing stages successfully. But, when doing the next stages of feature extraction and classification though the blocks(palettes) are available, i am unable to connect them to get the result. so please send the code to complete this work successfully. or an approach to this how to do. please reply soon waiting for the reply.
03-06-2016 11:57 AM