How do i calculate the average 3 highest values in histogram by logic?
<p>Not in C# but by thinking.</p>

<p>For example I have a bimtap wich is 4X4 pixels means the histogram size will be 16.</p>

<p>Now I have for example 10 colors from 0 to 9</p>

<p>And lets say once the bitmap image is black so all the pixels on the 0 color so on 0 I'll have 16 pixels.</p>

<p>Second example on color 0 I have three pixels on color 1 I have one pixel on color 2 I have four pixels on color 4 two pixels on color five three pixels on colors 6,7 and 9 on each one I have one pixel.</p>

<p>Now how do I calculate the highest three values. If I just look on it as I drawed it on a paper here its clear that color 0 , 2 and 5 are the three highest.</p>

<p>But how do I calculate it simple by algorithm ?</p>

<p>Or if all the pixels are on color 0 so how the calculation will be ? What will be the result of the three highest values if any ?</p>

<p>The idea is to use the histogram of the bitmap 4x4 example to calculate the three highest values.</p>

<p>Since the histogram already can fix them in the right order it should be easy to use it to calculate the three highest values.</p>

<p>Another thing: </p>

<p>If I got it right. The histogram size always will be the width*height of the bitmap size ?</p>

<p>For example if I have bitmap which is 4x4 pixels so the histogram size will be 16.</p>

<p>If it was 5x6 the histogram size is 30.</p>
