cszn / SRMD

Learning a Single Convolutional Super-Resolution Network for Multiple Degradations (CVPR, 2018) (Matlab)

Home Page:http://openaccess.thecvf.com/content_cvpr_2018/papers/Zhang_Learning_a_Single_CVPR_2018_paper.pdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

data_augmentation function

yiyunchen opened this issue · comments

When I was runing the generatepatches.m, a error was raised that "undefined function or variable 'data_augmentation'.
I would like asking about it, is it a default function or user defined function that no provided?
thank you very much!

thank you!
and I am confused about the code:

for x = 1 : stride : (hei-size_input+1)
for y = 1 : stride : (wid-size_input+1)
x_l = stride_low*(x-1)/stride + 1;
y_l = stride_low*(y-1)/stride + 1;
if x_l+size_input/scale-1 > size(LR,1) || y_l+size_input/scale-1 > size(LR,2)
continue;
end
count=count+1;
end
end

in generatedpatches.
May I ask what this is trying to do.
Thank you.

In matlab, pre-define the large matrix is useful to the memery.

For example,

n = 1000000;
A = zeros(1, n); 
for i = 1:n
  A(i) = i; 
end

is better than

n = 1000000;
for i = 1:n
  A(i) = i; 
end

Is it used to compute the 'count'?