========================================================================
Spatial Pyramid Code
Created by Joe Tighe (jtighe@cs.unc.edu) and Svetlana Lazebnik (lazebnik@cs.unc.edu)
1/17/2009
This MATLAB code implements spatial pyramid computation and matching as
described in the following paper:
S. Lazebnik, C. Schmid, and J. Ponce, ``Beyond Bags of Features: Spatial
Pyramid Matching for Recognizing Natural Scene Categories,'' CVPR 2006.
========================================================================
The main function to build the spatial pyramid is BuildPyramid.
For further information on Buildpyramid and other functions discussed in
this file refer to comments in the .m files or look at Example.m.
(The images/ directory contains a few sample images that are used by
Example.m to compute spatial pyramids and their histogram intersection
matrix.)
BuildPyramid first extracts SIFT descriptors on a regular grid from each
image. It then runs k-means to find the dictionary. Each sift descriptor
is given a texton label corresponding to the closest dictionary codeword.
Finally, the spatial pyramid is generated from these labels.
Each of these steps are split up into individual functions and can be called
independently, provided the data from the previous step is stored in the
correct location. The functions are as follows:
GenerateSiftDescriptors
CalculateDictionary
BuildHistograms
CompilePyramid
If you wish to use one of these functions without first running the previous
step, you will need to provide the appropriate data files. They should be in
the dataBaseDir with the same relative path as the image they correspond to.
Their file names should be the same as the image they correspond to with the
appropriate suffix appended to the end. For instance if you call
CalculateDictionary with featureSuffix = _sift.mat CalculateDictionary will
look for the data file dataBaseDir/im1_sift.mat for the image file
imageBaseDir/im1.jpg.
There are two different types of data files (feature lists and texton indices).
Each must be formatted correctly to work with the functions provided.
features:
data: NxM matrix of image features where N is the number of features in the image
and M is the feature vector size
x: Nx1 vector of image x coordinates where N is the number of features in the image
y: Nx1 vector of image y coordinates where N is the number of features in the image
wid: width of the image
hgt: height of the image
texton_ind:
data: Nx1 vector of texton indices corresponding to the appropriate dictionary bin
for each feature of the image where N is the number of features in the image
x: Nx1 vector of image x coordinates where N is the number of features in the image
y: Nx1 vector of image y coordinates where N is the number of features in the image
wid: width of the image
hgt: height of the image
NOTE: This code does not include functionality for SVM classification, though it
does include functions for computing the histogram intersection kernel matrix
(hist_isect.m and hist_isect_c.c). For classification, we have used the svm_v0.55
MATLAB toolbox:
http://theoval.sys.uea.ac.uk/~gcc/svm/toolbox
However, any other SVM package (and kernels other than histogram intersection)
can be adapted.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
spatial_pyramid_backup.rar_Piotr Dollar_pyramid_spatial pyramid_ (604个子文件)
demsvm1.asv 8KB
svm.asv 5KB
pyramid_trainSVM.asv 2KB
Example1.asv 2KB
pyramid_classifySVM.asv 2KB
AvgClustering.asv 1KB
avg_dist.asv 514B
pr_loqo.c 17KB
meanshift1.c 8KB
loqo.c 7KB
histc_nD_c.c 4KB
mask_ellipse1.c 4KB
rnlfilt_sum.c 4KB
rnlfilt_max.c 4KB
xml_findstr.c 3KB
rnlfiltblock_sum.c 3KB
assign2binsc.c 2KB
hist_isect_c.c 2KB
findBin.c 1KB
Changelog 2KB
code14-11 330B
menu.css 1KB
m2html.css 1KB
m2html.css 1KB
m2html.css 1KB
m2html.css 1002B
m2html.css 1002B
Thumbs.db 27KB
loqo.dll 18KB
meanshift1.dll 8KB
mask_ellipse1.dll 8KB
xml_findstr.dll 8KB
histc_nD_c.dll 7KB
rnlfilt_sum.dll 7KB
rnlfilt_max.dll 7KB
rnlfiltblock_sum.dll 7KB
assign2binsc.dll 6KB
readme.doc 29KB
simulinkicon.gif 977B
simulinkicon.gif 977B
simulinkicon.gif 977B
simulinkicon.gif 977B
simulinkicon.gif 977B
matlabicon.gif 574B
matlabicon.gif 574B
matlabicon.gif 574B
matlabicon.gif 574B
matlabicon.gif 574B
demoicon.gif 214B
demoicon.gif 214B
demoicon.gif 214B
demoicon.gif 214B
demoicon.gif 214B
GPL 15KB
GPL 15KB
ecoc-codes.tar.gz 309KB
pr_loqo.h 2KB
Contents.html 12KB
menu.html 10KB
menu-for-frame-piotr.html 10KB
Contents.html 9KB
Contents.html 9KB
menu.html 8KB
checknumericargs.html 6KB
kmeans2.html 6KB
menu.html 6KB
menu.html 6KB
nfoldxval.html 6KB
mask_gaussians.html 6KB
jitter_image.html 6KB
ticstatus.html 6KB
feval_arrays.html 6KB
montage2.html 5KB
feval_images.html 5KB
meanshiftim.html 5KB
Contents.html 5KB
convn_fast.html 5KB
pca.html 5KB
im.html 5KB
imageMLG.html 5KB
nonmaxsupr.html 5KB
arraycrop2dims.html 5KB
histc_sift_nD.html 5KB
filter_gauss_nD.html 4KB
pca_apply.html 4KB
imwrite2.html 4KB
optflow_corr.html 4KB
meanshift.html 4KB
menu.html 4KB
montages2.html 4KB
nlfilt_sep.html 4KB
apply_homography.html 4KB
c.html 4KB
optflow_lucaskanade.html 4KB
mask_ellipse.html 4KB
simplecache.html 4KB
tps_getwarp.html 4KB
int2str2.html 4KB
pca_visualize.html 4KB
feval_mats.html 4KB
共 604 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
四散
- 粉丝: 49
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功