forked from phoenix104104/LapSRN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbatch_imread.m
33 lines (29 loc) · 925 Bytes
/
batch_imread.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
function img_list = batch_imread(batch)
% -------------------------------------------------------------------------
% Description:
% read a batch of images
%
% Input:
% - batch : array of ID to fetch
%
% Output:
% - img_list: batch of images
%
% Citation:
% Deep Laplacian Pyramid Networks for Fast and Accurate Super-Resolution
% Wei-Sheng Lai, Jia-Bin Huang, Narendra Ahuja, and Ming-Hsuan Yang
% IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017
%
% Contact:
% Wei-Sheng Lai
% University of California, Merced
% -------------------------------------------------------------------------
img_list = cell(length(batch), 1);
for i = 1:length(batch)
img = imread(batch{i});
img = rgb2ycbcr(img);
img = img(:, :, 1);
img_list{i} = im2single(img);
end
end