Code:
Vignette_size = Vignette::width * Vignette::height ; //24 * 24. Vignette is a class.
for(every possible tmplt){// pseduo-code, since the real code is too long. tmplt is of type Vignette*
generate the tmplt // pseduo-code, since the real code is too long
for(int k = 0; k < Vignette_size ; k++) {
if(tmplt->content[k] == 0){ // tmplt->content is a 1D int array of 24*24
for(int i = 0; i < nb_vignettes; i++){
double tmp = _xi[vignettes[i].content[k]]; // _xi is a 1D double array of size 256. vignettes is of type Vignette*
log_prob_img_t[i] += tmp;}
}
}
}