an energy based model for the image edge-histogram specification problem.bak

8
IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012 379 Correspondence An Energy-Based Model for the Image Edge-Histogram Specification Problem Max Mignotte Abstract—In this correspondence, we present an original energy-based model that achieves the edge-histogram specification of a real input image and thus extends the exact specification method of the image luminance (or gray level) distribution recently proposed by Coltuc et al. Our edge- histogram specification approach is stated as an optimization problem in which each edge of a real input image will tend iteratively toward some specified gradient magnitude values given by a target edge distribution (or a normalized edge histogram possibly estimated from a target image). To this end, a hybrid optimization scheme combining a global and deterministic conjugate-gradient-based procedure and a local stochastic search using the Metropolis criterion is proposed herein to find a reliable solution to our en- ergy-based model. Experimental results are presented, and several appli- cations follow from this procedure. Index Terms—Conjugate gradient, edge-histogram specification, en- ergy-based model, gradient magnitude, local stochastic search, Metropolis algorithm. I. INTRODUCTION An image histogram, by its ability to represent the intensity-level dis- tribution of the image pixels, remains a useful and popular statistical tool that enables information about the visual appearance of an image to be obtained quickly and easily or histogram-based features (such as the mode, mean, variance, entropy, energy, kurtosis, etc.) widely used in region-based image segmentation, and indexing or local enhance- ment techniques to be computed . Among the classical algorithms ex- ploiting this intensity-level distribution, histogram specification (also called histogram matching) refers to a class of image transforms, which changes the histogram of a given image to another desired one. It is an important and well-known technique that can be used, e.g., to water- mark an image [1], to enhance the contrast in only some specific re- gions (of interest) of the image (by modifying the dynamic range of the pixel values) [2]–[4], or to normalize two images (e.g., for fusion, mosaicing, registration, etc.). Although the histogram specification algorithm has an exact solu- tion for a continuous image (thus yielding to a perfect match between the input and the desired intensity-level distribution), it is generally an ill-posed problem that does not admit an exact solution in the discrete case. For example, in the case where the output distribution is uniform, the resulted histogram after specification (or so-called equalization) is flattened but may be far from being uniform. This comes from the fact that, since the number of pixels is usually much larger that the number of intensity levels, there are many pixels with the same intensity level, Manuscript received August 28, 2010; revised December 14, 2010 and March 09, 2011; accepted June 09, 2011. Date of publication June 20, 2011; date of current version December 16, 2011. The associate editor coordinating the review of this manuscript and approving it for publication was Prof. Rafael Molina. The author is with the Département d’Informatique et de Recherche Opéra- tionnelle, Université de Montréal, Faculté des Arts et des Sciences, Montréal, QC H3C 3J7, Canada (e-mail: [email protected]). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/TIP.2011.2159804 and these latter cannot be separated (they can only be merged together) in order to approximate the different bins of a uniform histogram [2]. It has been finally realized that the key to achieve a discrete exact his- togram specification method was to find a strict ordering relation sepa- rating each pixel of the original image with the same intensity into sev- eral subsets (in order to approximate the different bins of the desired output distribution). Practically speaking, let be a discrete image with gray levels and pixels with coordinates rep- resenting the discrete pixel locations. Let also be the nonnormalized target histogram (i.e., the desired output inten- sity-level distribution), and let be a strict ordering relation on the set of pixels of , which is defined as if the gray level (or the intensity value) of pixel is lower or equal than the gray level of pixel with respect to the lexicographic order. Then, the exact specification proceeds simply as follows [5] (i.e., algo- rithm A). 1) Order pixels are 2) Split this pixel ordering relation from left to right in groups, such as group has pixels. 3) For all the pixels in group , assign the gray level . In this context, the structure of the image is thus distorted by en- forcing the target histogram, and it yields exact results if a strict or- dering relation is found. In practice, several ordering relation strate- gies can be used. The simplest one consist of preprocessing the orig- inal image by adding a small amount of uniform noise to each pixel intensity value [6], [7] or separating randomly each pixel of the orig- inal image with the same intensity level [8]–[10]. Another solution, i.e., avoiding noise, consists of separating pixels of the same intensity group either according to their local mean on the four horizontal and vertical neighbors [11] or to the average intensity (of the surrounding pixels) at their location [5] or, finally, by taking into account not only the local mean intensity but also the local edge information [12] via a wavelet transform (which preserves edge information and produces sharper image enhancement results compared with the classical local mean model [5], [11]). Edges are also important features of an image because they contain significant information; indeed, edges may correspond to object bound- aries or to changes in the surface orientation, discontinuities in depth, or material properties, to name a few. Edges also help to extract useful in- formation and characteristics of an image. For example, the edge-based features of shape and texture are important for image retrieval and in- dexing. Consequently, an edge histogram may be important to obtain information about the visual appearance of an image (i.e., coarse or highly detailed image, the structure in the image spatial configuration, spatial resolution, spatial detail statistics, and fractal dimension of an image 1 ) or its content (with naturally uneven or perfectly geometrically shaped or man-made objects). In the light of the discussion above, it is fair to think that the edge-histogram specification of an image may be of interest for several computer vision and image processing appli- cations. If the statistical distribution of the intensity value of any real images varies, the statistical distribution of edges or the gradient mag- nitude of an image follows a (well known in the denoising community [14]) long-tail distribution mathematically expressed by a two-param- eter density function of form . This is due to the 1 The fractal dimension of an image surface corresponds to the human percep- tion of image roughness [13]. 1057-7149/$26.00 © 2011 IEEE http://ieeexploreprojects.blogspot.com

Upload: ieeexploreprojects

Post on 11-Jun-2015

454 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: An energy based model for the image edge-histogram specification problem.bak

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012 379

Correspondence

An Energy-Based Model for the Image Edge-HistogramSpecification Problem

Max Mignotte

Abstract—In this correspondence, we present an original energy-basedmodel that achieves the edge-histogram specification of a real input imageand thus extends the exact specification method of the image luminance(or gray level) distribution recently proposed by Coltuc et al. Our edge-histogram specification approach is stated as an optimization problem inwhich each edge of a real input image will tend iteratively toward somespecified gradient magnitude values given by a target edge distribution (or anormalized edge histogram possibly estimated from a target image). To thisend, a hybrid optimization scheme combining a global and deterministicconjugate-gradient-based procedure and a local stochastic search using theMetropolis criterion is proposed herein to find a reliable solution to our en-ergy-based model. Experimental results are presented, and several appli-cations follow from this procedure.

Index Terms—Conjugate gradient, edge-histogram specification, en-ergy-based model, gradient magnitude, local stochastic search, Metropolisalgorithm.

I. INTRODUCTION

An image histogram, by its ability to represent the intensity-level dis-tribution of the image pixels, remains a useful and popular statisticaltool that enables information about the visual appearance of an imageto be obtained quickly and easily or histogram-based features (such asthe mode, mean, variance, entropy, energy, kurtosis, etc.) widely usedin region-based image segmentation, and indexing or local enhance-ment techniques to be computed . Among the classical algorithms ex-ploiting this intensity-level distribution, histogram specification (alsocalled histogram matching) refers to a class of image transforms, whichchanges the histogram of a given image to another desired one. It is animportant and well-known technique that can be used, e.g., to water-mark an image [1], to enhance the contrast in only some specific re-gions (of interest) of the image (by modifying the dynamic range ofthe pixel values) [2]–[4], or to normalize two images (e.g., for fusion,mosaicing, registration, etc.).

Although the histogram specification algorithm has an exact solu-tion for a continuous image (thus yielding to a perfect match betweenthe input and the desired intensity-level distribution), it is generally anill-posed problem that does not admit an exact solution in the discretecase. For example, in the case where the output distribution is uniform,the resulted histogram after specification (or so-called equalization) isflattened but may be far from being uniform. This comes from the factthat, since the number of pixels is usually much larger that the numberof intensity levels, there are many pixels with the same intensity level,

Manuscript received August 28, 2010; revised December 14, 2010 and March09, 2011; accepted June 09, 2011. Date of publication June 20, 2011; date ofcurrent version December 16, 2011. The associate editor coordinating the reviewof this manuscript and approving it for publication was Prof. Rafael Molina.

The author is with the Département d’Informatique et de Recherche Opéra-tionnelle, Université de Montréal, Faculté des Arts et des Sciences, Montréal,QC H3C 3J7, Canada (e-mail: [email protected]).

Color versions of one or more of the figures in this paper are available onlineat http://ieeexplore.ieee.org.

Digital Object Identifier 10.1109/TIP.2011.2159804

and these latter cannot be separated (they can only be merged together)in order to approximate the different bins of a uniform histogram [2].It has been finally realized that the key to achieve a discrete exact his-togram specification method was to find a strict ordering relation sepa-rating each pixel of the original image with the same intensity into sev-eral subsets (in order to approximate the different bins of the desiredoutput distribution). Practically speaking, let � be a discrete image with� gray levels and��� pixels ����� ���with coordinates ���� ��� rep-resenting the discrete pixel locations. Let also� � ��� �� � � � ����be the nonnormalized target histogram (i.e., the desired output inten-sity-level distribution), and let � be a strict ordering relation on the setof pixels of � , which is defined as ����� ��� � ����� ��� if the graylevel (or the intensity value) of pixel ����� ��� is lower or equal thanthe gray level of pixel ����� ��� with respect to the lexicographic order.Then, the exact specification proceeds simply as follows [5] (i.e., algo-rithm A).

1) Order pixels are ����� ��� � ����� ��� � � � � � ��� � � �2) Split this pixel ordering relation from left to right in � groups,

such as group has � pixels.3) For all the pixels in group , assign the gray level .In this context, the structure of the image is thus distorted by en-

forcing the target histogram, and it yields exact results if a strict or-dering relation is found. In practice, several ordering relation strate-gies can be used. The simplest one consist of preprocessing the orig-inal image by adding a small amount of uniform noise to each pixelintensity value [6], [7] or separating randomly each pixel of the orig-inal image with the same intensity level [8]–[10]. Another solution,i.e., avoiding noise, consists of separating pixels of the same intensitygroup either according to their local mean on the four horizontal andvertical neighbors [11] or to the average intensity (of the surroundingpixels) at their location [5] or, finally, by taking into account not onlythe local mean intensity but also the local edge information [12] viaa wavelet transform (which preserves edge information and producessharper image enhancement results compared with the classical localmean model [5], [11]).

Edges are also important features of an image because they containsignificant information; indeed, edges may correspond to object bound-aries or to changes in the surface orientation, discontinuities in depth, ormaterial properties, to name a few. Edges also help to extract useful in-formation and characteristics of an image. For example, the edge-basedfeatures of shape and texture are important for image retrieval and in-dexing. Consequently, an edge histogram may be important to obtaininformation about the visual appearance of an image (i.e., coarse orhighly detailed image, the structure in the image spatial configuration,spatial resolution, spatial detail statistics, and fractal dimension of animage1) or its content (with naturally uneven or perfectly geometricallyshaped or man-made objects). In the light of the discussion above, itis fair to think that the edge-histogram specification of an image maybe of interest for several computer vision and image processing appli-cations. If the statistical distribution of the intensity value of any realimages varies, the statistical distribution of edges or the gradient mag-nitude of an image follows a (well known in the denoising community[14]) long-tail distribution mathematically expressed by a two-param-eter density function of form���� � �������� ���. This is due to the

1The fractal dimension of an image surface corresponds to the human percep-tion of image roughness [13].

1057-7149/$26.00 © 2011 IEEE

http://ieeexploreprojects.blogspot.com

Page 2: An energy based model for the image edge-histogram specification problem.bak

380 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012

intrinsic stationary property of real-world images, containing smoothareas interspersed with occasional sharp transitions, i.e., edges. Thesmooth regions produce small-amplitude gradient magnitude values,and the transitions produce sparse large-amplitude gradient magnitudevalues [14]. Due to this intrinsic stationary property of any real-worldimages, the edge histogram will be associated with a decreasing func-tion with a unique mode (the value that occurs the most frequently) at(amplitude gradient magnitude) zero, corresponding to the numeroussmooth regions existing in any real-world images. Except for this prop-erty, different informative distributions (for different parameter positivevalues of � and �) can be found or specified for a given input image.

In this paper, an approach for the edge-histogram specification of areal image is proposed. This approach combines the ordering relationdescribed above but applied to the set of the gradient magnitude valuesof an input image (and related to each pair of pixels separated from agiven distance). It allows us to obtain first the set of increasing gradientmagnitude values of an input image and then to assign to each of thema specified gradient magnitude value given by a target edge distribu-tion (or a normalized edge histogram possibly estimated from a targetimage). A hybrid optimization scheme combining a global and de-terministic conjugate-gradient-based procedure and a local stochasticsearch allow each pair of pixel values to tend (iteratively) toward thesespecified gradient magnitude levels. The remainder of this paper is or-ganized as follows: Sections II and III describe, respectively, the pro-posed model and the optimization strategy. Finally, Section IV presentsthe set of experimental results and the applications of this edge-his-togram specification method.

II. PROPOSED MODEL

Let us first consider the case of an edge-histogram specification pro-cedure in the first-order sense, i.e., using the absolute value of the gra-dient magnitude with the first-order derivative. To this end, let � bean input discrete image with � � � pixels �� located at discretelocations � � ���� ��. Our edge-histogram specification procedureaims at finding the new luminance mapping �� in which each ���� � ����in this input image with a pair of sites ��� � separated by a distance� � ������� � ���� �� � ��� � � pixel (i.e., with site locatedin the first nearest eight neighbors of �) is considered as an indepen-dent random variable whose distribution follows a target distribution orthe normalized histogram � with a desired shape (possibly estimatedfrom a target image). If this mapping �� is estimated in the minimalmean square sense, then �� is the solution image that should minimizethe following objective function ���:

�� � �����

��

��� ���

����� ��� � ��� � ���

� �

����

(1)

where � �� represents the eight nearest neighbors of � and, conse-

quently, the summation is over all the pair of sites (i.e., for all sites� and for all the pair of sites including � with belonging to theeight nearest neighbors of �). In this case, ���� ��� are the valuesgiven by an edge-histogram specification method (of the first-ordermagnitude gradient) with the nonnormalized target distribution� � ���� ��� ����� (possibly a priori imposed or estimated froma target image) with � as its number of bins. Practically speaking, let� � � � � � � be the number of absolute values of the first-orderdifference ���� ��� in the original image, and let � be a strict orderingrelation, which is defined among ��� � ��� (as ��� � ��� � �� � �� ifthe first-order difference ��� � ��� is lower or equal than the first-orderdifference �� � �� with respect to the lexicographic order). Our

edge-histogram specification histogram method is thus a two-stepprocedure which proceeds as follows (i.e., algorithm B2).

1) Ordering relation;a) Normalize � in order that � � �����

��� ��b) Order the� � ��� �� pairwise pixel absolute differences:

��� � ��� � �� � � � � � ��� � � �c) Split this pixel-absolute-difference ordering relation from

left to right in � groups, such as group � has �� elements,i.e., �� couples of pixels.

d) For all pairs of pixels or pair of sites ��� � whose the absolutedifference is in group � , assign ���� ��� � � .

2) Optimize (1) (see Section III).This model can be easily generalized in order to ensure an edge spec-ification histogram, e.g., in the � � �-order sense (i.e., with gradientmagnitude using the second-order derivative). To this end, the sum-mation of (1) should be all the pair of sites ��� � with � �

� and� �� designating the 16-pixel neighborhood of � separated by distance

� � � pixels �� � ������������ ������� and� � ���� �� pairsof pixels or ���� ��� values. In the same way, this model can be easilygeneralized in order to ensure simultaneously an edge-histogram spec-ification following �� different distributions for, respectively, the set of�� gradient magnitude values in �� different order senses. To this end,let ��� � be the vector associated to the �� nonnormalized target distri-butions���� � �������� ������� ���������with � �� ��� (possiblya priori imposed or estimated from a target image), let � �

� representsthe ���� neighbors of � separated by distance � � � pixels, the proce-dure will commence as follows (i.e., algorithm C):

1) Specification with ordering relation;a) For � � � to ��;

I) ���� � � � � � � ��II) Normalize ���� such that, ���� �

�������� ������

III) Order the ���� pairwise pixel absolute differences:

��� � ��� � �� � � � � � ��� � � �

IV) Split this pixel-absolute-difference ordering relationfrom left to right in � groups, such as group � has������ elements, i.e., ������ couples of pixels.

V) For all pairs of pixels or sites ��� � whose absolutedifference is in a group � , assign ���� ��� � � .

2) Optimize (1) for � �� �

�� � �

� (see Section III).Finally, this model can be easily generalized in order to ensure si-

multaneously �� edge-histogram specifications (following �� differentgiven distributions) and an exact histogram specification of the lumi-nance (or intensity) level. The method (i.e., algorithm D) simply con-sists of alternating algorithms C and A until a stability criterion isreached (i.e., the output image does not change too much between twoiterations). We would like to add that extending our approach to colorimages is straightforward as follows.

1) In the case where the input image is specified directly from a targetdistribution law, it consists first of representing the input image(originally expressed in the RGB color space) in a color spacewhere one coordinate is the intensity or luminance value, such asthe perceptual LAB color space, and processing only on the lumi-nance value. After treatment, let �� be the output (edge specified)

2Algorithm B corresponds to the cases where the input and target imageshave integer luminance values ranging from [0 : 255], and we also consider� � ��� bins for the luminance histogram and for the target histogram ofthe absolute value of the first-order difference (first-order gradient magnitude).Consequently, if the target image has the same size of the input image, � isnecessarily a natural number (ranging from �� � ��� . Nevertheless, if thetarget image does not have the same size of the input image, each value � ofdistribution � , i.e., after the first step of Algorithm B (i.e., the step ensuringthat this histogram integrates to ��� �� ), must be rounded to the nearestinteger, and this then ensures that � remains a natural number. Let us also notethat, after rounding up to the nearest integer, the new � do not add up� , butthis is not a problem in practice.

http://ieeexploreprojects.blogspot.com

Page 3: An energy based model for the image edge-histogram specification problem.bak

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012 381

luminance map; then, it continues by converting back the ����into the classical RGB color space.

2) In the case where the input image is specified from a target imagefor which we want to keep its color palette, there are two differentways.

a) The histogram of the components �, �, and � of the inputimage is specified (algorithm A) from the components �,�,and �, of the target image.

b) As proposed in [5], one has to define a strict ordering relationamong color image pixels, and a possible solution is to usethe luminance or the gray value for that. In this case, thecolor-histogram specification procedure proceeds as follows:

i) Order color pixels of the input image ��� from theirluminance or gray value as follows:

����� ��� � ����� ��� � � � � � ��� � � ��

ii) Order color pixels of the target image � � from theirluminance or gray value as follows:

��� ��� � ��� ��� � � � � � � � � ��

Note that if the size of the target image is different fromthe size of the input image, an up-sampling or a subsam-pling procedure should be used.iii) Assign to ����� ��� the color value ��� ��� for all� �� .

Since two luminance values can be identical for different colorvalues, the first strategy thus seems to be more appropriate if wewant to preserve the different hues of an image to be specified in thecolor-histogram sense. Nevertheless, the second strategy seems alsowell suited if the target image has a dominant hue as is the case in atexture transfer procedure such as that presented in Section IV-C.

III. OPTIMIZATION STRATEGY

The objective function to be minimized� may be more or less com-plex according to both the shape of the target edge distribution and theedge structure of the input image (i.e., the edge distribution shape ofthe input image). This cost function may be sometimes nearly convexif the two edge histograms are close or very complex with several localextrema, if the shape of the two edge histograms are different, or if oneof these two edge histograms exhibits some discontinuities or an un-usual shape (i.e., a shape far away from the classical density functionof the form ���� � ������������ put forward in [14]). In order toensure a good minimization and, thus, an accurate edge specificationprocess in all cases, we have proposed the following hybrid and adap-tive optimization strategy:

1) Since an analytical expression of the derivative of this function� to be optimized is easily available, we first use a conjugate-gradient procedure initialized with the input original image. Forthe conjugate gradient, the step size is fixed to � and adaptivelydecreased by a factor of 2 if the energy to be minimized increasesbetween two iterations. We stop the optimization procedure if afixed number of iterations �� or the convergence is reached.

2) In order to refine the estimation given by the aforementioned de-terministic optimization method, we use the previous optimiza-tion result as the initialization of a stochastic local search. To thisend, we use a local exploration around the current solution usingthe Metropolis criteria [15] and a small radius of exploration (seealgorithm 1).

After this hybrid optimization procedure, it is possible that a localminimum of the energy function � is reached (in this case, at conver-gence, � � �, and practically speaking, the histogram to be specifiedis yet far from being the target histogram, and with the value of� being

proportional to this distance). In order to avoid being trapped in a localminimum and to be closer to the global minimum, a strategy (that wasempirically tested and relatively efficient) consists of alternating thespecification procedure (ordering relation), and this hybrid optimiza-tion method until a given criterion is reached such as when the value ofthe energy cost function � and/or the similarity between the target andoutput edge histograms (e.g., estimated by a Bhattacharya distance) isnot too high. Let us note that a global minimum is not ensured by thisstrategy. For certain images, the image structure and its properties donot allow a perfect match between the input and the desired distribution(i.e., thus inducing an error � � �) to be arrived at every time. Con-sequently, our strategy that consists of alternating the ordering relationand the proposed hybrid optimization method has to be stopped whena maximal number of iterations is reached.

IV. EXPERIMENTAL RESULTS

A. Setup

In all the experiments, the input image is assumed to be toroidal (i.e.,wrapping around at the borders; this property only simplifies the im-plementation, but we can also replicate the border pixels or use a dif-ferent strategy) with colors or luminance values or magnitude gradientranging from [0.0:1.0]. We have used 256 bins for the histogram of theluminance values and for the histogram of the magnitude gradient.

For the conjugate gradient, the step is set to � ��. The maximalnumber of iterations is set to �� ��. For the local explorationsearch, using the Metropolis criteria, the initial temperature and thefinal temperature are set to � � � ��� and � � ����, respec-tively. The radius of exploration is � ����, and the maximal numberof iterations is set to �� ��.3 Finally, in order to obtain a finaledge-specified image, which will be close enough to a reliable solution,we have respectively set � �� , �� �� , and �� �.

B. Edge-Histogram Specification

Our initial experiment with algorithm B was with a target distribu-tion (for the edge histogram using the first-order derivative) with a de-sired shape. For this experiment, it is worth recalling that the set ofpossible shapes for the edge histogram of an image (see Section I) arethe set of decreasing functions with a mode at (amplitude gradient mag-nitude) zero (due to the numerous smooth regions that necessarily existin any real-world images and that induce, statistically and more gen-erally, an original edge histogram with a density function of the form���� � ������������ [14]). We have thus considered the followingthree unimodal (at 0) decreasing (envelope) distributions (� denotingthe Heaviside step function).

1) First, the semi-Gaussian function is given as

� ���

������������ �����

2) Second, the semitriangle function is given as

� ���

��� � ����� � ��������

3) Third, the (nonunimodal at zero) shifted Gaussian function isgiven as

� ��� � ��� ��mean �� � var ����� ��

3Due to the small radius of exploration, the computational complexity of thisoptimization step (in fact, a simple local search around the gradient estimation)is considerably reduced, and this explains why a low number of iterations isherein performed.

http://ieeexploreprojects.blogspot.com

Page 4: An energy based model for the image edge-histogram specification problem.bak

382 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012

Fig. 1. Algorithm B. Edge-histogram specification procedure with a target distribution model. (from left to right) Original input image and four edge-histogramspecification results. (bottom right) Four output edge histograms (with the target and original histogram superimposed on the output edge histogram). The Bhat-tacharya distance� is respectively for these four experiments 0.312, 0.257, 0.783, and 0.264 before the edge specification process and 0.091, 0.061, 0.544 and0.190 after the edge specification process.

4) Fourth, a decreasing exponential function is given as

� ��� ��

�������� ������

with ��, i.e., a normalizing factor ensuring that these functions inte-grate to one (these aforementioned target distributions are graphicallyshown at the bottom right in Fig. 1). The validation and the efficiency

of our algorithm are then achieved qualitatively by visually comparingthe output and the desired edge histogram shapes and quantitatively byestimating the Bhattacharya distance (ranging from 0 to 1) as follows:

�� � ���� ���� � ��

���

���

� �������

���

(2)

between the two (normalized) edge histograms before and after thespecification process. Fig. 1 (and Fig. 3) shows the obtained results. Wecan notice that our edge-histogram specification procedure is not exactsince the output histogram shape is not a perfect match with the targethistogram shape. This may derive from the fact that the edge imagestructure could not be geometrically more distorted in order to bettermatch the desired target edge histogram (or equivalently, the gradientdescent procedure has reached the global minimum of the energy func-tions� and� �� � in this case). Another possibility is that the gradientprocedure is stuck in a local minimum. Nevertheless, in all tested cases,the estimation of the Bhattacharya distance shows us that the simi-larity between these two histogram shapes noticeably increases (or theBhattacharya distance decreases) after our edge specification process,except for the nonunimodal at zero shifted Gaussian distribution forwhich the output histogram remains far away from the target distribu-tion and the Bhattacharya distance remains high ��� � ��� �. Wecan notice that the resulting output images are, in these three cases,visually different with different edge statistic properties (and this willalso be confirmed in the following experiments).

Our edge specification process may also be efficiently used fordetail enhancement of an input image or even as an original detailexaggeration procedure that goes much further than the results usuallyobtained with classical high-boost filters for which artifacts due tothe noise amplification of the high-pass filter (in the case of highvalue of the boosting parameter) quickly appear and may degrade theimage quality. In our case, this detail exaggeration procedure simplyconsists of the use of algorithm B in order to realize an edge-histogramequalization technique (i.e., by considering the target distribution

http://ieeexploreprojects.blogspot.com

Page 5: An energy based model for the image edge-histogram specification problem.bak

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012 383

Fig. 2. Algorithm B. Detail enhancement and detail exaggeration procedure on the input image shown at top and bottom left. (from top to bottom) Cathedral(Notre Dame, Lyon, France) and statue images (Berkeley database) and results for two different decreasing values of the Bhattacharya distance (respectively,���� � � and ����� � as the stopping criterion of algorithm B with � being the uniform distribution), i.e., cathedral image � � ����

(original image), � � ����, and � � ����. Statue image � � ���� (original image), � � ����, and � � ����.

� simply equal to the uniform distribution). Our iterative mini-mization-based edge-histogram specification procedure then will aimat flattening, as much as possible, the gradient magnitude distributionof the input image. In this latter procedure, the desired level of detailin the output image can also be easily controlled, e.g., by estimatingat each iteration the Bhattacharya distance between the output andthe desired uniform distribution and simply by stopping our iterativeprocedure when this parameter reaches a given similarity value. In thissupervised procedure, the desired level of detail in the output imagewill increase as the user increases the value for this, i.e., the Bhat-tacharya-distance-based similarity measure between the output edgehistogram and the uniform edge distribution. Figs. 2 and 3 show theobtained results for two different increasing values of this aforemen-tioned Bhattacharya (similarity) value as a stopping criterion.

Our procedure of edge-histogram specification may also be used inorder to render an input image with different detail levels or, more gen-erally, into a specified number of separate levels of detail depths. Thisrendering is possible if one specifies the output edge histogram with amultimodal (edge) distribution. This allows us to render an image withdifferent classes of edge magnitude values or to enhance a specifiedclass of detail. Fig. 4 shows the obtained image results for one, two,and three different classes of detail accuracy levels, respectively (thusby specifying the output edge histogram to be respectively unimodal,bimodal, and trimodal).

C. Specification of Multiple-Edge Histograms

Our edge-histogram specification model can also be used to some-what eliminate an effect of unequal resolution (i.e., loss of accuracy,contrast, or details) possibly created by a blurring degradation (such

Fig. 3. Algorithm B. Edge-histogram specification procedure with a target dis-tribution model. (from left to right) Magnified regions in Figs. 1 and 2.

as a motion or focal blur) between two images of (possibly) the samescene. This correction can be useful in order to normalize an imageset (e.g., for mosaicing generation, fusion, registration, lighting correc-tion, indexing, retrieval systems, or other applications). Fig. 5 showsdifferent views and icons of the cathedral church of Notre Dame deFourviere (Lyon, France) taken by different cameras at different times(thus with different resolution levels and color palettes). One of theseimages is the cathedral image already used in the preceding experi-ments and considered in this test as the target high-resolution colorimage on which we desire to normalize the other images in the color-and resolution-degree senses. The results of our edge-and-color-his-togram specification method (algorithm D with �� � �, i.e., in the two

http://ieeexploreprojects.blogspot.com

Page 6: An energy based model for the image edge-histogram specification problem.bak

384 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012

Fig. 4. Algorithm B. Image rendering procedure with different classes of detailaccuracy levels. (from top to bottom and left to right) Images and edge-his-togram specification results (with the target histogram superimposed on theoutput edge histogram) for one, two, and three different classes of detail ac-curacy levels, respectively (by specifying the output edge histogram to be re-spectively unimodal, bimodal, and trimodal). The original images are shown atFigs. 1 and 2.

first-order senses and exploiting the first algorithm, which is presentedat the end of Section II, to ensure a specification of the color histogram)on the three original images are shown in Fig. 5.

The proposed edge specification method can also be used to trans-form one input image into another with different edge geometric andtextural properties. To this end, we have applied the algorithm D on aportrait image exploiting the three first edge distributions (i.e., �� � �

in algorithm D along with the second specification method for thecolor histogram) estimated from a target image representing a certaindrawing style. The resulting images are shown in Fig. 6.

We have compared our ��-edge-and-color-histogram specificationmethod (Algorithm D) with a classical method that exploits only colorinformation. Fig. 7 shows a magnified region of the cathedral image[see Fig. 5(a)] that a single color-histogram specification strategy (firstalgorithm of Section II, i.e., the same as that used in our algorithmD) does not allow to get an output image with the same statisticaledge geometric properties and level of detail of the target image(which is more detailed that the original image). This “detail-levelspecification” can also be quantified with the Bhattacharya distance�� (between the edge histograms of the output and the target image),which is 0.310, 0.058, and 0.534 for the original image (i.e., before

any specification method), the image after our edge-and-color-his-togram specification method and after a classical color-histogramspecification, respectively. For our algorithm, the similarity of theedge-histogram shapes of the resulting and target image thus notice-ably increases, demonstrating that our algorithm allows to transfer notonly the color information but also the edge geometric properties of thetarget image (more precisely, the �� shapes of its edge distributions).Another consequence of our algorithm is that it does not distribute thedifferent colors of the target image in the same way of our edge-andcolor-histogram specification method since our algorithm D seemsto find a compromise between the similarity between the distributionof color levels and also the distribution of gradient magnitude valuesof the target image. These remarks can also be confirmed in the caseof a texture transfer technique only using a single color-histogramspecification strategy (second algorithm of Section II), which do notallow to copy the edge textural property of a given drawing style.This is particularly visible in the case of the pointillist-style transfertechnique for which its edge distributions are specific and far awayfrom those of a natural image.

D. Sensitivity to Internal Parameters

First, it is worth mentioning that our algorithm is relatively insensi-tive to high values of the step size � because of our adaptive decreasingschedule which adaptively adjusts and reduces this value in the conju-gate-gradient procedure if this parameter is set mistakenly too high.

Second, it is also worth mentioning that our overall minimizationprocedure is relatively insensitive to the three parameters �� , �� ,and �� , which are related to the different number of iterations of theminimization procedures since the final stopping criterion (� and�� ) will ultimately check if the final solution is close enough to areliable solution.

Third,� � ��� and�� � ��� (except for algorithm B, whichis used as a detail enhancement or exaggeration procedure, for which�� has to be set by the user) must not be considered as two internalparameters of our algorithm but rather as a criterion (e.g., required bythe schedule of conditions) for the expected estimation accuracy of thefinal result.

Fourth, �� is easily findable in our case since a good final tempera-ture for a simulated annealing-like minimization procedure has to en-sure that, at the end of the stochastic search, very few sites change theirluminance values between two complete image sweeps. In our algo-rithm, this parameter has been easily found after a few trials. We havefound that �� � � � ����� was appropriate for all the experiments pre-sented in this paper.

Finally, two internal parameters are sensitive and crucial for our al-gorithm, i.e., the radius of exploration � and, in a least measure, thestarting temperature �� of the local stochastic search. The first one wasset in order to locally explore a solution whose luminance values areclose to the initial solution given by the gradient minimization proce-dure (value � � ���� ensures that the final solution will exhibit outputluminance values, which are centered around the gradient estimation,with ����� � ��� � ��� luminance values for a final luminanceimage whose luminance values are comprised in �� ����. �� is setin order to ensure that, at the beginning of the stochastic search, ap-proximately 50% of sites change their luminance values between twocomplete image sweeps.

E. Algorithm

The computational times of our procedure vary greatly dependingon the shape of the input and target edge histograms (i.e., between 10and 300 s) for an AMD Athlon 64 Processor 3500+ 2.2-GHz 2010.17bogomips and for a nonoptimized code running on Linux. In addition,

http://ieeexploreprojects.blogspot.com

Page 7: An energy based model for the image edge-histogram specification problem.bak

IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012 385

Fig. 5. Algorithm D. Image (resolution and color) normalization procedure. (from left to right) Two original images, the target image, and output edge-and-color-normalized result images obtained by our algorithm (with � � �).

Fig. 6. Algorithm D. Transfer procedure of the edge textural properties be-longing to an image to another. (from top to bottom and left to right) Originalimage and a set of pairs of images including drawing styles (i.e., the ink painting,sanguine, pointillist, and painting styles, respectively) and the obtained transferresult with algorithm D (with � � �).

it must be noted than our energy minimization can be efficiently im-plemented by using the parallel abilities of a graphic processor unit(GPU) (embedded on most graphics hardware currently available onthe market) and can be greatly accelerated (up to a factor of 200) witha standard NVIDIA GPU (2004), as indicated in [16]. The source code(in C++ language) and the pseudocode of our algorithm with the setof original and presented images (and some additional images) arepublicly available at the following web address www.iro.umontreal.ca/~mignotte/ResearchMaterial/obehs in order to make possible eventualcomparisons with future algorithms and visual comparisons.

Fig. 7. (Top to bottom) Magnified region of the image shown at Fig. 5(a) for asingle color-histogram specification strategy and our edge-and-color-histogramspecification method. The texture transfer technique using the input imageshown at top of Fig. 6 and a drawing style, and exploiting only a singlecolor-histogram specification strategy (to be compared with the results shownin the last row in Fig. 6).

V. CONCLUSION

In this paper, we have presented an original edge-histogram specifi-cation model. Our approach is based both on a strict ordering relationbetween each pair of pixels (existing in the input image and separatedby a given distance) followed by a hybrid optimization process (i.e.,a deterministic global gradient followed by a stochastic local search),particularly well suited to our energy-based edge-histogram specifica-tion model. Concretely, this energy-based model iteratively and geo-metrically distorts the edge structure of the input image during the min-imization process in order to transform its edge histogram, as muchas possible, to another desired edge histogram. Several applications ofthis model, such as a detail exaggeration procedure, an edge high-boostor enhancement filter, and a texture transfer technique, have been pre-sented and discussed.

http://ieeexploreprojects.blogspot.com

Page 8: An energy based model for the image edge-histogram specification problem.bak

386 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012

ACKNOWLEDGMENT

The author would like to thank the anonymous reviewers for theirmany valuable comments and suggestions that helped to improve boththe technical content and the presentation quality of this paper.

REFERENCES

[1] D. Coltuc and P. Bolon, “Color image watermaking in HSI space,”in Proc. IEEE ICIP, Vancouver, BC, Canada, Sep. 2000, vol. 3, pp.698–701.

[2] R. C. Gonzales and R. W. Woods, Digital Image Processing. UpperSaddle River, NJ: Prentice-Hall, 1992.

[3] V. Caselles, J. Lisani, J. Morel, and G. Sapiro, “Shape preserving localhistogram modification,” IEEE Trans. Signal Process., vol. 8, no. 2, pp.220–230, Feb. 1999.

[4] J. Stark, “Adaptive image contrast enhancement using generalizationof histogram equalization,” IEEE Trans. Signal Process., vol. 9, no. 5,pp. 889–896, May 2000.

[5] D. Coltuc, P. Bolon, and J. M. Chassery, “Exact histogram specifica-tion,” IEEE Trans. Image Process., vol. 15, no. 5, pp. 1143–1152, May2006.

[6] A. Rosenfeld and K. Kak, Digital Picture Processing. Upper SaddleRiver, NJ: Prentice-Hall, 1982.

[7] L. Shapiro and G. Stockman, Computer Vision. Englewood Cliffs,NJ: Prenctice-Hall, 2001.

[8] Y. Zhang, “Improving the accuracy of direct histogram specification,”Electron. Lett., vol. 28, no. 3, pp. 213–214, Jan. 1992.

[9] J. Rolland, V. Vo, B. Bloss, C. Abbey, and G. Young, “Fast algorithmfor histogram matching applications to texture synthesis,” J. Electron.Imag., vol. 9, no. 1, pp. 39–45, Jan. 2000.

[10] A. Bevilacqua and P. Azzari, “A high performance exact histogramspecification algorithm,” in Proc. 14th IEEE ICIAP, Modena, Italy,Sep. 2007, pp. 623–628.

[11] E. L. Hall, “Almost uniform distribution for computer image enhance-ment,” IEEE Trans. Comput., vol. C-23, no. 2, pp. 207–208, Feb. 1974.

[12] Y. Wang and D. Shi, “Joint exact histogram specification and imageenhancement through the wavelet transform,” IEEE Trans. ImageProcess., vol. 16, no. 9, pp. 2245–2250, Sep. 2007.

[13] B. B. Mandelbrot, The Fractal Geometry of Nature. San Francisco,CA: Freeman, 1982.

[14] E. Simoncelli, “Statistical models for images: Compression, restora-tion and synthesis,” in Conf. Rec. 31st Asilomar Conf. Signals, Syst.Comput., Pacific Grove, CA, Feb. 1997, pp. 673–678.

[15] N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, andE. Teller, “Equation of state calculations by fast computing machines,”J. Chem. Phys., vol. 21, no. 6, pp. 1087–1092, Jun. 1953.

[16] P.-M. Jodoin and M. Mignotte, “Markovian segmentation and param-eter estimation on graphics hardware,” J. Electron. Imag., vol. 15, no.3, pp. 033 015–1–033 015–15, Sep. 2006.

PSF Estimation via Gradient Domain Correlation

Wei Hu, Jianru Xue, Member, IEEE, andNanning Zheng, Fellow, IEEE

Abstract—This paper proposes an efficient method to estimate the pointspread function (PSF) of a blurred image using image gradients spatialcorrelation. A patch-based image degradation model is proposed for esti-mating the sample covariance matrix of the gradient domain natural image.Based on the fact that the gradients of clean natural images are approxi-mately uncorrelated to each other, we estimated the autocorrelation func-tion of the PSF from the covariance matrix of gradient domain blurredimage using the proposed patch-based image degradation model. The PSFis computed using a phase retrieval technique to remove the ambiguity in-troduced by the absence of the phase. Experimental results show that theproposed method significantly reduces the computational burden in PSFestimation, compared with existing methods, while giving comparable blur-ring kernel.

Index Terms—Deblur, phase retrieval (PR), point spread function (PSF)estimation.

I. INTRODUCTION

The problem of blur kernel estimation, and more generally blind de-convolution, is a long-standing problem in computer vision and imageprocessing. Recovering the point spread function (PSF) from a singleblurred image is an inherently ill-posed problem due to the loss of in-formation during blurring. The observed blurred image provides onlya partial constraint on the solution as there are many combinations ofPSFs and “sharp” images that can be convolved to match the observedblurred image. There are numerous papers on this subject in the signaland image processing literature. We refer the reader to a survey paper[1] for the earlier works. Recently, state-of-the-art PSF estimation al-gorithms have been proposed based on natural image statistics [2], [3]using a variational Bayesian method [2] or an advance optimizationtechnique [4]. In [5], Levin et al. provide a good summary for thesemethods. In this paper, we propose a new simple and efficient methodto extract a blur kernel using a gradient domain correlation technique.It has been proven in various fields of image processing that the gradi-ents of the natural images are approximately independent to each other[2]. Many existing techniques for blind deconvolution take advantageof this property to simplify the inference [2], [4]. In particular, whenthe problem is formulated into the Bayesian framework, this assump-tion usually substantially simplifies the prior term [2]. These sophis-ticated algorithms [2], [4] give good deblurred results. However, theyare usually very slow since most of them involve a complex alternatingoptimization process, which is very time consuming. In this paper, wehave observed that the correlation property of the image gradients is

Manuscript received May 10, 2010; revised January 30, 2011 and May 17,2011; accepted May 27, 2011. Date of publication June 20, 2011; date of currentversion December 16, 2011. This work was supported in part by the NSFC underProject 60875008 and Project 60805044 and in part by the 973 Program underProject 2010CB327902. The associate editor coordinating the review of thismanuscript and approving it for publication was Dr. Farhan A. Baqai.

The authors are with the Institute of Artificial Intelligence and Robotics,Xi’an Jiaotong University, Xi’an 710049, China (e-mail: [email protected];[email protected]; [email protected]).

Color versions of one or more of the figures in this paper are available onlineat http://ieeexplore.ieee.org.

Digital Object Identifier 10.1109/TIP.2011.2160073

1057-7149/$26.00 © 2011 IEEE

http://ieeexploreprojects.blogspot.com