资源简介

图像的特征用到了Dense Sift,通过Bag of Words词袋模型进行描述,当然一般来说是用训练集的来构建词典,因为我们还没有测试集呢。虽然测试集是你拿来测试的,但是实际应用中谁知道测试的图片是啥,所以构建BoW词典

资源截图

代码片段和文件信息

% ========================================================================
% Image Classification using Bag of Words and Spatial Pyramid BoW
% Created by Piji Li (peegeelee@gmail.com)  
% Blog: http://www.zhizhihu.com
% QQ: 379115886
% IRLab. : http://ir.sdu.edu.cn     
% Shandong UniversityJinanChina
% 10/24/2011

clear pg_opts
rootpath=‘E:\workspace\matlab\work\PG_BOW_DEMO\‘;

%%
addpath libsvm;
addpath BOW;

%% change these paths to point to the image data and label location
images_set=strcat(rootpath‘images‘);
data=strcat(rootpath‘data‘);
labels=strcat(rootpath‘labels‘);

%%
pg_opts.imgpath=images_set; % image path
pg_opts.datapath=data;
pg_opts.labelspath=labels;

%%
% local and global data paths
pg_opts.localdatapath=sprintf(‘%s/local‘pg_opts.datapa

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-10-24 12:28  PG_BOW_DEMO\
     目录           0  2011-10-24 12:24  PG_BOW_DEMO\BOW\
     文件        3821  2011-10-24 11:43  PG_BOW_DEMO\BOW\CalculateDictionary.m
     文件        3354  2011-10-24 11:44  PG_BOW_DEMO\BOW\CompilePyramid.m
     文件        2384  2011-10-24 11:44  PG_BOW_DEMO\BOW\do_assignment.m
     文件        2198  2011-10-24 12:58  PG_BOW_DEMO\BOW\do_classification_inter_svm.m
     文件        1731  2011-10-24 12:58  PG_BOW_DEMO\BOW\do_classification_rbf_svm.m
     文件         875  2010-12-21 21:34  PG_BOW_DEMO\BOW\do_normalize.m
     文件        2243  2011-10-24 12:58  PG_BOW_DEMO\BOW\do_p_classification__inter_svm.m
     文件        1382  2011-10-24 12:58  PG_BOW_DEMO\BOW\do_p_classification__rbf_svm.m
     文件        1132  2011-10-24 12:57  PG_BOW_DEMO\BOW\draw_cm.m
     文件        1303  2010-12-21 21:32  PG_BOW_DEMO\BOW\EuclideanDistance.m
     文件         446  2011-10-24 11:41  PG_BOW_DEMO\BOW\find_grid.m
     文件        4292  2010-09-08 21:48  PG_BOW_DEMO\BOW\find_sift_grid.m
     文件        2765  2011-10-24 11:45  PG_BOW_DEMO\BOW\GenerateSiftDescriptors.m
     文件         759  2009-01-17 20:48  PG_BOW_DEMO\BOW\hist_isect.m
     文件        3305  2010-10-31 22:25  PG_BOW_DEMO\BOW\hist_isect_c.c
     文件        8192  2010-10-31 22:26  PG_BOW_DEMO\BOW\hist_isect_c.mexw32
     文件         154  2010-06-01 14:35  PG_BOW_DEMO\BOW\load_image.m
     文件         601  2011-10-24 11:41  PG_BOW_DEMO\BOW\MakeDataDirectory.m
     文件         223  2008-12-10 16:46  PG_BOW_DEMO\BOW\make_dir.m
     文件         650  2008-12-10 16:46  PG_BOW_DEMO\BOW\normalize_sift.m
     文件         324  2010-06-01 15:44  PG_BOW_DEMO\BOW\num2string.m
     文件         264  2010-06-01 15:44  PG_BOW_DEMO\BOW\read_image_db.m
     文件       14315  2010-10-16 08:01  PG_BOW_DEMO\BOW\rotateXLabels.m
     文件         551  2011-10-24 12:26  PG_BOW_DEMO\BOW\show_results_script.m
     文件         258  2010-09-27 10:04  PG_BOW_DEMO\BOW\sumnormalize.m
     目录           0  2011-10-21 22:43  PG_BOW_DEMO\images\
     目录           0  2011-10-24 09:16  PG_BOW_DEMO\images\testing\
     目录           0  2011-10-24 09:16  PG_BOW_DEMO\images\testing\Phoning\
     文件        7711  2010-12-01 14:34  PG_BOW_DEMO\images\testing\Phoning\Phoning_0041.jpg
............此处省略401个文件信息

评论

共有 条评论