adikhosla/feature-extraction

compile errors

frash1989 opened this issue · 1 comments

Hi
When I try to extract lbp features and ssim features with Matlab2015b, the code cannot work.
For lbp feature,the errors are listed below:

Dataset: demo
Processing filelist (train, lbp): batch 0 of 1
Processing filelist (train, lbp): batch 1 of 1
Error using getmapping (line 37)
ASSUMEDTYPE must be an integer type name.

Error in lbp_original (line 3)
mapping=getmapping(8,'u2');

Error in lbp_original_4x4 (line 3)
feature_L0(:,1) = lbp_original(I);

Error in lbp_feature (line 10)
[lbp_L0 lbp_L1 lbp_L2] = lbp_original_4x4(im);

Error in extract_lbp (line 17)
d = lbp_feature(img);

Error in extract_feature (line 15)
[feat, x, y, wid, hgt] = feval(['extract_' feature], img, c);

Error in filelist_feature (line 23)
parfor i=1:length(filelist)

Error in batch_feature (line 42)
poolfeat = filelist_feature('', filelist(this_batch), feature, c);

Error in datasets_feature (line 34)
batch_feature(train_lists{i}, 'train', feature, c);

Error in demo (line 24)
datasets_feature(datasets, train_lists, test_lists, feature, c);

For ssim featurem, the errors are listed below:

Dataset: demo
Learning dictionary for feature: ssim, size 20
Running k-means, dictionary size 20...done!
Saving dictionary: cache//demo//dictionary_ssim_20.mat
Processing filelist (train, ssim): batch 0 of 1
Processing filelist (train, ssim): batch 1 of 1
Error using cellfun
Non-scalar in Uniform output, at index 1, output 1.
Set 'UniformOutput' to false.

Error in max_pooling (line 36)
emptyIdx = find(cellfun(@(x) sum(x)==0, idx));

Error in filelist_feature (line 37)
poolfeat = max_pooling(llcfeat, info, c.pool_region, p.pyramid_levels);

Error in batch_feature (line 42)
poolfeat = filelist_feature('', filelist(this_batch), feature, c);

Error in datasets_feature (line 34)
batch_feature(train_lists{i}, 'train', feature, c);

Error in demo (line 24)
datasets_feature(datasets, train_lists, test_lists, feature, c);

Hi frash1989,

Thanks for pointing out these errors! I have updated the getmapping.m code such that it will now support newer versions of Matlab. I have yet to look into the issue with SSIM. I will let you know once I fix that.

Thanks!
Aditya