MATLAB Answers

How to perform labelling in the 3D extracted features in classification?

2 views (last 30 days)
Tanya
Tanya on 15 Apr 2014
I extracted the features from many images in 3D. So the form of the extracted features (for example):
Image 1 --> 10 x 12 x 30
Image 2 --> 15 x 10 x 30
Image 3 --> 13 x 12 x 30
Image 4 --> 14 x 19 x 30
.
.
So on
In which, the first and second dimension are always changing, but the third dimension is still same (the dimension of the feature).
To do classification, I need to label each extracted features from each image with a label. And to make it easy, I have to keep that features (from each image) in a row.
So I reshape the features into
feat_reshape= reshape(feature,[size(feature,1)*size(feature,2) size(feature,3)]);
In this case, I'll have 2D features matrix. But still, I need it in 1D.
I already tried using "**imhist**" and keep each feature of each image in each row in a matrix. But still not give a good result. May be because there are many 0 value.
Then I tried to concatenate each column of each features (of each image), so become 1 row. But the problem for this is the different size of column in the concatenate matrix (element in each row).
For example :
Image 1 --> 10 x 12 x 30 = 3600 elements
Image 2 --> 15 x 10 x 30 = 4500 elements
Any suggestion,, how I can store my 3D extracted features and then label it to be used in LibSVM MATLAB??

Answers (0)

Community Treasure Hunt

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

Start Hunting!