Skip to main content
. Author manuscript; available in PMC: 2014 Dec 18.
Published in final edited form as: Comput Vis ECCV. 2014 Sep 6;8691:140–155. doi: 10.1007/978-3-319-10578-9_10

Algorithm 1.

Our learning method for active patch dictionary

Initialization:
1: Get 𝒟o from clustering algorithm;
2: 𝒟f ← ∅; ∀Mbest(I, pos) ← 0; ∀prvoid, pr ∈ ∀IR(I);
Process:
3: Sort 𝔸(k) ∈ 𝒟o w.r.t. F(𝔸(k)) in descending order;
4: for each 𝔸(k) ∈ 𝒟o do
5:   ∀I ∈ Ω, record current IR(I) and Mbest(I, pos); ΔE ← 0;
6:   for each position pos of each image I ∈ Ω where 𝔸(k) is firing do
7:     for each pixel pdSdtbest,Sdtbest𝕊D(k) do
8:       Calculate ΔE according to Equ. 4;
9:       if the corresponding pr = void or M(𝔸(k), I, pos) > Mbest(I, pos) then
10:         prpd; Mbest(I, pos) ← M(𝔸(k), I, pos);
11:       end if
12:     end for
13:   end for
14:   if ΔE < 0 then
15:     Add 𝔸(k) to 𝒟f
16:   else
17:     ∀I ∈ Ω, restore IR(I) and Mbest(I, pos) to previous value;
18:   end if
19: end for