Skip to main content
. 2012 Nov 12;12(11):15638–15670. doi: 10.3390/s121115638

Algorithm 3 Probabilistic PBOD

Require: patch matching
(a) Calculate Inline graphicInline graphic1 and Inline graphicInline graphic3 for all patches
(b) Find βmax for both Inline graphicInline graphic1 and Inline graphicInline graphic3
(c) Apply Neyman–Pearson to decide between RGB and HSV colour space
If H1 is true
   β6=argmaxβ𝒟P3
Else
   β6=argmaxβ𝒟P1
End If
Ensure: position smoothing
(a) Select colour space based on εp
(b) Determine the step size, δ
(c) Construct the translated patch, (β7a,β7b,β7c,β7d)
(d) For each patch, histogram matching is modelled by Poisson distribution
(e) Apply maximum likelihood for position adjustment
(f) While β10 = β6 Do
   β10=argmaxβ9iP(x|β9)
End While
Ensure: size smoothing
(a) Obtain prior probability by using Neyman–Pearson test
(b) Obtain null hypothesis, H0
maxβiP5(x|βi),βi{β12a,,β12d}
(c) Obtain alternative hypothesis, H1
maxβjP5(x|βj),βj{β11a,,β11d}
(d) If H1 is favoured
  select 2nd set of priors
Else
  select 1st set of priors
End If
(e) For each patch, obtain posterior probability by using Bayes risk
(f) Normalize all histograms size for fairer comparison
(g) If P5(β10|x) ≤ P5(βi|x), βi{β11a,,β11d,β12a,,β12d}
  Size remain constant
Else
  size is updated based on selected side
End If    (h) Reiterate the process until the patch has converged to a certain size or number of iteration
has exceeded p cycles.