Graph-Based Visual Saliency (MATLAB source code)
http://www.klab.caltech.edu/~harel/share/gbvs.php
by Jonathan Harel
jonharel@gmail.com
California Institute of Technology
================================================================================
This is an installation and help file for the saliency map (MATLAB) code here.
What you can do with this code:
1) Compute a "Graph-Based Visual Saliency" map for an image or image sequence
(as described in J. Harel, C. Koch, and P. Perona. "Graph-Based Visual Saliency",
NIPS 2006
http://www.klab.caltech.edu/~harel/pubs/gbvs_nips.pdf)
2) OR -- also -- compute the standard Itti, Koch, Niebur (PAMI 1998)
saliency map.
.. or combinations thereof (see below).
================================================================================
Step-by-step start-up procedure:
(1) Add gbvs to your path:
Change into the directory containing this file, and run in matlab:
matlab> gbvs_install
If you are on a shared machine, you may get an error message such as:
Warning: Unable to save path to file '/opt/matlab/toolbox/local/pathdef.m'
In savepath at 162
In gbvs_install at 5
In that case, comment out the savepath (i.e., 'savepath' => '% savepath')
command in gbvs_install.m, and add this line to your startup.m file:
run ???/gbvs_install
where "???" is replaced by the main gbvs/ directory, which contains the
gbvs_install function
(2) **Unless you downloaded Windows binaries**, you will need to compile:
matlab> gbvs_compile
Notes:
(a) If this is your first time compiling mex files in Windows, you may
have to run
matlab> mex -setup
and follow the instructions (typically, enter a number, to select a co-
mpiler. then you can run "gbvs_compile"; if it doesn't work, run
"mex -setup" again to select a different compiler, run "gbvs_compile"
again, etc.)
(b) Ignore these messages if they appear:
rm: */*.mex*: No such file or directory
'rm' is not recognized as an internal or external command, operable
program or batch file.
They are harmless.
(3) Now you are ready to compute GBVS maps:
Demonstrations:
matlab> simplest_demonstration
see demo/demonstration.m for more complicated demo or run:
matlab> demonstration
Basic Usage Example:
matlab> out = gbvs( 'samplepics/1.jpg' );
Now, out.master_map contains your saliency map, and out.master_map_resized is
this saliency map interpolated (bicubic) to the resolution of the original
image.
For video (not static images):
You need to pass into gbvs() previous frame information, which is returned
on output at every call to gbvs().
See demo/flicker_motion_demo.m
Here is the heart of it:
motinfo = []; % previous frame information, initialized to empty
for i = 1 : N
[out{i} motinfo] = gbvs( fname{i}, param , motinfo );
end
================================================================================
Helpful Notes:
(A) inputs of gbvs():
* the first argument to gbvs() can be an image name or image array
* there is an optional, second, parameters argument
(B) outputs of gbvs():
* all put into a single structure with various descriptive fields.
* the GBVS map: master_map
(interpolated to the resolution of the input image: master_map_resized)
* master saliency map for each channel: feat_maps (and their names,
map_types)
* all intermediate maps to create the previous two (intermed_maps). see
gbvs.m for details
(C) the parameter argument:
* initialized by algsrc/makeGBVSParams.m -- read that for details
Some sparse notes on fields of the parameter argument:
the two 'sigma' parameters control the extent to which information can
travel across the image:
(1) sigma_frac_act
sigma parameter in activation step of GBVS (fraction of image width)
(2) sigma_frac_norm
sigma parameter in normalizaiton step of GBVS (fraction of image width)
cyclic_type default is 1. use 2 to have edge weights computed with
non-cyclic distance rules. this gives rise to a center bias.
tol tolerance parameter. governs how accurately the princi-
pal eigenvector(特征向量) calculation is performed. change it to
higher values to make things run faster.
levels the resolution(分辨率) of the feature maps used to compute the
final master map, relative to the original image size
multilevels determines whether to instantiate(举例说明) one-level or multi-
level lattice of graph nodes for each feature map
useIttiKochInsteadOfGBVS -- set this to 1 to compute Itti/Koch map
(D) Notes on feature maps:
* are produced by util/getFeatureMaps.m
* by default, color, intensity, orientation maps are computed.
which channels are used is controlled by the parameters argument. in part-
icular, you can choose which of these is included by editing the
params.channels string (see algsrc/makeGBVSParams.m). you can set
their relative weighting also in the parameters.
If you want to introduce a new feature channel, put a new function into
util/featureChannels/ . Make sure to edit the channels string appropria-
tely. Follow pattern of other channels for proper implementation.
(E) If you want to compare saliency maps to fixations (e.g., inferred from
scanpaths recorded by an eye-tracker), use:
matlab> score = rocScoreSaliencyVsFixations(salmap,X,Y,origimgsize)
This outputs ROC Area-Under-Curve Score between a saliency map and fixat-
ions.
salmap : a saliency map
X : vector of X locations of fixations in original image
Y : vector of Y locations of fixations in original image
origimgsize : size of original image (should have same aspect ratio as
saliency map)
================================================================================
Copyright Notices for borrowed code:
saltoolbox/ directory -- adapted from:
Dirk Walther,
http://www.saliencytoolbox.net/
================================================================================
Revision History
first authored 8/31/2006
Revised 4/25/2008
Revised 6/5/2008
Revised 6/26/2008 added Itti/Koch algorithm
Revised 8/25/2008 added Flicker/Motion channels
没有合适的资源?快使用搜索试试~ 我知道了~
用于感兴趣区域提取的GBVS算法
共85个文件
m:49个
jpg:14个
cc:8个
5星 · 超过95%的资源 需积分: 31 264 下载量 132 浏览量
2011-05-15
13:37:45
上传
评论 8
收藏 1.08MB RAR 举报
温馨提示
GBVS算法,用于人眼感兴趣区域提取,与Itti模型不同的是,在生成显著图的过程中采用的是马尔可夫链,用其平稳分布来计算感兴趣区域,是一种纯数学的计算方法。效果显示,GBVS要比Itti好。
资源推荐
资源详情
资源评论
收起资源包目录
gbvs.rar (85个子文件)
gbvs
compile
gbvs_compile.m 301B
cleanmex.m 12B
gbvs_install.m 100B
saltoolbox
safeDivideGBVS.m 606B
maxNormalizeStdGBVS.m 1KB
mexLocalMaximaGBVS.cc 2KB
mySubsample.cc 5KB
attenuateBordersGBVS.m 1KB
makeGaborFilterGBVS.m 2KB
mexLocalMaximaGBVS.mexw32 7KB
mySubsample.mexw32 8KB
samplepics
5.jpg 107KB
PIE.jpg 149KB
复件 1.jpg 86KB
seq
088.jpg 33KB
087.jpg 31KB
Thumbs.db 8KB
085.jpg 34KB
086.jpg 33KB
3.jpg 33KB
4.jpg 78KB
12.jpg 18KB
2.jpg 99KB
feret1.bmp 50KB
1.jpg 37KB
Thumbs.db 46KB
11.jpg 24KB
lena.bmp 768KB
liang.jpg 34KB
gbvs.m 8KB
algsrc
indexmatrix.m 104B
formMapPyramid.m 942B
mexVectorToMap.mexw32 6KB
mexAssignWeights.mexw32 6KB
mexArrangeLinear.mexw32 6KB
graphsalinit.m 1KB
mexSumOverScales.mexw32 6KB
mexAssignWeights.cc 2KB
sparseness.m 63B
partitionindex.m 365B
distanceMatrix.m 2KB
makeGBVSParams.m 7KB
connectMatrix.m 3KB
initGBVS.m 1KB
simpledistance.m 1000B
namenodes.m 334B
getDims.m 110B
graphsalapply.m 2KB
principalEigenvectorRaw.m 570B
mexVectorToMap.cc 938B
makeLocationMap.m 945B
mexSumOverScales.cc 1KB
mexColumnNormalize.mexw32 6KB
mexColumnNormalize.cc 645B
mexArrangeLinear.cc 1KB
readme.txt 7KB
util
myconv2.m 296B
getBestRows.m 282B
linearmap.m 81B
featureChannels
R_contrast.m 284B
M_motion.m 655B
I_intensity.m 218B
F_flicker.m 234B
O_orientation.m 494B
C_color.m 384B
mycombnk.m 630B
padImage.m 82B
getIntelligentThresholds.m 111B
areaROC.m 182B
mymessage.m 490B
makeFixationMask.m 765B
heatmap_overlay.m 931B
getFeatureMaps.m 4KB
show_imgnmap.m 92B
rocSal.m 2KB
rocScoreSaliencyVsFixations.m 526B
myContrast.cc 2KB
shiftImage.m 453B
padImageVH.m 401B
mypath.mat 216B
myContrast.mexw32 7KB
mygetrgb.m 129B
demo
simplest_demonstration.m 178B
demonstration.m 2KB
flicker_motion_demo.m 674B
共 85 条
- 1
taku2006
- 粉丝: 1
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页