how to do image clssification using SVM?

I am going to separate two different regions from the same image. For this I am using SVM . As m a beginner, I am not getting to use the image samples for training SVM . Basically I want to know how to start , If I have .tif image with me. Please hepl. Thank u !

4 件のコメント

Bruno Pop-Stefanov
Bruno Pop-Stefanov 2014 年 1 月 20 日
A support vector machine can only be as accurate as the features you choose to use are descriptive of the data you want to classify. The main difficulty in your problem is to understand what you are trying to classify so that you can choose descriptive features that would effectively classify your data.
If I understand you correctly, you would like to separate background pixels from foreground pixels. Each data point in your set is therefore a pixel in the input image(s). Try to identify the characteristics of a background pixel versus those of a foreground pixel: is it the hue, saturation, value? Is it the coherence with its neighboring pixels? Once you have clearly defined what makes a region in your image, then you can define features to extract from the image for each data point. These features will be what your SVM will rely on to classify future data.
Image Analyst
Image Analyst 2014 年 1 月 20 日
What are the two different regions? Bright blobs and dark blobs? Bright squares and bright circles? What do you think the 2 features you measure could be? Area, brightness, shape, texture, what????? First you have to define your features, so what are they? Post your image to help you explain to us so we can help you.
Priyanka Athawale
Priyanka Athawale 2014 年 1 月 21 日
thank you so much sir , I am sending a part of of my image ,the original image is 815x825x3unit8. I want to separate two different green color(marked by red& yellow resp.) regions which occupy certain area. I want to how to proceed for SVM classification ? and how to write the code for the same as I am a beginner. Regards-Priyanka
Bruno Pop-Stefanov
Bruno Pop-Stefanov 2014 年 1 月 21 日
I don't think you need to use something as complex as an SVM for that problem. If you really want to use an SVM, you will have to mark every pixel belonging to one shade or the other in order to train your classifier. That sounds like a pain to me.
I would suggest to write a simple color thresholding in HSV or L*a*b* space after trying out thresholds that effectively segment the two shades of green.
Here is an example in L*a*b* space:
There is also a built-in algorithm in the Computer Vision System Toolbox:

サインインしてコメントする。

 採用された回答

Image Analyst
Image Analyst 2014 年 1 月 21 日

0 投票

See my color segmentation demos in my File Exchange. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 They can be adapted to your image.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeModify Image Colors についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by