Hi.
I am reading the code of extract_block_features.c, I have some questions in
the following sentence.

-----------------------------------------------------------------------------------------------------------------------------
/* colour block features */
   for (i = 0; i < num_total_colour_blocks; i++) {
       /* note that each block can have colmap_size values */
       feature[feature_index].id = i*colmap_size + (int)block_mode[i];
/**************LINE 1*****************/
       feature[feature_index].frequency = FREQ_MAX; /* binary features */
       feature_index++;
   }
   block_features_offset = num_total_colour_blocks*colmap_size;
/**************************/

   /* colour histogram features */
   for (i = 0; i < colmap_size; i++) {
       if (col_histogram[i] != 0) {
           feature[feature_index].id = block_features_offset + i;
           feature[feature_index].frequency = (freq_type)col_histogram[i];
           feature_index++;
       }
   }
---------------------------------------------------------------------------------------------------------------------

The question is,  in LINE 1 ,why don't you write "
feature[feature_index].id=i " ?
I think what you wrote  makes the value of id  have no continuous values,
it may like 2, 256+3, 256*2+67 etc.

Does  the id of  feature[i] mean someting?


And I think "block_features_offset = num_total_colour_blocks"  is enough.
why need it  multipy colmap_size?

"
_______________________________________________
help-GIFT mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gift

Reply via email to