Jump to content

Talk:Histogram equalization

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Example added

[edit]

I have created an example. But it seems a little awkwardly placed. Feel free to re-arrange it or put it in a different location in the article.--Konstable 05:56, 11 June 2006 (UTC)[reply]

Excellent! I love the example. Wilson Harron 21:55, 22 October 2006 (UTC)[reply]
Thanks!--Konst.ableTalk 22:45, 22 October 2006 (UTC)[reply]
[edit]

Added a section on back project with a citation and footnote reference, but couldn't figure out how to get the superscript to link properly. kostmo 20:40, 18 August 2006 (UTC)[reply]

Philosophy project

[edit]

Sorry, but I don't understand why is this page into philosophy's project. It seems better suited to optics, computer science or something like this, is not?--Patillotes (talk) 07:47, 31 January 2008 (UTC)[reply]

Incorrect image

[edit]

Isn't the example pictogram of the histograms wrong !? Histogram equalization should transfrom an image such that it's histogram becomes (approximately) uniform, i.e. "flat" -- the shown pictogram looks more like it's just about contrast and brightness change, i.e. linear transformation . -Seb.Haase —Preceding unsigned comment added by Sebhaase (talkcontribs) 08:40, 5 September 2008 (UTC)[reply]

That is not the point at all. The point is is that the cumulative histogram is linear:
H.eq. spreads out the histogram which is a form of contrast adjustment. The more "probable" a given intensity is in the original image that intensity has more local contrast. The maximum in the above image (~52) has the largest step to the previous and next intensity.
Flattening the histogram would result in global contrast change and a drastic change in the image. What transformation are you thinking of that would yield a flat histogram? Cburnett (talk) 20:07, 5 September 2008 (UTC)[reply]
The histogram would be flat only if histograms were continuous functions. Since they are discrete, it's not possible to guarantee a flat histogram. But you can still make the cumulative histogram quasi-linear. 89.214.104.88 (talk) 11:38, 12 March 2009 (UTC)[reply]
For the cumulative histogram to be linear, each step must contribute the same number of occurrences as every other step of the same size, and the histogram must therefore be constant...unless the x-axis is non-linear or not fully populated. —Preceding unsigned comment added by 128.170.116.22 (talk) 21:48, 31 July 2009 (UTC)[reply]
I came to the talk page because I was going to make the same observation, but of the image:
Is it possible that this is the image Seb was referring to? It seems to show histogram stretching, not equalization. Actually, as the graph shows a continuous histogram, the equalized version should be a rather boring flat line. I may be missing something here, but I think that a) that image is histogram stretching, not equalization, and b) showing stretching on the equalization page may confuse people, particularly as they are related.
Timbo76 (talk) 00:38, 9 November 2011 (UTC)[reply]

Isn't the image of the scaled image also incorrect? If you compare the bitmap against the matrix above it, you can see the lower left corner is 146 and the pixel to the right is 206, yet in the image the left pixel is brighter (whiter) than the right. Same in the upper right corner: corner is 53, pixel to left is 174, yet the left pixel is clearly blacker. What am I missing here? — Preceding unsigned comment added by Bnehring (talkcontribs) 18:39, 19 July 2018 (UTC)[reply]

Error in formula

[edit]

The formula in the example is not correct: it says "cdf(v) = round[cdf(v)..." when it should be something like "vnew(vold) = round[cdf(vold)...", as the formula gives us the new value that a certain gray level in the original image will assume in the equalized image. Gazilion (talk) 12:10, 12 March 2009 (UTC)[reply]

Histogram Matching and Histogram Hyperbolization

[edit]

Maybe it makes sense to mention Histogram Matching (match histogram to a distribution of a 2nd source). Even more important is Histogram Equalization in log-log-domain (Histogram Hyperbolization). Hyperbolization is achieved by using the power function for the cdf. This leads to more "natural" results, since many quantities in nature are roughly linear in log-log domain (including light as perceived by the human visual system). -- 92.225.71.216 (talk) 09:50, 30 November 2009 (UTC)[reply]

Overview is bad

[edit]

The overview is not an overview if it starts giving mathematical jargon and talks about DNA stuff. Applications of this technique shouldn't be discussed in that much detail. There are also a few grammatical mistakes in the overview. The discussion of when the equalization should be used is also simplifying it too much. The section is just bad; the main person to blame is whoever added that stuff about DNA.Owen214 (talk) 04:38, 13 June 2010 (UTC)[reply]

Invertible?

[edit]

This article talks about the equalization being invertible, yet the german wikipedia (and my image processing course notes) say that is is explicitly NOT invertible. Which also makes sense to me, since this process can map multiple (infrequent) grey levels in the source image to the same grey level in the resulting image. --77.176.232.123 (talk) 21:04, 20 December 2010 (UTC)[reply]

bad formula?

[edit]

The formula for histogram equalization icludes CDF values(Commulative Distribution Function) which are probabilities.

So, when the formula

mentions cdf, thats incorrect. I think it should read like


where Nk= the sum of all the appearances of values N1,N2...Nk —Preceding unsigned comment added by 94.67.130.221 (talk) 12:49, 5 February 2011 (UTC)[reply]

Example

[edit]

Examples

[edit]

Small image

[edit]

The following is the same 8x8 subimage as used in JPEG. The 8-bit greyscale image shown has the following values:

The histogram for this image is shown in the following table. Pixel values that have a zero count are excluded for the sake of brevity.

Value Count Value Count Value Count Value Count Value Count
52 1 64 2 72 1 85 2 113 1
55 3 65 3 73 2 87 1 122 1
58 2 66 2 75 1 88 1 126 1
59 3 67 1 76 1 90 1 144 1
60 1 68 5 77 1 94 1 154 1
61 4 69 3 78 1 104 2
62 1 70 4 79 2 106 1
63 2 71 2 83 1 109 1

The cumulative distribution function (cdf) is shown below. Again, pixel values that do not contribute to an increase in the cdf are excluded for brevity.

Value cdf Value cdf Value cdf Value cdf Value cdf
52 1 64 19 72 40 85 51 113 60
55 4 65 22 73 42 87 52 122 61
58 6 66 24 75 43 88 53 126 62
59 9 67 25 76 44 90 54 144 63
60 10 68 30 77 45 94 55 154 64
61 14 69 33 78 46 104 57
62 15 70 37 79 48 106 58
63 17 71 39 83 49 109 59

This cdf shows that the minimum value in the subimage is 52 and the maximum value is 154. The cdf of 64 for value 154 coincides with the number of pixels in the image. The cdf must be normalized to . The general histogram equalization formula is:

Where cdfmin is the minimum value of the cumulative distribution function (in this case 1), M × N gives the image's number of pixels (for the example above 64, where M is width and N the height) and L is the number of grey levels used (in most cases, like this one, 256). The equalization formula for this particular example is:

For example, the cdf of 78 is 46. (The value of 78 is used in the bottom row of the 7th column.) The normalized value becomes

Once this is done then the values of the equalized image are directly taken from the normalized cdf to yield the equalized values:

Notice that the minimum value (52) is now 0 and the maximum value (154) is now 255.

Code the message “ANDHRA” using arithmetic coding algorithm. — Preceding unsigned comment added by 106.51.243.6 (talk) 14:25, 16 November 2013 (UTC)[reply]

Histogram-equalized 8x8 example image has errors (possibly due to JPEG loss?)

[edit]

The current histogram-equalized version of the 8x8 example image[1] has errors, or at least doesn't match the matrix generated in the example.

For example, this image should be significantly lighter at pixel position [1, 3] (Coordinates counted from 0 starting at top left corner) to match this the final histogram-equalized matrix. I think the problem is with the image, not the matrix because when I was reproducing the 8x8 example, my results matched the matrix rather than the image.

I generated my own image with the correct greyscale values, but Wikipedia isn't accepting my upload.

— Preceding unsigned comment added by Isears (talkcontribs) 14:16, 31 December 2020 (UTC)[reply]

Update: was able to upload my corrected image to commons:

https://commons.wikimedia.org/wiki/File:Small_example_hist_equalized.png

Isears (talk) 14:24, 31 December 2020 (UTC)[reply]

The notations are wrong

[edit]

The notation h(v) is incorectly used several times. h(v) would be the new values of the histogram for that specific pixel value, but it is used when calculating the actual new pixel value of the transformed image resulted from the process of histogram equalization. A.Roman2104 (talk) 02:20, 27 January 2023 (UTC)[reply]

Advantages and disadvantages section appears to be AI generated

[edit]

Numbered bullet point list format doesn't pass the AI slop smell test. Warrants removal imo TKanarsky (talk) 23:59, 8 August 2024 (UTC)[reply]