Research Article
Context-Aware and Locality-Constrained Coding for Image Categorization
Algorithm 2
Codebook optimization.
input: | output: B | (1) {Codebook initialization stage} | (2) clustering the randomly sampled | data into sets by -means | (3) | (4) for to do | (5) | (6) end for | (7) | (8) while (not stopping criterion) | {sparse coding stage} | (9) for to do | (10) Solving (18) with B fixed. The solution . | when . The calculation of can be seen in Section 4.2 | (11) end for | {codebook updating stage} | (12) Solving (18) with C fixed. The analytical solution can be referred in [18]. | (13) End while |
|