After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674819 - Strange computation of histogram
Strange computation of histogram
Status: RESOLVED DUPLICATE of bug 109161
Product: GIMP
Classification: Other
Component: Tools
unspecified
Other All
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2012-04-25 17:45 UTC by Jiri Hnidek
Modified: 2012-05-07 23:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ImageLab-luminance.png (200.34 KB, image/png)
2012-04-25 17:45 UTC, Jiri Hnidek
Details
ImageLab-value.png (201.01 KB, image/png)
2012-04-25 17:48 UTC, Jiri Hnidek
Details
Gimp-histogram.png (50.88 KB, image/png)
2012-04-25 17:48 UTC, Jiri Hnidek
Details
Lena.png (115.20 KB, image/png)
2012-04-25 17:49 UTC, Jiri Hnidek
Details

Description Jiri Hnidek 2012-04-25 17:45:29 UTC
Created attachment 212816 [details]
ImageLab-luminance.png

First of all I would like to write about motivation of this bug report. I gave simple task to my students. They had to develop simple GUI application computing several types histogram from images. I was very suprised, when I copared histogram of Gimp with histogram computed by Gimp.

All histograms of "brightness" are computed from Value (it is Value from HSV color model) in Gimp. It means that the value is computed with following formulae:

 Value = Max(R,G,B)

You can see value channel and histogram in attachement (ImageLab-value.png).

Previous computation of histograme is IMHO strange, because humane beings perceive brighteness of RGB image in different way. The relative luminance should be used for computation of histogram:

 Y = 0.2126*R + 0.7152*G + 0.0722*B

This formulae is also used in Gimp, when image is converted from RGB to grayscale image. You can see luminance channel and its histogram in attachement (ImageLab-luma.png). You can also compare all histogram from testing application with histogram from Gimp (Gimp-histogram.png).
Comment 1 Jiri Hnidek 2012-04-25 17:48:14 UTC
Created attachment 212818 [details]
ImageLab-value.png
Comment 2 Jiri Hnidek 2012-04-25 17:48:55 UTC
Created attachment 212820 [details]
Gimp-histogram.png
Comment 3 Jiri Hnidek 2012-04-25 17:49:53 UTC
Created attachment 212821 [details]
Lena.png

Reference image of Lena
Comment 4 Michael Natterer 2012-05-07 23:54:18 UTC
Known issue, should be addressed in 2.10 finally.

*** This bug has been marked as a duplicate of bug 109161 ***