|
| Algorithm 2 Deterministic PBOD |
|
| Require: |
patch matching |
(a) For each patch, obtain
 3 based on RGB space |
| (b) If
|
| εd = 1 |
| Else
|
| εd = 0 |
| End If
|
| (c) If
εd = 0, start 2nd level test |
(d) For 2nd level test, obtain
 1 for each patch |
| (e) Select
as the candidate patch |
| Ensure: |
position smoothing |
| (a) Select colour space based on εd, either RGB or HSV |
| (b) Determine the step size, δ
|
| (c) Construct the translated patch,
|
(d) Find maximum

|
| (e) While
β8 = β6
Do
|
If
 max >
 ori
|
| β8 = β6
|
| Else
|
|
|
| End If
|
| End While |
| Ensure: |
size smoothing |
| (a) Determine α as the size factor |
| (b) Obtain size pattern based on β9 histograms either to use shrinkage or expansion pattern |
| (c) Normalize histograms size for fairer histogram matching |
| (d) If
|
| Utilize shrinkage patch patterns |
| Else
|
| Utilize expansion patch patterns |
| End If
|
| (e) Switch
|
| Case (shrink) |
If
 i < (
 max − α), L13 = 0 Else
L13 = 1 |
| Case (expand) |
If
 j < (
 max + α), L14 = 0 Else
L14 = 1 |
| End Switch
|
| (f) Reiterate the process until the patch has converged to a certain size or number of iteration has exceeded p cycles. |
|