Post Reply 

Histogram Mean Calculation

Jul 24, 2014, 14:40
Post: #1
Histogram Mean Calculation
Hello Gimpers,

Im open a image and in the histogram windows we can see mean, std dev, median, pixels, count and percentile values. Im having problem to understand how he calculate mean value. The mean standard calculation is pixels / 255 it is mean or average. I have a image with 45000 pixels, but he give me 88.3 result for mean value. I want know how GIMP calculate mean value ? I suppose it is not statistical standard mean calculation.


Find all posts by this user
Quote this message in a reply
Jul 24, 2014, 17:54 (This post was last modified: Jul 24, 2014 17:56 by sergioribeiro.)
Post: #2
RE: Histogram Mean Calculation
(Jul 24, 2014 15:01)ofnuts Wrote:  Hmmm. Depends on what image you are working with... If I create a 300x300 image, and fill it with a linear Black-to-White gradient, the Histogram display gives me a mean of 127.3 (with dithering, 127.1 without). Pretty much the expected result (in 8-bit/Channel, there are round-off errors)

The histogram is actually on the selected pixels (in other words, pixels are weighed by their selection amount). And furthermore the statistics apply to the value between the handles under the histogram...

Thank you Ofnuts...But, how can I reproduce his calculation ?
I have another image...i this link:
If I open her and select all image/all pixels he show me:

Mean: 98.6
std dev: 78.1
Median: 59.0
Pixel: 13924
Count: 13924

If I will try to reproduce his calculation, what equation should I use ? In a histogram matrix I have (example):

Histogram[0] = 5000
Histogram[1] = 0
Histogram[2] = 0
Histogram[255] = 350

In this case the equation "sum( Histogram ) / count( Histogram )" or "sum(Histogram) / count_nonzero( Histogram )" can't give a result of the mean equals to 98.6

I trying to discovery what equation GIMP uses. Is it a general equation founded on literacy ?

Thank you.

Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Copy a histogram nmfralich 1 379 May 18, 2014 14:36
Last Post: nmfralich

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS