-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathgetParam.m
More file actions
46 lines (42 loc) · 2.1 KB
/
getParam.m
File metadata and controls
46 lines (42 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Implemetation of the saliency detction method described in paper
% "Minimum Barrier Salient Object Detection at 80 FPS", Jianming Zhang,
% Stan Sclaroff, Zhe Lin, Xiaohui Shen, Brian Price, Radomir Mech, ICCV,
% 2015
%
% Copyright (C) 2015 Jianming Zhang
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
% If you have problems about this software, please contact:
% jimmie33@gmail.com
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function param = getParam()
param.MAX_DIM = 300; % max image dimension in computation
param.use_lab = true; % use Lab color space
param.remove_border = true; % detect and remove artificial image frames
param.use_geodesic = false; % flag for replacing geodesic distance with MBD
param.use_backgroundness = true; % MB+
param.COV_REG = 50; % covariance regularization term for the maximum value of 255*255
param.MARGIN_RATIO = 0.1; % the boundary margion for computing backgroundness map
param.cmap = getCenterMap(param.MAX_DIM); % the center distance map for center bias
param.center_bias = true;
param.smooth_alpha = 50; % see eqn. 9
param.contrast_b = 10; % see eqn. 11
param.verbose = false;
function cmap = getCenterMap(dim)
X = [1:dim] - dim/2; X = repmat(X.^2,[dim,1]);
Y = X';
cmap = sqrt(X+Y);
cmap = 1-mat2gray(cmap);