-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinpaintingFRUCAlternating.m
More file actions
35 lines (21 loc) · 896 Bytes
/
inpaintingFRUCAlternating.m
File metadata and controls
35 lines (21 loc) · 896 Bytes
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
function [ new,psnrs ] = inpaintingFRUCAlternating( original , graph, comparison, shifts, itr, starting_qb, ending_qb )
avareged = averageFRUC(original);
new = avareged;
[height,width,original_frame_rate] = size(original);
frames_mask = 2:2:original_frame_rate*2;
psnrs(1) = errorsVideos(comparison, new, frames_mask);
if graph,
line = initialize_psnr_graph(psnrs);
end
Hpermutation = [1 3 2];
Vpermutation = [3 2 1];
mask = initialize_mask(height, width, original_frame_rate);
for i=1:1:(starting_qb-ending_qb)*itr,
new = video_inpainting_iteration(new, avareged, mask, shifts, starting_qb - floor(i/itr),Hpermutation);
new = video_inpainting_iteration(new, avareged, mask, shifts, starting_qb - floor(i/itr),Vpermutation);
psnrs(i+1) = errorsVideos(comparison, new, frames_mask);
if graph,
line = update_psnr_graph(psnrs,line);
end
end
end