Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 4 (March 2018) 312-316___________________________________________________________________________________________________________Regression Analysis Based Variance Estimation of Gaussian Distribution for Histogram
MatchingYusuke Kawakami 1*, Tetsuo Hattori 2, Yoshiro Imai 2, Kazuaki Ando 2, Yo Horikawa 2, R. P. C. Janaka Rajapakse 3
1

DynaxT Co., Ltd.,2217-6 Hayashi
Takamatsu City, Kagawa 761-0301, Japan
E-mail: riverjp2002@gmail.com
2

Graduate School of Kagawa University,
2217-20 Hayashi
Takamatsu City, Kagawa 761-0396, Japan
E-mail: hattori@pe.kagawa-u.ac.jp, {imai, ando, horikawa}@eng.kagawa-u.ac.jp
3Tainan National University of the Arts,
66 Daci
Guantian District, Tainan 72045, Taiwan
E-mail: janakaraja@gmail.com

Abstract
This paper describes an improved method of the variance estimation of Gaussian distribution for Histogram
Matching based on Gaussian Distribution (HMGD). In our previous paper, focusing on the symmetry of theGaussian function, we presented another method for the variance (or Gaussian width) estimation of Gaussian
distribution in the original histogram. However, since the real shape of mountain like Gaussian function in theoriginal image’s histogram does not always show the good symmetry, the variance estimation method that wepreviously presented did not work so well as we expected. In this paper, we newly propose the improved estimation
method using regression analysis, based on curvature computation for the cumulative histogram of original image’sone. In the newly proposed method, first, we detect the histogram peak of original image’s histogram by using
curvature computation; next, we perform the regression analysis for the cumulative histogram, using anapproximated function of the curvature that includes the variance parameter. Also in this paper, we show someexperimental results by the estimation method.
Keywords: Image processing, Cumulative histogram, Curvature, Variance estimation, Histogram matching

1. Introduction

In our previous paper, we presented a Histogram
Matching based on Gaussian Distribution (HMGD) thatis one of the automated image arrangements processing
method using Elastic Transformation4-5 on thebrightness axis. And we have illustrated that the HMGD

Recently, automated image processing for enhancementof color images has been familiar in various equipment,
for example, Digital Signage, Smart Phone, etc. 1-3*1882-36, Yashima-nishi, Takamatsu City, Kagawa 761-0113 Japan

Copyright © 2018, the Authors. Published by Atlantis Press.
This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/).
312

Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 4 (March 2018) 312-316___________________________________________________________________________________________________________processing could improve the feeling (or Kansei)
impression better than the original image.6
In order to further develop the HMGD processing
method for better automated one, we noticed that thevariance estimation of Gaussian distribution around theneighborhood of peak in the original image’s histogram
should be performed. Then previously, we presented avariance (or Gaussian width) estimation method using
the symmetry of Gaussian function.
However, since the peak shape like Gaussian function in
the histogram of original image does not always show
the good symmetry in real, the previous varianceestimation method did not work so well as we expected.
In this paper, we newly propose the improved
estimation method using regression analysis, based on
curvature computation for the cumulative histogram oforiginal image’s one. Moreover, we show theexperimental results.

Eq.(5), respectively. From Eq.(4) and Eq.(5), we obtainthe curvature R(x) as shown in Eq. (6).
 u  a 2 (3)exp   2 2 du .
2 2 0xx

Kf  x    g u du 0  x  a 2 
exp  2 2 2 2dy g x dx

K(4)d 2 y dg  x  a  x g x dx 2dx
2a  x R x 

2g x1 g x



32 2




 (6)
3

2 2  1 g x a  x  
2(5)

g x





From Eq.(6), since the value of g(x) is greater than orequal to 0, we understand that the curvature R(x) varies
the sign according to the variable x.9
That is, if x<a → R>0 (downward convex shape), and if
x>a → R<0 (upward convex shape).

2. Principle

2.1. Brightness Peak Detection of Original Image
In the section, we describe the principle of peakdetection in the brightness (or lightness) histogram oforiginal color image.
Let y be a function with respect to x that represents thecumulative histogram curve and the brightness
parameter, respectively. The definition of the curvatureR(x) for the cumulative histogram curve is given by thefollowing Eq. (1).6-9

2.2. Variance Estimation
The conceptual image of the original image’s histogramwith the variance 2 and the average a is shown in Fig.1.
yg(a)3  dy  2  2
1     .
  dx  d2yRx   2dx(1)And let g(x) and K be a Gaussian distribution function
and a coefficient which is defined by the followingequation, respectively.
  x  a 2 ,exp  2 2 2 2


K2L



0

(2)

u  a   exp   2

a

a2

a

2

LFig.1. Conceptual histogram image of the Gaussian function
curve around the peak in the histogram.8, 9Kg x  2022

 du  1 .
From Eq. (6), we can also represent R(x) as Eq. (7).

a  x  a  x  g  x  1
R x   233 
22 2 
1 g x 21gx  


Next, let y=f(x) be a function that representing thecumulative histogram curve that is represented Eq. (3).
That is, dy/dx and d2y/dx2 be described as Eq.(4) and2

313g x







(7)

Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 4 (March 2018) 312-316___________________________________________________________________________________________________________Let C=1/2 and let the other function excepting the C inEq. (7) be H(x), then we have the following Eq. (8).

a
xgx
   1 R x  2 
 CH ( x )3 2 2 
 1 g x







the gray level image, and its cumulative histogram areillustrated with the number s and the estimated standard
deviation (STD) (8)
1600
1400
1200
1000

From Eq. (8), we obtain relation (Eq. (9)) on sampled
data where εi shows the error.

R ( xi )  CH ( xi )   i ,

 i ~ N 0,  2800600400

  i  1, n (9)20001Applying the least square regression analysis method tothe sample data, we have Eq. (10).102243 64

85 106 127 148 169 190 211 232 253

70000
60000
50000

n

  H ( xi )  R ( xi ) C  i 1 n

  H ( xi ) 

240000, 2 

1
C(10)

30000
20000

i 1

10000

However, for the computational simplicity, we roughly
approximate the H(x) as shown in Eq. (11).
H x a  x  g  x 

1  g  x   a  x  g  x 30122 43 64 85 106 127 148 169 190 211 232 253

Fig. 2. Original images (color and gray level) and thehistogram of the gray level image and its cumulative one.

(11)

2 2

1800
1600
1400

3. Experiment Results

1200
1000

We have done the experimentation in order to evaluate
the capability of the variance (2) estimation over the
sampled data where the number of the sampling points
is s. By varying the number s, we performed theestimation and then applied the HMGD processing tothe original image (Fig.2) based on the estimatedvariance. We initiated the number of sampling points s
as s=5 and varied the number increasing by 4, such ass=5, 9, 13, 17, 21, 25.
Experimental results are shown in Fig.3 through Fig.8.
In each figure, the color image is located at left upperside and the corresponding gray level image (= image
showing intensity) at left lower side. Moreover, thehistogram of the gray level image is shown at the rightupper side, and its cumulative histogram at the rightlower side.
Also in each figure, HMGD processed images (colorand gray level image), the histogram corresponding to800600
40020001224364 85 106 127 148 169 190 211 232 253

70000
60000
50000
40000
30000
20000
10000
01

22 43 64 85 106 127 148 169 190 211 232 253

HMGD processed images (color and gray level) and the histogram of the graylevel image and its cumulative histogram (s=5, estimated STD =27.607).

Fig. 3. Results and the corresponding histograms (I).

314

Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 4 (March 2018) 312-316___________________________________________________________________________________________________________1600

1600

1400

1400

1200

1200

1000

1000

800

800

600

600

400

400

200

200

001

22 43 64 85 106 127 148 169 190 211 232 253

170000

70000

60000

60000

50000

50000

40000

40000

30000

30000

20000

2000010000

10000

0224364 85 106 127 148 169 190 211 232 253

0122 43 64 85 106 127 148 169 190 211 232 253

122 43 64 85 106 127 148 169 190 211 232 253

HMGD processed images (color and gray level) and the histogram of the graylevel image and its cumulative histogram (s=9, estimated STD =29.26).

HMGD processed images (color and gray level) and the histogram of the graylevel image and its cumulative histogram (s=17, estimated STD =37.796).

Fig. 4. Results and the corresponding histograms (II).

Fig. 6. Results and the corresponding histograms (IV).

16001600

1400

1400

1200

1200

1000

1000

800

800

600

600

400

400

20020000
122 43 64 85 106 127 148 169 190 211 232 253

170000

70000

60000

60000

50000

50000

40000

40000

30000

30000

20000

20000

10000

10000

0224364 85 106 127 148 169 190 211 232 253

0122 43 64 85 106 127 148 169 190 211 232 253

122 43 64 85 106 127 148 169 190 211 232 253

HMGD processed images (color and gray level) and the histogram of the graylevel image and its cumulative histogram (s=13, estimated STD =32.63).

HMGD processed images (color and gray level) and the histogram of the graylevel image and its cumulative histogram (s=21, estimated STD =43.596).

Fig. 5. Results and the corresponding histograms (III).

Fig.7. Results and the corresponding histograms (V).

315

Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 4 (March 2018) 312-316___________________________________________________________________________________________________________Then we consider that it is better to estimate thevariance after the decision of the section, based on thedetected peaks and valleys in a histogram.
For further study, we investigate the effectiveness of theproposed variance estimation method when the method
is applied to all sections in a histogram where eachsection contains one peak point between two valleys.

1600
1400
12001000
80060040020001

22 43 64 85 106 127 148 169 190 211 232 253

References

70000
60000
50000

1. R. C. Gonzalez and R. E. Woods, Digital Image
Processing (Addison-Wesley Publishing Company,1993).
2. B. Jahne, Digital Image Processing --Concepts,Algorithms, and Scientific Applications-- 4th edition(Springer, 1995).
3. E. S. Umbaugh, Computer Vision and Image Processing:
A Practical Approach Using CVIP tools (Prentice HallPTR, 1998).
4. W. Burger and J. M. Burge, Principles of Digital Image
Processing: Fundamental Techniques (Springer 2009).
5. T. Izumi, T. Hattori, S. Sugimoto, and T. Takashima,
Color Image Arrangement Using Elastic Transform on
Principal Component Axis (in Japanese), Journal ofJapan Society of Kansei Engineering 8(3) (2009) 667674.
6. Y. Kawakami, T. Hattori, D. Kutsuna, H. Matsushita,
Y. Imai, H. Kawano, R.P.C. Janaka Rajapakse,
Automated Color Image Arrangement Method Based on
Histogram Matching - Investigation of Kansei impression
between HE and HMGD -, International Journal of
Affective Engineering 14(2) (2015) ISSN 2187-5413, 8593.
7. Y. Kawakami, T. Hattori, Y. Imai, H. Matsushita,
H. Kawano, R. P. C. Janaka Rajapakse, Kansei
Impression and Automated Color Image Arrangement
Method, Journal of Robotics, Networking and Artificial
Life 1(1) (2014) ISSN 2352-6386, 60-67.
8. Y. Kawakami, T. Hattori, Y. Imai, H. Matsushita,
H. Kawano, and R. P. C. Janaka Rajapakse, AutomatedColor Image Arrangement Method Using Curvature
Computation in Histogram Matching, in Proceedings ofInternational Conference on Artificial Life and Robotics(ICAROB 2015) (Oita, Japan, 2015) ISBN 978-49902880-9-9, 272-277.
9. Y. Kawakami, T. Hattori, Y. Imai, Y. Horikawa,
H. Matsushita, R. P. C. Janaka Rajapakse, AutomatedProcessing of Multiple-Brightness Peak Histogram Image
Using Curvature and Variance Estimation, Journal ofRobotics, Networking and Artificial Life 3(1) (2016)
ISSN 2352-6386, 55-60.
10. D. G. Kleinbaum, L. L. Kupper, A. Nizam, E. S.
Rosenberg, Applied Regression Analysis and Other
Multivariable Methods (Brooks/Cole Pub Co, 2013).

40000
30000
20000
100000122 43 64 85 106 127 148 169 190 211 232 253

HMGD processed images (color and gray level) and the histogram of the graylevel image and its cumulative histogram (s=25, estimated STD =49.797).

Fig. 8. Results and the corresponding histograms (VI).

Since the histogram of original gray level image (seeFig.2) roughly shows the single peak and the big
mountain shape, the more sampling points (number s)
are increased, the more estimated STD  we haveobtained. Then the HMGD processing results in higher
contrasted image, i.e. image enhancement.

4. Conclusion
In this paper we have newly proposed the method forthe variance estimation using regression analysis, inorder to decide the reference histogram in HMGDprocessing.
As for the method, first, we compute the curvature forthe cumulative histogram and detect the brightness peakin the original histogram. Next, we estimate the variance(or standard deviation) around the peak point of thehistogram using regression analysis. And we make thereference histogram pattern (Gaussian distribution)
based on the estimated variance. Finally, we perform theimage transformation by the HMGD processing.
We consider that the experimental results are very good.
However, the ability of variance estimation depends on
the number of sample points s, that is, the sampling
section.

316