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


i extracted features many images in 3d. form of 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  .  .  on 

in which, first , second dimension changing, third dimension still same (the dimension of feature).

to classification, need label each extracted features each image label. , make easy, have keep features (from each image) in row.

so reshape features

  feat_reshape= reshape(feature,[size(feature,1)*size(feature,2) size(feature,3)]);  

in case, i'll have 2d features matrix.
still, need in 1d.

i tried using "imhist" , keep each feature of each image in each row in matrix. still not give result. may because there many 0 value.

then tried concatenate each column of each features (of each image), become 1 row. problem different size of column in 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 can store 3d extracted features , label used in libsvm matlab??

you need method aggregate or pool dense features per image, if label assigned each image. simple histogram 1 approach. alternatives are

  • just resize original 3d image fit fixed size, , compute features.
  • bag-of-words: first cluster per-pixel features , represent every pixel corresponding cluster index (visual words). summarize image histogram.
  • spatial-pyramid: instead of histogram on entire image, split image grids different resolution (1x1, 2x2, etc), summarize features in each cell histogram (or other pooling), , concatenate of them. pooling simple statistic, min, max, mean, etc.

if none works well, suspect feature design. try find best training parameter of svm cross validation (check libsvm documentation).


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -