-
Notifications
You must be signed in to change notification settings - Fork 45
/
load_list.m
executable file
·36 lines (31 loc) · 1.07 KB
/
load_list.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
function [list, n] = load_list(list_name)
% -------------------------------------------------------------------------
% Description:
% load a list file that each row is in a form of "name number"
%
% Input:
% - list_name: file name of the list
%
% Output:
% - list: a cell array containing "name" in the first column
% - n: a vector containing "number" in the second column
%
% Citation:
% A Comparative Study for Single Image Blind Deblurring
% Wei-Sheng Lai, Jia-Bin Huang, Zhe Hu, Narendra Ahuja, and Ming-Hsuan Yang
% IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016
%
% Contact:
% Wei-Sheng Lai
% wlai24@ucmerced.edu
% University of California, Merced
% -------------------------------------------------------------------------
f = fopen(list_name);
if( f == -1 )
error('%s does not exist!', list_name);
end
C = textscan(f, '%s %f', 'CommentStyle', '#');
list = C{1};
n = double(C{2});
fclose(f);
end