Re: [help-gfit]About the number of the features

[email protected]
Newsgroups gmane.comp.gnu.gift.general
Message-ID <[email protected]>
On Tue, May 08, 2007 at 08:03:25PM +0800, Mingchung Liu wrote:
> In some article, you said that , The occurence of a given colour in a
> particular block is treated as a binary feature. For 256*256 images there
> are thus 56440 possible color block features.
> 
> But in your code(see below) ,you never treated it that way .
> You just calculate 340 block features, of which each block has only one.
> 
> Am I right? If I am wrong ,please tell he where did you add them into the
> array named  featrue[feature_index]?
> 
> ===========================================
>  /***** count the features *****/
> 
>    /* we know that there will be a mode color for each block */
>    num_features = num_total_colour_blocks;
> 
>    /* and there will be one for each non-zero histogram entry. Convert
>    histogram entries to range [0, FREQ_MAX] while we're at it */
>    for (i = 0; i < colmap_size; i++) {
>        col_histogram[i] =
> (int)(rint(FREQ_MAX*(double)col_histogram[i]/(double)(square(image_size))));
>        if (col_histogram[i] != 0)
>            num_features++;
>    }
> _______________________________________________
> help-GIFT mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/help-gift

no, your reading of the code is right, we use 340 blocks. thats :
256 (16*16) 16 pixel wide blocks, 
64 (8*8) 32 pixel wide blocks, 
16 (4*4) 64 pixel wide blocks, and
4 (2*2) 128 pixel wide blocks.

i of course, havent read the article you're refering to, just re-wrote that code block. blame me. :)

Julia Longtin <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.