380 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012intrinsic stationary property of real-world images, containing smooth edge-histogram speciﬁcation histogram method is thus a two-stepareas interspersed with occasional sharp transitions, i.e., edges. The procedure which proceeds as follows (i.e., algorithm B2).smooth regions produce small-amplitude gradient magnitude values, 1) Ordering relation;and the transitions produce sparse large-amplitude gradient magnitude a) Normalize H in order that W = k=0 01 hk k =Zvalues . Due to this intrinsic stationary property of any real-world b) Order the W = 81 N 1 M pairwise pixel absolute differences:images, the edge histogram will be associated with a decreasing func- jI s 0 I t j j I u 0 I v j . . . j I x 0 I y jtion with a unique mode (the value that occurs the most frequently) at c) Split this pixel-absolute-difference ordering relation from(amplitude gradient magnitude) zero, corresponding to the numerous left to right in Z groups, such as group j has hj elements, i.e., hj couples of pixels. d) For all pairs of pixels or pair of sites (s; t) whose the absolutesmooth regions existing in any real-world images. Except for this prop- difference is in group j , assign
 s;t = j .erty, different informative distributions (for different parameter positivevalues of p and c) can be found or speciﬁed for a given input image. 2) Optimize (1) (see Section III). In this paper, an approach for the edge-histogram speciﬁcation of a This model can be easily generalized in order to ensure an edge spec- iﬁcation histogram, e.g., in the n = 2-order sense (i.e., with gradientreal image is proposed. This approach combines the ordering relationdescribed above but applied to the set of the gradient magnitude values magnitude using the second-order derivative). To this end, the sum-of an input image (and related to each pair of pixels separated from a mation of (1) should be all the pair of sites (s; t) with t 2 Ns and 2given distance). It allows us to obtain ﬁrst the set of increasing gradient Ns2 designating the 16-pixel neighborhood of s separated by distancemagnitude values of an input image and then to assign to each of them d = 2 pixels (d = maxfjxs 0xt j; jys 0yt jg) and W = 161N 1M pairsa speciﬁed gradient magnitude value given by a target edge distribu- of pixels or
 s;t values. In the same way, this model can be easilytion (or a normalized edge histogram possibly estimated from a target generalized in order to ensure simultaneously an edge-histogram spec-image). A hybrid optimization scheme combining a global and de- iﬁcation following nt different distributions for, respectively, the set ofterministic conjugate-gradient-based procedure and a local stochastic nt gradient magnitude values in nt different order senses. To this end,search allow each pair of pixel values to tend (iteratively) toward these let H[n ] be the vector associated to the nt nonnormalized target distri-speciﬁed gradient magnitude levels. The remainder of this paper is or- butions H[l] = fh[l];0 ; h[l];1 ; . . . h[l];Z 01 g with l 2 [0 . . . nt [ (possiblyganized as follows: Sections II and III describe, respectively, the pro- a priori imposed or estimated from a target image), let Ns represents lposed model and the optimization strategy. Finally, Section IV presents the W[l] neighbors of s separated by distance d = l pixels, the proce-the set of experimental results and the applications of this edge-his- dure will commence as follows (i.e., algorithm C):togram speciﬁcation method. 1) Speciﬁcation with ordering relation; a) For l = 1 to nt ; I) W[l] = 8 1 l 1 N 1 M II. PROPOSED MODEL II) Normalize H[l] such that, W[l] = k=0 01 h[l];kk =Z http://ieeexploreprojects.blogspot.comW[l] pairwise pixel absolute differences: Let us ﬁrst consider the case of an edge-histogram speciﬁcation pro- III) Order thecedure in the ﬁrst-order sense, i.e., using the absolute value of the gra- jI s 0 I t j j I u 0 I v j . . . j I x 0 I y jdient magnitude with the ﬁrst-order derivative. To this end, let I bean input discrete image with N 2 M pixels Is located at discrete IV) Split this pixel-absolute-difference ordering relationlocations s = (xs ; ys ). Our edge-histogram speciﬁcation procedure from left to right in Z groups, such as group j has ^aims at ﬁnding the new luminance mapping I in which each jIs 0 It j^ ^ h[l];j elements, i.e., h[l];j couples of pixels.in this input image with a pair of sites (s; t) separated by a distance V) For all pairs of pixels or sites (s; t) whose absoluted = maxfjxs 0 xt j; jys 0 yt jg = 1 pixel (i.e., with site t located difference is in a group j , assign
[l] s;t = j .in the ﬁrst nearest eight neighbors of s) is considered as an indepen- 1 2 2) Optimize (1) for t 2 Ns [ Ns [ . . . [ Ns (see Section III). ldent random variable whose distribution follows a target distribution or Finally, this model can be easily generalized in order to ensure si-the normalized histogram H with a desired shape (possibly estimated multaneously nt edge-histogram speciﬁcations (following nt different ^from a target image). If this mapping I is estimated in the minimal given distributions) and an exact histogram speciﬁcation of the lumi- ^mean square sense, then I is the solution image that should minimize nance (or intensity) level. The method (i.e., algorithm D) simply con-the following objective function E (I ): sists of alternating algorithms C and A until a stability criterion is reached (i.e., the output image does not change too much between two NM iterations). We would like to add that extending our approach to color ^ 2 I = arg min 2
 s;t 0 (Is 0 It )2 (1) images is straightforward as follows. I s=1 t2N 1) In the case where the input image is speciﬁed directly from a target distribution law, it consists ﬁrst of representing the input image E (I ) (originally expressed in the RGB color space) in a color space where one coordinate is the intensity or luminance value, such as 1where Ns represents the eight nearest neighbors of s and, conse- the perceptual LAB color space, and processing only on the lumi-quently, the summation is over all the pair of sites (i.e., for all sites ^ nance value. After treatment, let L be the output (edge speciﬁed)s and for all the pair of sites including s with t belonging to the 2Algorithm B corresponds to the cases where the input and target imageseight nearest neighbors of s). In this case,
 s;t are the values have integer luminance values ranging from [0 : 255], and we also considergiven by an edge-histogram speciﬁcation method (of the ﬁrst-order Z = 256 bins for the luminance histogram and for the target histogram ofmagnitude gradient) with the nonnormalized target distribution the absolute value of the ﬁrst-order difference (ﬁrst-order gradient magnitude).H = fh0 ; h1 ; . . . hZ 01 g (possibly a priori imposed or estimated from Consequently, if the target image has the same size of the input image, h isa target image) with Z as its number of bins. Practically speaking, let necessarily a natural number (ranging from [0 : 8NM ]). Nevertheless, if theW = 8 1 N 1 M be the number of absolute values of the ﬁrst-order target image does not have the same size of the input image, each value h ofdifference jIs 0 It j in the original image, and let be a strict ordering distribution H , i.e., after the ﬁrst step of Algorithm B (i.e., the step ensuring that this histogram integrates to 8 2 N 2 M ), must be rounded to the nearestrelation, which is deﬁned among jIs 0 It j (as jIs 0 It j jIu 0 Iv j if integer, and this then ensures that h remains a natural number. Let us also notethe ﬁrst-order difference jIs 0 It j is lower or equal than the ﬁrst-order that, after rounding up to the nearest integer, the new h do not add up W , butdifference jIu 0 Iv j with respect to the lexicographic order). Our this is not a problem in practice.
IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012 381 luminance map; then, it continues by converting back the LAB ^ proportional to this distance). In order to avoid being trapped in a local into the classical RGB color space. minimum and to be closer to the global minimum, a strategy (that was 2) In the case where the input image is speciﬁed from a target image empirically tested and relatively efﬁcient) consists of alternating the for which we want to keep its color palette, there are two different speciﬁcation procedure (ordering relation), and this hybrid optimiza- ways. tion method until a given criterion is reached such as when the value of a) The histogram of the components L, A, and B of the input the energy cost function E and/or the similarity between the target and image is speciﬁed (algorithm A) from the components L, A, output edge histograms (e.g., estimated by a Bhattacharya distance) is and B , of the target image. not too high. Let us note that a global minimum is not ensured by this b) As proposed in , one has to deﬁne a strict ordering relation strategy. For certain images, the image structure and its properties do among color image pixels, and a possible solution is to use not allow a perfect match between the input and the desired distribution (i.e., thus inducing an error E 6= 0) to be arrived at every time. Con- the luminance or the gray value for that. In this case, the color-histogram speciﬁcation procedure proceeds as follows: i) Order color pixels of the input image (I ) from their sequently, our strategy that consists of alternating the ordering relation luminance or gray value as follows: and the proposed hybrid optimization method has to be stopped when a maximal number of iterations is reached. I (x1 ; y1 ) I (x2 ; y2 ) . . . I (x ; y ): ii) Order color pixels of the target image (T ) from their IV. EXPERIMENTAL RESULTS luminance or gray value as follows: A. Setup T (u1 ; v1 ) T (u2 ; v2 ) . . . T (u ; v ): In all the experiments, the input image is assumed to be toroidal (i.e., wrapping around at the borders; this property only simpliﬁes the im- Note that if the size of the target image is different from the size of the input image, an up-sampling or a subsam- plementation, but we can also replicate the border pixels or use a dif- pling procedure should be used. ferent strategy) with colors or luminance values or magnitude gradient iii) Assign to I (xs ; ys ) the color value T (us ; vs ) for all ranging from [0.0:1.0]. We have used 256 bins for the histogram of the s NM . luminance values and for the histogram of the magnitude gradient. Since two luminance values can be identical for different color For the conjugate gradient, the step is set to = 0:5. The maximalvalues, the ﬁrst strategy thus seems to be more appropriate if we number of iterations is set to L D = 20. For the local explorationwant to preserve the different hues of an image to be speciﬁed in the search, using the Metropolis criteria, the initial temperature and thecolor-histogram sense. Nevertheless, the second strategy seems also ﬁnal temperature are set to T0 = 3 1 1005 and Tf = 5 1 10010 , respec-well suited if the target image has a dominant hue as is the case in a tively. The radius of exploration is r = 0:04, and the maximal number http://ieeexploreprojects.blogspot.com = 100.3 Finally, in order to obtain a ﬁnaltexture transfer procedure such as that presented in Section IV-C. of iterations is set to LS edge-speciﬁed image, which will be close enough to a reliable solution, III. OPTIMIZATION STRATEGY we have respectively set E = 0:1, DB = 0:1, and LH = 6. The objective function to be minimized E may be more or less com-plex according to both the shape of the target edge distribution and the B. Edge-Histogram Speciﬁcationedge structure of the input image (i.e., the edge distribution shape of Our initial experiment with algorithm B was with a target distribu-the input image). This cost function may be sometimes nearly convex tion (for the edge histogram using the ﬁrst-order derivative) with a de-if the two edge histograms are close or very complex with several local sired shape. For this experiment, it is worth recalling that the set ofextrema, if the shape of the two edge histograms are different, or if one possible shapes for the edge histogram of an image (see Section I) areof these two edge histograms exhibits some discontinuities or an un- the set of decreasing functions with a mode at (amplitude gradient mag-usual shape (i.e., a shape far away from the classical density function nitude) zero (due to the numerous smooth regions that necessarily existof the form H (z ) / exp(0jz=cjp ) put forward in ). In order to in any real-world images and that induce, statistically and more gen-ensure a good minimization and, thus, an accurate edge speciﬁcation erally, an original edge histogram with a density function of the formprocess in all cases, we have proposed the following hybrid and adap- H (z ) / exp(0jz=cjp ) ). We have thus considered the followingtive optimization strategy: three unimodal (at 0) decreasing (envelope) distributions (H denoting 1) Since an analytical expression of the derivative of this function the Heaviside step function). E to be optimized is easily available, we ﬁrst use a conjugate- 1) First, the semi-Gaussian function is given as gradient procedure initialized with the input original image. For 1 the conjugate gradient, the step size is ﬁxed to and adaptively H (z ) = exp(020z )2 H(z ): decreased by a factor of 2 if the energy to be minimized increases Zh between two iterations. We stop the optimization procedure if a 2) Second, the semitriangle function is given as ﬁxed number of iterations LD or the convergence is reached. 1 2) In order to reﬁne the estimation given by the aforementioned de- terministic optimization method, we use the previous optimiza- H (z ) = Zh (1 0 3z ) H(1 0 3z ) H(z ): tion result as the initialization of a stochastic local search. To this 3) Third, the (nonunimodal at zero) shifted Gaussian function is end, we use a local exploration around the current solution using given as the Metropolis criteria  and a small radius of exploration (see algorithm 1). H (z ) = N (256 3 z ; mean = 0:1; var = 0:0001): After this hybrid optimization procedure, it is possible that a localminimum of the energy function E is reached (in this case, at conver- 3Due to the small radius of exploration, the computational complexity of this optimization step (in fact, a simple local search around the gradient estimation)gence, E 0, and practically speaking, the histogram to be speciﬁed is considerably reduced, and this explains why a low number of iterations isis yet far from being the target histogram, and with the value of E being herein performed.
382 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012Fig. 1. Algorithm B. Edge-histogram speciﬁcation procedure with a target distribution model. (from left to right) Original input image and four edge-histogramspeciﬁcation results. (bottom right) Four output edge histograms (with the target and original histogram superimposed on the output edge histogram). The Bhat-tacharya distanceD is respectively for these four experiments 0.312, 0.257, 0.783, and 0.264 before the edge speciﬁcation process and 0.091, 0.061, 0.544 and0.190 after the edge speciﬁcation process. of our algorithm are then achieved qualitatively by visually comparing the output and the desired edge histogram shapes and quantitatively by estimating the Bhattacharya distance (ranging from 0 to 1) as follows: http://ieeexploreprojects.blogspot.com Z 01 1= 2 DB [H z ; H (z)] = ( ) 1 0 H z H (z ) ( ) (2) z =0 between the two (normalized) edge histograms before and after the speciﬁcation process. Fig. 1 (and Fig. 3) shows the obtained results. We can notice that our edge-histogram speciﬁcation procedure is not exact since the output histogram shape is not a perfect match with the target histogram shape. This may derive from the fact that the edge image structure could not be geometrically more distorted in order to better match the desired target edge histogram (or equivalently, the gradient descent procedure has reached the global minimum of the energy func- E E tions and 6= 0 in this case). Another possibility is that the gradient procedure 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 the Bhattacharya distance decreases) after our edge speciﬁcation process, except for the nonunimodal at zero shifted Gaussian distribution for which the output histogram remains far away from the target distribu- D tion and the Bhattacharya distance remains high ( B = 0 544). We : can notice that the resulting output images are, in these three cases, visually different with different edge statistic properties (and this will also be conﬁrmed in the following experiments). Our edge speciﬁcation process may also be efﬁciently used for 4) Fourth, a decreasing exponential function is given as detail enhancement of an input image or even as an original detail exaggeration procedure that goes much further than the results usually obtained with classical high-boost ﬁlters for which artifacts due to H z ( )= 1 Zh 0 z H (z ) exp( 8 ) the noise ampliﬁcation of the high-pass ﬁlter (in the case of high value of the boosting parameter) quickly appear and may degrade the Zwith h , i.e., a normalizing factor ensuring that these functions inte- image quality. In our case, this detail exaggeration procedure simplygrate to one (these aforementioned target distributions are graphically consists of the use of algorithm B in order to realize an edge-histogramshown at the bottom right in Fig. 1). The validation and the efﬁciency equalization technique (i.e., by considering the target distribution
IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012 383Fig. 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, 20:85 D 2 and 0:78 D as the stopping criterion of algorithm B with H being the uniform distribution), i.e., cathedral image D = 0:57 http://ieeexploreprojects.blogspot.com D = 0:41.(original image), D = 0:48, and D = 0:44. Statue image D = 0:54 (original image), D = 0:44, andH simply equal to the uniform distribution). Our iterative mini-mization-based edge-histogram speciﬁcation procedure then will aimat ﬂattening, 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 speciﬁcation may also be used in Fig. 3. Algorithm B. Edge-histogram speciﬁcation procedure with a target dis- tribution model. (from left to right) Magniﬁed regions in Figs. 1 and 2.order to render an input image with different detail levels or, more gen-erally, into a speciﬁed number of separate levels of detail depths. Thisrendering is possible if one speciﬁes the output edge histogram with a as a motion or focal blur) between two images of (possibly) the samemultimodal (edge) distribution. This allows us to render an image with scene. This correction can be useful in order to normalize an imagedifferent classes of edge magnitude values or to enhance a speciﬁed set (e.g., for mosaicing generation, fusion, registration, lighting correc-class of detail. Fig. 4 shows the obtained image results for one, two, tion, indexing, retrieval systems, or other applications). Fig. 5 showsand three different classes of detail accuracy levels, respectively (thus different views and icons of the cathedral church of Notre Dame deby specifying the output edge histogram to be respectively unimodal, Fourviere (Lyon, France) taken by different cameras at different timesbimodal, and trimodal). (thus with different resolution levels and color palettes). One of these images is the cathedral image already used in the preceding experi-C. Speciﬁcation of Multiple-Edge Histograms ments and considered in this test as the target high-resolution color Our edge-histogram speciﬁcation model can also be used to some- image on which we desire to normalize the other images in the color-what eliminate an effect of unequal resolution (i.e., loss of accuracy, and resolution-degree senses. The results of our edge-and-color-his-contrast, or details) possibly created by a blurring degradation (such n togram speciﬁcation method (algorithm D with t = 2, i.e., in the two
384 IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012 any speciﬁcation method), the image after our edge-and-color-his- togram speciﬁcation method and after a classical color-histogram speciﬁcation, respectively. For our algorithm, the similarity of the edge-histogram shapes of the resulting and target image thus notice- ably increases, demonstrating that our algorithm allows to transfer not only the color information but also the edge geometric properties of the target image (more precisely, the nt shapes of its edge distributions). Another consequence of our algorithm is that it does not distribute the different colors of the target image in the same way of our edge-and color-histogram speciﬁcation method since our algorithm D seems to ﬁnd a compromise between the similarity between the distribution of color levels and also the distribution of gradient magnitude values of the target image. These remarks can also be conﬁrmed in the case of a texture transfer technique only using a single color-histogram speciﬁcation strategy (second algorithm of Section II), which do not allow to copy the edge textural property of a given drawing style. This is particularly visible in the case of the pointillist-style transfer technique for which its edge distributions are speciﬁc and far away from 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 decreasing schedule 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 minimization procedure is relatively insensitive to the three parameters LD , LS , and LH , which are related to the different number of iterations of the minimization procedures since the ﬁnal stopping criterion (E and DB ) will ultimately check http://ieeexploreprojects.blogspot.com if the ﬁnal solution is close enough to a reliable solution. Third, E = 0:1 and DB = 0:1 (except for algorithm B, which is used as a detail enhancement or exaggeration procedure, for whichFig. 4. Algorithm B. Image rendering procedure with different classes of detail DB has to be set by the user) must not be considered as two internalaccuracy levels. (from top to bottom and left to right) Images and edge-his- parameters of our algorithm but rather as a criterion (e.g., required bytogram speciﬁcation results (with the target histogram superimposed on the the schedule of conditions) for the expected estimation accuracy of theoutput edge histogram) for one, two, and three different classes of detail ac- ﬁnal result.curacy levels, respectively (by specifying the output edge histogram to be re-spectively unimodal, bimodal, and trimodal). The original images are shown at Fourth, Tf is easily ﬁndable in our case since a good ﬁnal tempera-Figs. 1 and 2. ture for a simulated annealing-like minimization procedure has to en- sure that, at the end of the stochastic search, very few sites change their luminance values between two complete image sweeps. In our algo-ﬁrst-order senses and exploiting the ﬁrst algorithm, which is presented rithm, this parameter has been easily found after a few trials. We haveat the end of Section II, to ensure a speciﬁcation of the color histogram) found that Tf = 5 1 10010 was appropriate for all the experiments pre-on the three original images are shown in Fig. 5. sented in this paper. The proposed edge speciﬁcation method can also be used to trans- Finally, two internal parameters are sensitive and crucial for our al-form one input image into another with different edge geometric and gorithm, i.e., the radius of exploration r and, in a least measure, thetextural properties. To this end, we have applied the algorithm D on a starting temperature T0 of the local stochastic search. The ﬁrst one wasportrait image exploiting the three ﬁrst edge distributions (i.e., nt = 3 set in order to locally explore a solution whose luminance values arein algorithm D along with the second speciﬁcation method for the close to the initial solution given by the gradient minimization proce-color histogram) estimated from a target image representing a certain dure (value r = 0:04 ensures that the ﬁnal solution will exhibit outputdrawing style. The resulting images are shown in Fig. 6. luminance values, which are centered around the gradient estimation, We have compared our nt -edge-and-color-histogram speciﬁcation with 60:04 3 255 = 610 luminance values for a ﬁnal luminancemethod (Algorithm D) with a classical method that exploits only color image whose luminance values are comprised in [0 : 255]). T0 is setinformation. Fig. 7 shows a magniﬁed region of the cathedral image in order to ensure that, at the beginning of the stochastic search, ap-[see Fig. 5(a)] that a single color-histogram speciﬁcation strategy (ﬁrst proximately 50% of sites change their luminance values between twoalgorithm of Section II, i.e., the same as that used in our algorithm complete image sweeps.D) does not allow to get an output image with the same statisticaledge geometric properties and level of detail of the target image E. Algorithm(which is more detailed that the original image). This “detail-level The computational times of our procedure vary greatly dependingspeciﬁcation” can also be quantiﬁed with the Bhattacharya distance on the shape of the input and target edge histograms (i.e., between 10DB (between the edge histograms of the output and the target image), and 300 s) for an AMD Athlon 64 Processor 3500+ 2.2-GHz 2010.17which is 0.310, 0.058, and 0.534 for the original image (i.e., before bogomips and for a nonoptimized code running on Linux. In addition,
IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 21, NO. 1, JANUARY 2012 385Fig. 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 n =2 ). http://ieeexploreprojects.blogspot.com Fig. 7. (Top to bottom) Magniﬁed region of the image shown at Fig. 5(a) for a single color-histogram speciﬁcation strategy and our edge-and-color-histogram speciﬁcation method. The texture transfer technique using the input imageFig. 6. Algorithm D. Transfer procedure of the edge textural properties be- shown at top of Fig. 6 and a drawing style, and exploiting only a singlelonging to an image to another. (from top to bottom and left to right) Original color-histogram speciﬁcation strategy (to be compared with the results shownimage and a set of pairs of images including drawing styles (i.e., the ink painting, in the last row in Fig. 6).sanguine, pointillist, and painting styles, respectively) and the obtained transfer V. CONCLUSIONresult with algorithm D (with n =3 ). In this paper, we have presented an original edge-histogram speciﬁ- cation model. Our approach is based both on a strict ordering relation between each pair of pixels (existing in the input image and separatedit must be noted than our energy minimization can be efﬁciently im- by a given distance) followed by a hybrid optimization process (i.e.,plemented by using the parallel abilities of a graphic processor unit a deterministic global gradient followed by a stochastic local search),(GPU) (embedded on most graphics hardware currently available on particularly well suited to our energy-based edge-histogram speciﬁca-the market) and can be greatly accelerated (up to a factor of 200) with tion model. Concretely, this energy-based model iteratively and geo-a standard NVIDIA GPU (2004), as indicated in . The source code metrically distorts the edge structure of the input image during the min-(in C++ language) and the pseudocode of our algorithm with the set imization process in order to transform its edge histogram, as muchof original and presented images (and some additional images) are as possible, to another desired edge histogram. Several applications ofpublicly available at the following web address www.iro.umontreal.ca/ this model, such as a detail exaggeration procedure, an edge high-boost~mignotte/ResearchMaterial/obehs in order to make possible eventual or enhancement ﬁlter, and a texture transfer technique, have been pre-comparisons with future algorithms and visual comparisons. sented and discussed.