help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] using histogram fuctions - not getting expected result.


From: Sam Mason
Subject: Re: [Help-gsl] using histogram fuctions - not getting expected result.
Date: Fri, 29 Jun 2012 12:10:14 +0100

On 29 June 2012 03:27, Calvin Morrison <address@hidden> wrote:
> I want to return the value of the higest frequency. Am I doing
> this correctly?
>
>  // Add red, green, and blue, values to their respective histogram
>  for (i = 0; i < nImages; i++) {
>        gsl_histogram_increment (r, array[i][j][k][0]);
>        gsl_histogram_increment (g, array[i][j][k][1]);
>        gsl_histogram_increment (b, array[i][j][k][2]);
>      }
>      size_t red = gsl_histogram_max_bin(r);
>      size_t green = gsl_histogram_max_bin(g);
>      size_t blue = gsl_histogram_max_bin(b);

Not sure how you're creating the histogram; but I'd expect you to have
the answer here.  Why do you go back into the histogram again?

Would be interesting to know what you're doing; getting the mode of
each channel separately seems like a strange thing to be doing.


  Sam




reply via email to

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