I have two questions regarding setting a gauss curve to the top of the histogram. My first question is very simple:
- How can I fit a gauss curve for the entire histogram? Does this only mean that I need to find out and calculate the average value (μ) and the deviation (ϭ) of the histogram and enter them in the formula for the Gaussian curve?
Will the following be true: Suppose (as an example) I have a histogram of an image with 5 color values. On the X-Axes there are these 5 color values, and on the Y-axes there are frequencies of each of these values. i.e:.
value 1: 1 time
value 2: 4 times
value 3: 7 times
value 4: 3 times
value 5: 2 times
Now the average value (μ) will be equal to 3 (μ = 3).
And the deviation (ϭ) will be 0.9 (ϭ = 0.9). formulaic:
Now, do I use these values in the density function form to calculate a Gaussian curve?
It is right? Unfortunately, I'm a little unsure of the mathematical background.
- My second question is a little more complicated: This time I have a histogram with several peaks, but I only want to fit the Gaussian curve to the highest peak. So, I look through all the histogram bins with a simple loop and find one intensity value on the x axis (which contains the image intensities) with most frequencies (shown on the y axis). It will be the highest peak. But how do I know about a deviation? Moreover, I don’t know which of the intensity values I should include in my calculations. As far as I know, the turning point of the Gaussian curve lies in μ + ϭ and μ-ϭ. Can this help solve the problem.
I'm sorry this question is a little mathematical, but I have not found a better place to ask it. I also read some of these topics, but unfortunately they finally did not answer my question.
Thanks for your help!
Regards Mark
source share