Feature extraction for classification

조회 수: 2 (최근 30일)
Ushna Asif
Ushna Asif 2017년 9월 20일
댓글: Ushna Asif 2017년 9월 22일
Hi there, I attached the images that I want to extract features for classification. these are zoomed images of different fruits. kindly help me how to find features on these images. I tried using extractHOGfeatures function but its not giving me correct classification.
  댓글 수: 2
Image Analyst
Image Analyst 2017년 9월 20일
What are the classes? How many classes are in each photo? One? If so, then one feature may simply be the color. Why do you think HOG should be what you want? Can you attach what you think the classification should look like?
Ushna Asif
Ushna Asif 2017년 9월 21일
I have 10 classes for 10 different fruits.Each fruit have 50 samples for training. Then for testing I have similar looking test dataset. Classification should identify the given input fruit name.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2017년 9월 21일
I would think that just color (Hue and Saturation) and texture might be enough. Of course if two images look the same but are different fruits, there is no telling, like you have an image of orange grainy things and one is an apricot and one is a nectarine.
  댓글 수: 3
Image Analyst
Image Analyst 2017년 9월 21일
For example, convert to HSV color space and get the mean hue, saturation, and value.
hsvImage = rgb2hsv(rgbImage);
meanHue = mean2(hsvImage(:,:,1))
meanSat = mean2(hsvImage(:,:,2))
meanValue = mean2(hsvImage(:,:,3))
sdImage = stdfilt(hsvImage(:,:,3)); % Std Deviation of Value channel.
meanStdDev = mean2(sdImage);
You can make a feature vector for this one image like
featureVector = [meanHue, meanSat, meanValue, meanStdDev];
Ushna Asif
Ushna Asif 2017년 9월 22일
Thanks alot

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Akira Agata
Akira Agata 2017년 9월 21일
I believe the following example will be your help. Using this method, you can extract 4096-dimensional feature vector for each image.
  댓글 수: 1
Ushna Asif
Ushna Asif 2017년 9월 21일
편집: Ushna Asif 2017년 9월 21일
I'm using Matlab 2015a and this function alexnet is not available in this version. I tried downloading this using alexnet function in command window which suppose to provide a downloading link but it says undefined function or variable.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by