help-gift
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[help-GIFT] [help-gfit]About extract_block_features.c


From: Mingchung Liu
Subject: [help-GIFT] [help-gfit]About extract_block_features.c
Date: Tue, 8 May 2007 19:08:02 +0800

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?

"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]