|
|
| Algorithm 1: Algorithm for codebook construction |
|
|
| C ← ϕ |
| for t= 1 → N do |
| xt = (R, G, B), |
| Find the codeword, cm, in C matching to xt based on two conditions: |
| (a) colordist(xt, vm) ≤ ϵ1 |
| (b) brightness (I, 〈 , 〉) = true |
| if C = ϕ or there is no match then |
| {Create new codeword and add it to C} |
| else |
| {Update matched codeword} |
| end if |
| end for |
|
|