-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathinstall.m
64 lines (59 loc) · 2.57 KB
/
install.m
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
% ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
%
% Jordi Pont-Tuset <[email protected]>
% June 2013
% ------------------------------------------------------------------------
% Code obtained from:
% https://imatge.upc.edu/web/resources/supervised-evaluation-image-segmentation
% ------------------------------------------------------------------------
% This file is part of the SEISM package presented in:
% Jordi Pont-Tuset, Ferran Marques,
% "Measures and Meta-Measures for the Supervised Evaluation of Image Segmentation,"
% Computer Vision and Pattern Recognition (CVPR), 2013.
% If you use this code, please consider citing the paper.
% ------------------------------------------------------------------------
% Dependencies:
% - BSDS300 segbench code
% (http://www.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/code/segbench.tar.gz)
%
% The path below corresponds to the folder where the package is installed.
% ------------------------------------------------------------------------
% Check that 'seism_root' has been set
if ~exist(seism_root,'dir')
error('Error installing the package, try updating the value of seism_root in the file "seism_root.m"')
end
% Check that 'seism_root' has the needed folder
if ~exist(fullfile(seism_root,'lib'),'dir')
error('Error installing the package, the folder "lib" not found')
end
if ~exist(fullfile(seism_root,'src'),'dir')
error('Error installing the package, the folder "src" not found')
end
% Install own lib
addpath(seism_root);
addpath(fullfile(seism_root,'lib'));
addpath(genpath(fullfile(seism_root,'src')));
% Check the db_root_dir is set
if ~exist(db_root_dir('BSDS500'),'dir')
disp('---')
disp('WARNING: The BSDS500 directory was not found in:')
disp([' ' db_root_dir('BSDS500')])
disp('Have you set the directory in "src/gt_wrappers/db_root_dir.m"?')
disp('---')
end
% Check that the needed functions are compiled
if exist('correspondPixels')~=3 %#ok<EXIST>
disp('The needed function (correspondPixels) not found in piotr_edges.')
end
if exist('mex_eval_segm')~=3 %#ok<EXIST>
error('The needed function (mex_eval_segm) not found. Have you build the package properly?')
end
if exist('mex_prl_read')~=3 %#ok<EXIST>
error('The needed function (mex_prl_read) not found. Have you build the package properly?')
end
if exist('mex_prl_write')~=3 %#ok<EXIST>
error('The needed function (mex_prl_write) not found. Have you build the package properly?')
end
disp('SEISM installed properly');