Adriana Nacif

Perú, Maurício, Pinheiro Pedro Ruiter

Julio Sanguini

Carlos Magno

Gil Hess

Julio Nievola

Alex Freitas

Newton José

Nivio Ziviani

etc. Berthier Ribeiro

Sheila Gilmara

Mohamed Akil

Michel Couprie

François Rocaires

Hugues Talbot

Laurent Perroton

Denis

Martine Elichabe

Elysabeth Bastien

Dominique Rèze

Sylvie Cach

Hélène Seynave Thanks

José Eduardo Leandro

Stella, Cida, for helping me with every kind of burocratic work and let me always focus on research. It's an amazing organization structure within a public institution in Brazil.

From the time in France: In special to Jean Cousty, my laboratory colleague, for his attention, patience, time, cultural exchanges, and a lot of other stuffs. Thank you very much. He showed me that French people are very "cool". To André Saúde, for his attention on the very first moments in France (in fact three months). Thanks for help

Acknowledgment

My path leading me up to this stage has been very difficult, and I would not be here without the attention of several kinds of persons. I will be exhaustive in order to thank all of those who helped me not only in the technical and philosophical content of the doctorate, but also those who helped me to hold my focus! First, I'd like to thank God for keeping me walking with my faith. To professor Arnaldo de Albuquerque Araújo, my Brazilian advisor, for the opportunity to go to France for the doctorate in "co-tutela". To professor Laurent Najman, my French advisor, for teaching me excellence in research. I'll try to catch up with it in the next years. I also would like to thank Laurent for his attention in the worst moments, specially those when I did not believe in myself. To professor Jacques Facon for his technical and political collaboration and trust in my skills. To professor Díbio Leandro Borges, who was the forerunner for the doctorate at DCC/UFMG/Brazil.

To the jury: professors Ricardo Torres, Mario Campos, and Alexei Machado, for their contributions in the formalization of some theoretical concepts of the thesis and in the quality of the document. I am very honored to have had them in my jury.

To CNPq/MCT and CAPES/COFECUB/MEC, for providing financial support during my stay in Brazil and France, respectively. In special I would like to thank professor Hugues Talbot, for providing me financial support for six extra months in France, and also for his friendship.

To my family: father, mother, brother, sister, nephews, uncles, and cousins. Brotherand sister-in-law as well. Thank you for your support! Finally, it is finished! Not a Physician, but a Doctor! I hope my father can read these words from wherever he is. I have tried to do my job.

To Gisele for helping me writing and organizing the ideas of this thesis. Thanks so much for her time and attention.

To my very old friends from buteco, from Andirá: Adalberto, Alessandro (Tenório), Andrez, Bruno, Ederson, Ediélson, Edilson, Fábio, Flávio, Jean, Johannes, Juninho (the buteco owner), Lucas, Lucão, Luciano, Matheus, Matheuzinho, Ricardo, Rogério (Geléia), Thiago, Thierry -the list here could be huge, they always push me ahead with their pride Résumé Aujourd'hui, des appareils capables de capter et de traiter les images peuvent être trouvés dans les systèmes complexes de surveillance ou de simples téléphones mobiles. Dans certaines applications, le temps nécessaire au traitement des images n'est pas aussi important que la qualité du traitement (par exemple, l'imagerie médicale). Par contre, dans d'autres cas, la qualité peut être sacrifiée au profit du facteur temps. Cette thèse se concentre sur ce dernier cas, et propose deux types de méthodes rapides pour l'amélioration du contraste d'image. Les méthodes proposées sont fondées sur l'égalisation d'histogramme (EH), et certaines s'adressent à des images en niveaux de gris, tandis que d'autres s'adressent à des images en couleur.

En ce qui concerne les méthodes EH pour des images en niveaux de gris, les méthodes actuelles tendent à changer la luminosité moyenne de l'image de départ pour le niveau moyen de l´interval de niveaux de gris. Ce n'est pas souhaitable dans le cas de l'amélioration du contraste d'image pour les produits de l'électronique grand-public, où la préservation de la luminosité de l'image de départ est nécessaire pour éviter la production de distortions dans l'image de sortie. Pour éviter cet inconvénient, des méthodes de Biégalisation d'histogrammes pour préserver la luminosité et l'amélioration du contraste ont été proposées. Bien que ces méthodes préservent la luminosité de l'image de départ tout en améliorant fortement le contraste, elles peuvent produire des images qui ne donnent pas une impression visuelle aussi naturelle que les images de départ. Afin de corriger ce problème, nous proposons une technique appelée multi-EH, qui consiste à décomposer l'image en plusieurs sous-images, et à appliquer le procédé classique de EH à chacune d'entre elles. Bien que produisant une amélioration du contraste moins marquée, cette méthode produit une image de sortie d'une apparence plus naturelle. Nous proposons deux fonctions de décalage par découpage d'histogramme, permettant ainisi de concevoir deux nouvelle méthodes de multi-EH. Une fonction de coût est également utilisé pour déterminer automatiquement en combien de sous-images l'histogramme de l'image d'entrée sera décomposée. Les expériences montrent que nos méthodes sont meilleures pour la préservation de la luminosité et produisent des images plus naturelles que d´autres méthodes de EH.

Pour améliorer le contraste dans les images en couleur, nous introduisons une méthode générique et rapide, qui préserve la teinte. L'égalisation d'histogramme est fondée sur l'espace couleur RGB, et nous proposons deux instantiations de la méthode générique. La première instantiation utilise des histogrammes 1D R-red, G-green, et B -bleu afin d'estimer l'histogramme 3D RGB qui doit être égalisé, alors que le deuxième instantiation utilise des histogrammes 2D RG, RB, et GB. L'égalisation d'histogramme est effectué en utilisant des transformations de décalage qui preservent la teinte, en évitant l'apparition de couleurs irréalistes. Nos méthodes ont des complexités de temps et d'espace linéaire, par rapport à la taille de l'image, et n'ont pas besoin de faire la conversion d'un espace couleur à l'autre afin de réaliser l'amélioration du contraste de l'image. Des évaluations objectives comparant nos méthodes et d'autres ont été effectuées au moyen d'une mesure de contraste et de couleur afin de mesurer la qualité de l'image, où la qualité est établie comme une fonction pondérée d'un indice de "naturalité" et d'un indice de couleur. Nous analysons 300 images extraites d'une base de données de l'Université de Berkeley. Les expériences ont montré que la valeur de contraste de l'image produite par nos méthodes est en moyenne de 50% supérieure à la valeur de contraste de l'image original, tout en conservant une qualité des images produites proche de celle des images originales.

Abstract

Nowadays devices are able to capture and process images from complex surveillance monitoring systems or from simple mobile phones. In certain applications, the time necessary to process the image is not as important as the quality of the processed images (e.g., medical imaging), but in other cases the quality can be sacrificed in favour of time. This thesis focuses on the latter case, and proposes two methodologies for fast image contrast enhancement methods. The proposed methods are based on histogram equalization (HE), and some for handling gray-level images and others for handling color images.

As far as HE methods for gray-level images are concerned, current methods tend to change the mean brightness of the image to the middle level of the gray-level range. This is not desirable in the case of image contrast enhancement for consumer electronics products, where preserving the input brightness of the image is required to avoid the generation of non-existing artifacts in the output image. To overcome this drawback, Bi-histogram equalization methods for both preserving the brightness and contrast enhancement have been proposed. Although these methods preserve the input brightness on the output image with a significant contrast enhancement, they may produce images which do not look as natural as the ones which have been input. In order to overcome this drawback, we propose a technique called Multi-HE, which consists of decomposing the input image into several sub-images, and then applying the classical HE process to each one of them. This methodology performs a less intensive image contrast enhancement, in a way that the output image presented looks more natural. We propose two discrepancy functions for image decomposition which lead to two new Multi-HE methods. A cost function is also used for automatically deciding in how many sub-images the input image will be decomposed on. Experimental results show that our methods are better in preserving the brightness and producing more natural looking images than the other HE methods.

In order to deal with contrast enhancement in color images, we introduce a generic fast hue-preserving histogram equalization method based on the RGB color space, and two instances of the proposed generic method. The first instance uses R-red, G-green, and Bblue 1D histograms to estimate a RGB 3D histogram to be equalized, whereas the second instance uses RG, RB, and GB 2D histograms. Histogram equalization is performed using

Resumo

Dispositivos para aquisição e processamento de imagens podem ser encontrados em sistemas complexos de monitoração de segurança ou simples aparelhos celulares. Em certas aplicações, o tempo necessário para processar uma imagem não é tão importante quanto a qualidade das imagens processadas (por exemplo, em imagens médicas), mas em alguns casos a qualidade da imagem pode ser sacrificada em favor do tempo. Essa tese se foca nesse último caso, e propõe duas metodologias eficientes para o realce de contraste de imagens. Os métodos propostos são baseados em equalização de histograma (EH), e focam em imagens em tons de cinza e em imagens coloridas.

Os métodos baseados em EH atualmente utilizados para processar imagens em tons de cinza tendem a mudar o brilho médio da imagem para o tom médio do intervalo de tons de cinza. Essa mudança não é desejavél em aplicações que visam melhorar o contraste em produtos eletrônicos utilizados pelo consumidor, onde preservar o brilho da imagem original é necessário para evitar o aparecimento de artefatos não exitentes na imagem de saída. Para corrigir esse problema, métodos de bi-equalização de histogramas para preservação do brilho e contraste de imagens foram propostos. Embora esses métodos preservem o brilho da imagem original na imagem processada com um realce significante do contraste, eles podem produzir imagens que não parecem naturais. Esse novo problema foi resolvido por uma nova técnica chamada de Multi-Equalização de histogramas, que decompõe a imagem original em várias sub-imagens, e aplica o método de EH clássico em cada uma delas. Essa metodologia realiza um realce de contraste menos intenso, de forma que a imagem processada parece mais "natural". Essa tese propõe duas novas funções de discrepância para decomposição de imagens, originando dois novos métodos de Multi-EH. Além disso, uma função de custo é utilizada para determinar em quantas sub-imagens a imagem original será dividida. Através da comparação objetiva e quantitative usando uma medida de constrate, os experimentos mostraram que os métodos propostos são melhores que outros EH estudados, uma vez que eles preservam o brilho e produzem imagens com uma aparência mais natural.

Em relação aos métodos para realce de contraste em imagens coloridas, essa tese propõe um método genérico e eficiente de EH baseado no espaço de cores RGB que preserva o tom (a matiz), e implementa duas instâncias desse método genérico. A primeira instância utiliza os histogramas 1D R-red, G-green e B -blue para estimar um histograma 3D RGB, que é então equalizado. A segunda instância, por sua vez, utiliza os histogramas 2D RG, RB, e GB. A EH é executada utilizando transformadas de deslocamento que preservam a tonalidade da cor, evitando o aparecimento de cores não reais. Os métodos propostos tem complexidade linear no espaço e no tempo em relação ao tamanho da imagem, e não usam nenhuma conversão de um espaço de cores para outro. As imagens produzidas foram avaliadas objetivamente, comparando os métodos propostos com outros estudados. A avaliação objetiva foi feita utilizando medidas de contraste e de qualidade da cor da imagem, onde a qualidade foi definida como uma função ponderada dos índices de naturalidade e cromicidade. Um conjunto de 300 imagens extraídas da base de dados da Universidade de Berkeley foram analisadas. Os experimentos mostraram que o valor do contraste das imagens produzidas pelos métodos propostos é, em médias, 50% maior que o valor do contraste na imagem original, e ao mesmo tempo a qualidade das imagens produzidas é próxima a qualidade da imagem original.

Risumo

Dispositivi per l'acquisizione e lo svolgimento di immagini si possono trovare nei complessi sistemi di monitoramento di sicurezza o nei semplici cellulari. In alcune applicazioni il tempo necessario per svolgere un'immagine non è cosi importante come la qualità delle immagini svolte (es. nelle immagini mediche), ma in alcuni casi la qualità dell'immagine potrà venire daneggiata a favore del tempo.

Questa tesi è basata su quest'ultimo caso e propone due metodi efficienti per evidenziare il contrasto di colore delle immagini. I metodi proposti vengono basate sull'equalizazzione d'istogramma (EI), mirati su delle immagini grigie e sulle immagini colorate.

I metodi basati sull'EI attualmente utilizzati per svolgere delle immagini grigie tendono a cambiare il brillo medio dell'immagine per il tono medio dell'intervallo grigio. Questo cambiamento non è desiderato nelle applicazioni mirate al miglioramento del contrasto sui prodotti elettronici utilizzati dal consumatore, dove preservare il brillo dell'immagine originale è necessario per evitare la comparsa di artefatti inesistenti nell'immagine d'uscita. Sono stati proposti dei metodi di biequalizazzione di istogrammi per corregere questo problema della preservazione del brillo e del contrasto di colore delle immagini. Nonostante questi metodi preservino il brillo dell'immagine originale con significante rilievo del contrasto nell'immagine svolta, questi possono produrre delle immagini che non sembrino naturali. Questo nuovo problema è stato risolto con una nuova tecnica detta Multiequalizazzione di istogrammi, che decompone l'immagine originale in varie sottoimmagini, applicando su ognuna di queste il metodo EI classico. Questa metodologia realizza un contrasto di rilievo meno intenso in modo che l'immagine svolta sembri più "naturale".

Questa tesi propone due nuove funzioni di discrepanza per la decomposizione delle immagini, originandone due nuovi metodi Multi-EI. Inoltre una funzione di costo viene utilizzata per determinare in quante sottoimmagini l'immagine originale verrà divisa. Attraverso paragone obiettivo e quantitativo, usando una misura di contrasto, gli esperimenti hanno convalidato che i metodi proposti sono migliori di quegli EI studiati perché quelli preservano il brillo e producono immagini con un'apparenza più naturale.

Con riferimento ai metodi utilizzati per rilevare il contrasto nelle immagini colorate questa tese propone un metodo generico ed efficiente di EI, in base negli spazi di colori Papers in Conferences

List of Figures

List of Tables

1.

Introduction

Nowadays digital cameras are certainly the most used devices to capture images. They are everywhere, including mobile phones, personal digital assistants (PDAs -a.k.a. pocket computers or palmtop computers), robots, and surveillance and home security systems. There is no doubt that the quality of the images obtained by digital cameras, regardless of the context in which they are used, has improved significantly since early days. Part of these improvements are due to the higher processing capability of the systems they are built-in and memory availability. However, there are still a variety of problems which need to be tackled regarding the quality of the images obtained, including:

1. contrast defects, 2. chromatic aberrations, 3. various sources of noises, 4. vignetting (i.e., a reduction of an image brightness or saturation at the periphery compared to the image center) 5. geometrical distortions, 6. color demosaicing and 7. focus defects.

Among the seven problems related above, some are more dependent on the quality of the capturing devices used (like 2-7), whereas others are related to the conditions in which the image was captured (such as 1). When working on the latter, the time required to correct the problem on contrast is a big issue. This is because the methods developed to correct these problems can be applied to an image on a mobile phone with very low processing capability, or on a powerful computer. Moreover, in real-time applications, the efficiency of such methods is usually favored over the quality of the images obtained. A fast method generating images with medium enhancement on image contrast is worth more than a slow method with outstanding enhancement.

With this in mind, this work proposes two types of methods based on histogram equalization (HE) to enhance contrast in digital images. Although there has been a lot of research in the area of image enhancement for 40 years [START_REF] Graham | Snow removal -a noise-stripping process for picture signals[END_REF][START_REF] Rosenfeld | Digital Picture Processing[END_REF][START_REF] Wang | Digital image enhancement: A survey[END_REF][START_REF] Zhu | Image contrast enhancement by constrained local histogram equalization[END_REF][START_REF] Wang | Modern image quality assessment[END_REF], there is still a lot of room for improvement concerning the quality of the enhanced image obtained and the time necessary to obtain it.

Introduction

HE is a histogram specification process [START_REF] Zhang | Improving the accuracy of direct histogram specification[END_REF][START_REF] Kundu | A solution to histogram-equalization and other related problems by shortest path methods[END_REF][START_REF] Coltuc | Exact histogram specification[END_REF] which consists of generating an output image with a uniform histogram (i.e., uniform distribution). In image processing, the idea of equalizing a histogram is to stretch and/or redistribute the original histogram using the entire range of discrete levels of the image, in a way that an enhancement of image contrast is achieved. Figure 1.1 shows an illustrating example of using HE for image contrast enhancement.

The first type of proposed methods, which deals with gray-level images, works on a multi-HE (MHE) framework for image contrast enhancement. These MHE methods are especially useful for applications where brightness (i.e., the mean gray-level) of the processed images must be preserved, and real-time processing is required (e.g., digital cameras and video surveillance systems).

The second type of methods proposed concentrates on color images, and also focus on the improvement of image contrast. They implement HE methods based on the RGB color space 1 [54] which are hue-preserving [START_REF] Naik | Hue-preserving color image enhancement without gamut problem[END_REF], i.e., and neither new nor unrealistic colors are produced. In other words, these methods prevent the appearance of new and unrealistic colors in the enhanced image, and are linear in time (with respect to the image dimension). Because this second type of method is linear in time, it is indicated to enhance images in real-world applications, such as natural images acquired by mobile phones and PDAs.

One remark is that the first type of methods can be seen as a more elaborated version of the existing methods for preservation of brightness in gray-level image contrast enhancement through HE. The second type of methods, in contrast, is a simplified, fast and hue-preserving color image contrast enhancement methods with respect to the proposed existing ones. The next section describes the main motivations to use the two types of methods just described.

Motivation

Image enhancement methods based on improvements of contrast and avoidance of the appearance of unrealistic colors are really useful in applications where an image with more distinguished texture details and perceptually better colors are required. As explained before, these applications include surveillance system based on images or simply better image visualization in mobile phones and PDAs. Although there are a lot of techniques available to perform these tasks, all of them have advantages and drawbacks.

HE is a technique commonly used for image contrast enhancement, since it is computationally fast and simple to implement. Our main motivation is to preserve the best features the HE methods have, and introduce some modifications which will overcome the drawbacks associated to them.

In the case of gray-level image contrast enhancement, methods based on HE [START_REF] Castleman | Digital Image Processing[END_REF][START_REF] Pizer | Adaptive grey level assingment in ct scan display[END_REF][START_REF] Pizer | Adaptive histogram equalization and its variations[END_REF][START_REF] Zuiderveld | Contrast limited adaptive histogram equalization[END_REF][START_REF] Ibrahim | Brightness preserving dynamic histogram equalization for image contrast enhancement[END_REF] have been the most used. Despite its success for image contrast enhancement, this technique has a well-known drawback: it does not preserve the 1 The color space which is composed of R-red, G-green, and B -blue color channels. brightness of the input image. Figure 1.2 shows an example where the brightness of the processed image by the classical HE is not preserved. This drawback makes the use of classical HE techniques [START_REF] Gonzalez | Digital Image Processing[END_REF] not suitable for image contrast enhancement on consumer electronic products, such as video surveillance, where preserving the input brightness is essential to avoid the generation of non-existing artifacts in the output image.

To overcome such drawback, variations of the classic HE technique, such as [START_REF] Kim | Contrast enhancement using brightness preserving bi-histogram equalization[END_REF][START_REF] Wang | Image enhancement based on equal area dualistic sub-image histogram equalization method[END_REF][START_REF] Chen | Minimum mean brightness error bi-histogram equalization in contrast enhancement[END_REF], have proposed to first decompose the input image into two sub-images, and then perform HE independently in each sub-image. For the decomposition, these methods use some statistical measures of the image, which consider the value of the image gray-levels. Those methods based on Bi-HE perform image contrast enhancement with success while preserving the input brightness in some extend, but they might generate images which do not look as natural as the input ones. produced by the Bi-HE methods present such characteristics. Such result is unacceptable for consumer electronics products. Hence, in order to enhance contrast, preserve brightness and produce natural looking images, we propose a generic MHE method which first decomposes the input image into several sub-images, and then applies the classical HE process to each of them. We present two discrepancy functions to decompose the image, conceiving two variants of the generic MHE method for image contrast enhancement, i.e., Minimum Within-Class Variance MHE (MWCVMHE) and Minimum Middle Level Squared Error MHE (MMLSEMHE). A cost function, taking into account both the discrepancy between the input and enhanced images and the number of decomposed sub-images, is used to automatically decide in to how many sub-images the input image will be subdivided.

Regarding the color image contrast enhancement, the classical image enhancement methods are also based on HE [START_REF] Gonzalez | Digital Image Processing[END_REF]. The extension of these methods to color images is not straightforward. This is because there are some specific properties of color images which need to be properly taken into account during image contrast enhancement. Among these properties are the luminance (L) (or intensity (I )), saturation (S ) and hue (H ) attributes of the color [9]. Color spaces such as HSV, HSI, CIELUV, and CIELAB2 were conceived based on these three attributes [START_REF] Kuehni | Color Ordered: A Survey of Color Systems from Antiquity to the Present[END_REF]. Whereas the luminance represents the achromatic part of the color (e.g., it can be defined as a weighted function of the R, G, and B color channels), the saturation and hue refer to the chromatic part of the image. The saturation can be seen as measure of how much white is present in the color, and the hue is the attribute of the color which defines its "real color", e.g., red or green. For the purpose of enhancing a color image, the hue should not be changed for any pixel, avoiding output images with unnatural aspect.

However, color images acquired by digital devices, such as mobile phones, cameras and PDAs, are commonly transmitted, displayed and stored in the RGB color space. This color space is not the most adequated for image processing tasks, since the meaning of the attribute colors is not explicitly separated as it would be in other color spaces. The conversion from the RGB color space into Luminance-Hue-Saturation (LHS )-based color space is trivial to implement, but due to time constraints can be both unsuitable for realtime applications and the digital devices listed above. Moreover, working on a LHS -based color space requires tackling the well-known gamut problem 3 .

The literature of HE methods for color image contrast enhancement presents works based on the RGB, LHS, CIELUV, and other color spaces. Methods based on both the RGB color space and other color spaces do not present all the requirements for use in portable devices: to be fast, improve image contrast while preserving the hue. The formers because the hue is not preserved (Figure 1.4 illustrates this problem), and the latter methods due 1. Introduction the time required for conversions among color spaces and maybe the same reason pointed for the former methods. In order to achieve that, this work presents a generic fast huepreserving HE method based on the RGB color space for image contrast enhancement.

From the generic method we create two variants, which are characterized by the histograms dimension they use, i.e., 1D or 2D. The equalization is performed by huepreserving transformations directly in the RGB color space, avoiding the gamut problem, keeping the hue unchanged 4 and the requirement of conversion between color spaces. Moreover, our methods improve the image contrast (i.e., improve the variance on the luminance attribute) and, simultaneously, the saturation is modified according to the equalization of the RGB histogram. The methods estimate the RGB 3D histogram to be equalized through R, G, and B 1D histograms and RG, RB, and GB 2D histograms, respectively, yielding algorithms with time and space complexities linear with respect to the image dimension. These characteristics make these methods suitable for real-time applications.

At this point, it is worth noticing that there are several sophisticated color image contrast enhancement methods available in the literature, such as [START_REF] Huang | Natural color image enhancement and evaluation algorithm based on human visual system[END_REF][START_REF] Luft | Image enhancement by unsharp masking the depth buffer[END_REF]. However, these methods are so computationally expensive that their use is neither practical for real-time nor real-world applications. This is in contrast with our methods, which are linear in time and space (regarding the image dimension) and work for real-world applications.

Objectives

Given the motivations presented above, the main objectives of this work are:

1. create MHE methods for gray-level image contrast enhancement with constraints to the processed images: brightness preserving and natural looking;

2. compare the methods developed for gray-level image contrast enhancement with other HE-based methods by means of the Peak Signal-to-Noise Ratio measure (P SN R [START_REF] Rabbani | Digital Image Compression Techniques[END_REF]), brightness preserving and contrast enhancement;

3. build fast hue-preserving HE methods for color image contrast enhancement;

4. compare the methods developed for color image contrast enhancement with existent ones using quantitative measures, such as color naturalness and colorfulness indexes (see [START_REF] Yendrikhovskij | Perceptually optimal color reproduction[END_REF][START_REF] Yendrikhovskij | Optimizing color reproduction of natural images[END_REF][START_REF] Hasler | Measuring colorfulness in real images[END_REF]);

5. develop all the proposed methods so that they have linear time complexity with respect to image dimension, and are suitable for real-time applications.

Contributions

By achieving the proposed objectives in the image contrast enhancement domain, the principal contributions to this dissertation were:

1. MHE methods for gray-level image contrast enhancement with constraints to the processed images such as brightness preserving and natural looking;

2. an analysis of the impact that MHE methods have on gray-level image contrast enhancement, when constraints such as brightness preserving and natural looking are imposed to the processed images;

3. a comparison of the methods conceived for gray-level image contrast enhancement and other HE related methods using objective measures (e.g., P SN R, brightness preserving and contrast enhancement);

4. fast hue-preserving image contrast enhancement methods based on the RGB color space, suitable for real-time applications;

5. a comparison of the methods developed for color image contrast enhancement and other HE based methods using objective measures (e.g., contrast improvement and the color naturalness and colorfulness indexes) by using a database from the University of Berkeley, which is composed of 300 images.

Organization of the Document

The remainder of this dissertation is organized as follows. Chapter 2 presents a bibliography review on methods for image contrast enhancement through histogram specification methods, where histogram equalization is included. Chapter 3 introduces our MHE methods for gray-level image contrast enhancement. Related work is described and definitions for presenting our methods are introduced. Then we describe the proposed methods.

Chapter 4 shows the proposed hue-preserving HE methods to enhance color images based on the RGB color space. Some definitions for presenting our methods are introduced and previous works are presented as well. At the end of the chapter, we introduce our methods.

A set of experiments is reported in Chapter 5, which is divided into two parts. The first part presents results concerning the gray-level image contrast enhancement methods proposed in Chapter 3, whereas the second part reports results concerning the color image contrast enhancement methods presented in Chapter 4.

Finally, Chapter 6 presents final considerations and concluding remarks. Future works and directions are pointed as well.

2.

Histogram Specification for Image Contrast Enhancement: An Overview

In Chapter 1, we have discussed a variety of problems involving the quality of the images obtained by standard capture devices, including problems with contrast, noise, and color. Image enhancement is a vast area of study dedicated to improve the quality of an input image, returning an output image which is more suitable than the original image [START_REF] Hanmandlu | An optimal fuzzy system for color image enhancement[END_REF] for simple visualization purposes or for a specific application.

Image enhancement methods and techniques have been studied for more than 40 years, and during this time a vast number of methods have been developed [START_REF] Wang | Digital image enhancement: A survey[END_REF]. At first, methods were more concentrated in improving the quality of gray-level images [START_REF] Hall | A survey of preprocessing and feature extraction techniques for radiographic images[END_REF][START_REF] Andrews | Image processing by digital computer[END_REF][START_REF] Hall | Almost uniform distributions for computer image enhancement[END_REF]. Later, when the acquisition of color images became more accessible, many of these early methods were adapted to be applied to color images [START_REF] Pratt | Digital Image Processing[END_REF][START_REF] Castleman | Digital Image Processing[END_REF][START_REF] Niblack | An Introduction to Digital Image Processing[END_REF][START_REF] Jain | Fundamentals of Digital Image Processing[END_REF]. At the same time, methods more suitable for color images, which were tailored to take advantage of their properties, were also developed [START_REF] Soha | Multidimensional histogram normalization contrast enhancement[END_REF]10,[START_REF] Strickland | Digital color image enhancement based on the saturation component[END_REF].

In this chapter, we present a categorization of a number of methods and techniques that can be used for contrast enhancement, and then we survey one of the presented subcategories named histogram specification transformation, which is the core of methods proposed in Chapter 3 and 4. The first attempt to categorize image enhancement methods was made by [START_REF] Wang | Digital image enhancement: A survey[END_REF] in the early eighties. [START_REF] Wang | Digital image enhancement: A survey[END_REF] classified the methods for image enhancement on the basis of the properties of their operators, since the image enhancement is achieved by image processing through operators. Since 1983, the methods used for image enhancement became much more sophisticated, but their basic structure remained the same. For this reason, their classification scheme is still useful to have a broad view of the type of methods existent in the literature and their characteristics. The classification was based on: According to the operator sensitivity to the image context, enhancement methods can be classified as (a) context-free and (b) context-sensitive. A context-free method provides a position-invariant operator, in which all the parameters are fixed a priori. A context-sensitive method, in contrast, works with a position-variant operator, in which the parameters change in response to local image characteristics. Context-free operators are computationally simpler to apply. However, for images with variable information content, a context-sensitive operator is more suitable.

Regarding the area of the image covered by the operator, the existing methods can be divided into local and global. Local operators divide the original image into sub-images (or masks), and take one sub-image into consideration at a time. Those operators can be further subdivided into fixed-size and variable-size. For further details see [START_REF] Klette | Handbook of Image Processing Operators[END_REF]. In a global operation, in turn, the whole image is considered at once. Computationally speaking, the application of a local operator requires less storage space than a global operator does.

Based on their goals, the existing methods can be grouped into (a) noise cleaning, (b) feature enhancement, and (c) noise cleanup plus feature enhancement. The noise-cleaning operator aims at removing random noise from the image. In other words, it disregards the image irrelevant information. The feature-enhancement operator attempts to decrease the blurring, and to reveal the image features of interest. These two operators deal with different degradation phenomena. In practice, however, many operators are a combination of both [START_REF] Araújo | Filtragem espacial. In Anais do Congresso Nacional da Sociedade Brasileira de Computação, Jornada de Atualização em Informática (JAI)[END_REF][START_REF] Mascarenhas | Processamento Digital de Imagens. IV EBAI -Escola Brasileiro-Argentina de Informática[END_REF].

According to the techniques involved, the published methods can be organized into four approaches. They are:

1. Frequency domain filtering, which utilizes low or/and high-pass filters in the frequency domain.

2. Spatial smoothing, which employs linear or nonlinear spatial domain low-pass filters;

3. Edge-enhancement, which involves linear or nonlinear spatial-domain high-pass filters;

4. Radiometric scale transformation, which manipulates or re-quantizes the levels of a channel (e.g., the gray-level image) for contrast enhancement;

The remainder of this chapter is organized as follows Section 2.1 describes the radiometric scale transformation, which is directly related to the work proposed in this thesis. Section 2.2 and Section 2.3 present a detailed description of methods developed to enhance gray-level and color images, respectively, and those methods that use a subgroup of radiometric scale transformation: histogram specification transformation.

For the reader interested in works based on the other techniques for image enhancement, we suggest:

• Frequency Domain Filtering: [START_REF] Cooley | An algorithm for machine calculation of complex fourier series[END_REF][START_REF] Singleton | On computing the fast fourier transform[END_REF][START_REF] Singleton | An algol procedure for the fast fourier transform with arbitrary factors[END_REF][START_REF] Kober | Robust and efficient algorithm of image enhancement[END_REF][START_REF] Tang | Image enhancement using a contrast measure in the compressed domain[END_REF][START_REF] Duda | Pattern Classification and Scene Analysis[END_REF][START_REF] Huang | Picture Processing and Digital Filtering[END_REF][START_REF] Oppenheim | Digital Signal Processing[END_REF][START_REF] Meylan | Bio-inspired color image enhancement[END_REF].

• Spatial Smoothing: [START_REF] Prewitt | Object enhancement and extraction[END_REF][START_REF] Graham | Snow removal -a noise-stripping process for picture signals[END_REF][START_REF] Brown | Digital computer analysis and display of the radionuclide scan[END_REF][START_REF] Kuwahara | Processing of riangiocardiographics images[END_REF][START_REF] Tomita | Extraction of multiple regions by smoothing in selected neighborhoods[END_REF][START_REF] Tukey | Exploratory Data Analysis[END_REF][START_REF] Nagao | Edge preserving smoothing[END_REF][START_REF] Araújo | Sum of the absolute grey level differences: an edge-preserving smoothing approach[END_REF]8,[START_REF] Anderson | Image restoration based on a subjective criterion[END_REF][START_REF] Trusell | A fast algorithm for noise smoothing based on a subjective criterion[END_REF].

• Edge-enhancement [START_REF] Prewitt | Object enhancement and extraction[END_REF]7,[START_REF] Rosenfeld | Digital Picture Processing[END_REF][START_REF] Abdou | Quantitative design and evaluation of enhancement/thresholding edge detectors[END_REF][START_REF] Gabor | Information theory in electron microscopy[END_REF][START_REF] Wallis | An approach for the space variant restoration and enhancement of images[END_REF][START_REF] Lee | Digital image enhancement and noise filtering by use of local statistics[END_REF][START_REF] Lee | Redefined filtering of image noise using local statistics[END_REF][START_REF] Schreiber | Wirephoto quality improvement by unsharp masking[END_REF].

Radiometric Scale Transformation

Methods following the radiometric scale transformation approach propose to re-quantize or map each pixel in the image to a new value, capable of improve the contrast of an image. Image contrast enhancement methods which use radiometric scale transformations are very different from those methods categorized as frequency domain filtering, spatial smoothing, and edge-enhancement methods. This is because, in general, gray-level radiometric scale transformation methods take into account one pixel at a time, and consider each pixel independently of its neighbors. For this reason, we say that these methods are point operators.

Due to this property, we can work with the histogram of the image, instead of working with the image itself, because the transformation of any pixels with equal gray-level produce the same output. For this reason, we say that the operations are also global.

The histogram of a gray-level image represents the frequency of occurrence of the levels in the image -for a multi-valued image case, e.g., a color image, we have uni-and multi-dimension histograms. Through histogram analysis, it is possible to extract some interesting global features from the image, such as the mode (i.e., the most frequent level) and the distribution of levels.

Radiometric scale transformation methods are mainly used in two situations: 1) When the gray-levels (or the luminance in the case of color images) of the objects in the images are so close to the ones of the background that it is difficult to discriminate them; 2) When the gray-levels of a large percentage of pixels concentrate in a narrow portion of the histogram, making the image fine details hardly visible. In the former case, contrast enhancement is needed to increase the gray-level differences between the objects and the background. In the latter case, re-quantization or re-scaling is required to increase the dynamic range and to single out hidden fine structures.

The methods presented in this section can work under a variety of frameworks, performing linear and/or non-linear histogram transformations. These histogram transformations include histogram stretching [START_REF] Woods | Real-time digital image enhancement[END_REF], level slicing [START_REF] Woods | Real-time digital image enhancement[END_REF], gamma function corrections [START_REF] Gonzalez | Digital Image Processing[END_REF], histogram equalization [START_REF] Hall | Almost uniform distributions for computer image enhancement[END_REF] and, finally, histogram hyperbolization [START_REF] Frei | Image enhancement by histogram hyperbolization[END_REF].

Regarding histogram stretching is a techinique that attempts to improve the contrast in an image by "stretching" the range of intensity values it contains to span a desired range of values, e.g. the the full range of pixel values that the image type concerned allows [START_REF] Gonzalez | Digital Image Processing[END_REF]. Three basic kinds of stretches can be performed: (1) stretch the dark areas and compress the bright areas; (2) stretch the bright areas and compress the dark areas; (3) stretch the mid-range levels and compress the extreme levels of the histogram of the image.

Concerning Level slicing is a technique where the histogram of an image is "sliced" into intervals. These sliced intervals are combined into a single interval, i.e., the total dynamic range of the output image. This technique is commonly used for visualization purposes, such as in remote sensing applications [START_REF] Lillesand | Sensing and Photo Interpretation[END_REF], where the image naturalness is disregarded.

Gamma functions corrections consist of applying non-linear functions, which usually follow a power-law expression of the type O = I γ [START_REF] Gonzalez | Digital Image Processing[END_REF][START_REF] Serra | Morphological segmentations of colour images[END_REF], to the image histogram. I and O are the input and output images, respectively, and are composed of non-negative real values, typically in a predetermined range, such as 0 to 1. If γ < 1, we have gamma compression. If γ > 1, we have gamma expansion. These gamma functions corrections are very easy to implement, and usually yield satisfactory results. However, trial and error is needed to obtain the best results. In many cases, the user has to provide his own mapping functions.

Histogram equalization takes advantage of the fact that the gray-level histograms of most images (or the luminance histograms of color images), in general, show bright or dark peaks. These peaks represent a large dark or a large bright area in the image, and may contain information regarding fine details of the image. To enhance these areas, a method called histogram equalization (or linearization) was proposed. This method maps the observed gray-level values of the image into new gray-level values (or similarly the observed luminance levels of color image to new levels), in a way that the new image presents a uniform gray-level histogram. This is interesting because, according to the perception performed by the rods and cones (i.e., photochemical transducers) of the human retina, the image perceived by humans has a uniform histogram [START_REF] Wyszecki | Color Science[END_REF].

On the other hand, another study about human vision pointed out that human perception performs a non-linear transformation of the light intensity [START_REF] Frei | Image enhancement by histogram hyperbolization[END_REF]. To include this characteristics of human perception into image contrast enhancement techniques, histogram hyperbolization was proposed [START_REF] Pratt | Digital Image Processing[END_REF][START_REF] Frei | Image enhancement by histogram hyperbolization[END_REF]. In this framework, the desired histogram of the computer enhanced image has a hyperbolic form, but can also be exponential, cubic root or a logarithmic.

The methods based on histogram equalization and hyperbolization are also called histogram specification methods, since an output histogram shape is specified a priori. In fact, in the literature, there is a confusion between the terms histogram modification and specification, which are in essence histogram transformations.

The methods proposed in this dissertation follow the histogram specification transformation or, more specifically, the histogram equalization framework presented in this section. As we propose two different types of methods, one for gray-level and another for color images, the next sections present, in more level of details, previous methods in the literature for contrast enhancement purposes following the histogram specification transformation approach.

Histogram Specification for Contrast Enhancement of Gray-level Images

The first histogram equalization methods for image contrast enhancement were proposed in the early's seventies [START_REF] Hall | Almost uniform distributions for computer image enhancement[END_REF][START_REF] Andrews | Image processing by digital computer[END_REF]. They were based on the principle that the visual contrast of a digitized image can be improved by adjusting its range of gray-level, so that the histogram of the output image is flat, i.e., a uniform density can be specified from the output histogram. This idea of flattening the image histogram comes from the information theory, which states that the entropy of a signal is maximized when it has a uniform distribution property [START_REF] Wang | Image enhancement based on equal area dualistic sub-image histogram equalization method[END_REF].

Since then, histogram specification has been widely used for contrast enhancement in a variety of applications, such as medical image processing [START_REF] Kuwahara | Processing of riangiocardiographics images[END_REF][START_REF] Zimmerman | An evaluation of the effectiveness of adaptive histogram equalization for contrast enhancement[END_REF][START_REF] Pizer | Contrast-limited adaptive histogram equalization: Speed and effectiveness[END_REF][START_REF] Chang | Image contrast enhancement based on a histogram transformation of local standard deviation[END_REF] and radar signal processing [START_REF] Fuks | Radar contrast polarization dependence on subsurface sensing[END_REF], due to its simple function and effectiveness. Many variations of the standard method were implemented, changing the way the probability density function [START_REF] Degroot | Probability and Statistics[END_REF] is calculated, the density or distribution function to be specified (e.g., a uniform, an exponential), the size of the image being processed each time (e.g., local and adaptive methods),etc., as we will show in this section.

However, many of the proposed methods present one drawback: the brightness of the processed image can be changed after the equalization is performed. This problem appears mainly due to the flattening property of the histogram equalization, and it is rarely utilized in consumer electronic products such as TV, camcorders, video door phones, security video cameras. This is because, for consumer electronics preserving the original brightness of the image may be necessary in order not to introduce unnecessary visual deterioration. This section is divided in two parts. The first part introduces a variety of methods which do not preserve the brightness of the processed image, while the second describes some methods that do preserve it. This thesis is more focused on this second type of methods, as will be later showed in Chapter 3.

Non-brightness Preserving Histogram Specification Methods

This section describes a set of methods which perform histogram equalization without worrying about preserving the brightness of the processed image. We start with the work of [START_REF] Hummel | Histogram modification techniques[END_REF], which showed that histogram equalization can be accomplished quite simply by using a look-up table, which is applied to every point of the image. The transformation which comes closer of providing a uniform density can be obtained from a scaled version of the cumulative density function, i.e., the integral of the normalized original histogram. If we require this transformation to be single valued, then gray-level bins of the original histogram can only be merged together, but not broken up. Thus, if the original image has a histogram with large peaks, the transformed histogram will have only a very approximately flat histogram. Nonetheless, contrast is improved because gray-level bins with large numbers of points are moved further apart, increasing the discriminability between the corresponding constant gray-level sets. In [START_REF] Hummel | Image enhancement by histogram transformation[END_REF], several techniques were proposed to obtain an exact equalized histogram, i.e., an histogram with an exact uniform density. To achieve that, a multiple-valued transformation was defined, i.e., different pixels with the same gray-level value have different output gray-levels.

In [START_REF] Kim | Image contrast enhancement based on the piecewise-linear approximation of cdf[END_REF], image contrast enhancement methods based on the piecewise-linear approximation of the cumulative density function (CDF) of the image were proposed. They actually proposed to approximate the computation of the CDF of an image. This approximate CDF makes methods based on HE faster, and more suitable for real-time applications. Experiments showed the accuracy of the approximated CDF with respect to the original one, and that the approach to approximate the CDF is effective.

In [START_REF] Williams | Image enhancement using the modified cosine function and semi-histogram equalization for gray-scale and color images[END_REF], a modified cosine function and semi-histogram equalization was proposed for contrast enhancement of gray-level images, and an extension of this methodology is suggested to color images by equalizing the three channels (R, G, and B ) separately. We believe this method has several practical drawbacks, such as the dependency of the image dimension.

The methods just described dealt with the problem of improving global contrast, and were conceived to solve problems such as improper lightning conditions (excessive, poor, etc.) in the environment. On the other hand, local contrast enhancement methods, which target the visibility of local details in the image, were also proposed. Within this scope, adaptive histogram equalization (AHE) methods [START_REF] Pizer | Adaptive grey level assingment in ct scan display[END_REF] are the most well-known.

AHE works by finding local mappings from a pixel to its equalized version using local histograms. In its basic form, the AHE method consists of performing an histogram equalization at each pixel of the image, based on its pixel neighborhood (its contextual region). An evaluation of the effectiveness of AHE for contrast enhancement in clinical computed tomography (CT) images of the chest is shown in [START_REF] Zimmerman | An evaluation of the effectiveness of adaptive histogram equalization for contrast enhancement[END_REF]. Although AHE improves contrast locally, its computational complexity may not be acceptable for real-time applications. Another disadvantage of the AHE methods is that they often over-enhance the image, creating the so called contrast objects. Contrast objects are objects which were not visible in the original image. AHE can also be used to enhance noise in relatively homogeneous regions [START_REF] Pizer | Adaptive histogram equalization and its variations[END_REF]. However, image contrast enhancement by AHE methods often does not look natural [START_REF] Stark | Adaptive image constrast enhancement using generalizations of histogram equalization[END_REF], and also amplifies noise.

To overcome the noise amplification drawback, a contrast limited AHE (CLAHE) method was proposed in [START_REF] Pizer | Contrast-limited adaptive histogram equalization: Speed and effectiveness[END_REF]. The noise problem associated with AHE can be reduced by limiting the contrast enhancement specifically to the homogeneous areas of the images. These areas are characterized by a high peak in the histogram associated with the contextual regions, since many pixels fall inside the same gray-level range. A complete description and a implementation of this new method for real-time were presented in [START_REF] Zuiderveld | Contrast limited adaptive histogram equalization[END_REF] and [START_REF] Reza | Realization of the contrast limited adaptive histogram equalization (clahe) for real-time image enhancement[END_REF], respectively. A wavelet-multi-scale version of CLAHE was also proposed in [START_REF] Jin | Contrast enhancement by multi-scale adaptive histogram equalization[END_REF], and applied to improve the contrast of chest CT images.

Aiming at reducing the high number of operations required by the AHE method, which makes its exact and original conceived forms not suitable for real time applications, various methods have been proposed in the last decade. For instance, in non-overlapped sub-block HE methods, the image plane is divided into a number of sub-regions, and the pixels belonging to a particular sub-region are equalized using the local histogram of the subregion itself [START_REF] Jain | Fundamentals of Digital Image Processing[END_REF][START_REF] Gonzalez | Digital Image Processing[END_REF]. In [START_REF] Kim | Contrast enhancement system using spatially adaptive histogram equalization with temporal filtering[END_REF], a system for enhancing contrast of image sequences using a spatially adaptive histogram equalization with temporal filtering was proposed. A local enhancement is performed by block-overlapped histogram equalization, followed by an efficient temporal filtering method for suppressing over-amplified noise. This local result is combined with the original image (a global result) to obtain the enhanced image. The authors claim that this system is practical for real-time applications. In [START_REF] Kim | An advanced contrast enhancement using partially overlapped sub-block histogram equalization[END_REF], an alternative strategy was proposed, relying on partially overlapped sub-block HE (POSHE), and it achieves contrast enhancement rates similar to that of AHE, but at the same time it is capable of maintaining a fine visual quality to the image, by getting rid of the blocking effect. Recently, in [START_REF] Lamberti | Cmbfhe: A novel contrast enhancement technique based on cascaded multistep binomial filtering histogram equalization[END_REF], a contrast enhancement algorithm which exploits efficient filtering techniques based on cascaded multiple-step binomial smoothing masks HE (CMBFHE) was also introduced, and achieved exactly the same results as POSHE.

A combination of adaptive contrast enhancement algorithm [8] and adaptive neighborhood histogram equalization [START_REF] Paranjape | Adaptive-neighborhood histogram equalization for image enhancement[END_REF] was proposed in [START_REF] Mukherjee | Adaptive neighborhood extended contrast enhancement and its modifications[END_REF], and called adaptive neighborhood extended contrast enhancement. Besides the combination of techniques, the innovation in this method is that it defines contextual regions in which it carries out local contrast enhancement. Although this method achieves good results, it requires parameters to be setup depending on image characteristics in order to define the contextual region.

A variation of CLAHE method was presented in [START_REF] Zhu | Image contrast enhancement by constrained local histogram equalization[END_REF], which is named contrast local HE (CLHE). First, the HE process is introduced in a variational framework, where the HE process is viewed as an optimization problem. Then, this framework is extended to a local HE (LHE) directly, and a smoothness constraint term is introduced into the optimization function so that the enhancement result is a balance of the enhancement of details of interest and the maintenance of the original image appearance. Results on common and X-ray images are presented comparing this method with global HE, and LHE or AHE. Although this new method outperforms the previous ones regarding the contrast of yielded images, unrealistic images are produced.

In [START_REF] Chang | Image contrast enhancement based on a histogram transformation of local standard deviation[END_REF], another adaptive contrast enhancement algorithm, but this time based on local standard deviation (LSD) distribution, was proposed. The innovation of this method consists of using nonlinear functions with local standard deviation to weight it. Once the LSD distribution is estimated, the desired histogram can be specified and the enhancement performed. Note that this method is a histogram transformation one. Experiments were carried out on chest X-ray images, and showed that this method adequately enhances details, and produces little noise over-enhancement and few ringing artifacts. The method also outperforms the ones it was compared with. However, three parameters are set to fit the nonlinear local standard deviation model.

In [START_REF] Stark | Adaptive image constrast enhancement using generalizations of histogram equalization[END_REF], a scheme for adaptive image contrast enhancement based on a generalization of the equalized histogram was proposed. In particular, he studied the definition of cumulative density functions, which are used to generate the gray-level mapping from the local histogram. By choosing alternative forms of cumulative density function, one can achieve a wide variety of effects. A signed power-law with local-mean replacement form is proposed, and is dependent on two parameters. Through the variation of these param-eters, the method can produce a range of degrees of contrast enhancement, from leaving the image unchanged to yielding full adaptive equalization.

In [START_REF] Ni | Histogram-equalization-based adaptive image sensor for real-time vision[END_REF], a prototype of a system for image contrast enhancement through histogram equalization which uses an adaptive image sensor in situ was introduced. This image sensor can automatically adapt to different lighting conditions without frame delay, and provides a constant image signal excursion range. Although some critical problems, such as frame rate, fixed pattern noise, etc., remain opened and need further investigation and experimentation, this sensor has shown very encouraging results. A CMOS5 prototype chip of 64 × 64 is showed.

Brightness Preserving Histogram Specification Methods

Different from the methods presented in the previous section, this section presents a set of works which aim at improving contrast while preserving the brightness of the image.

We firstly present the bi-histogram equalization methods for image contrast enhancement with brightness preserving proposed by [START_REF] Kim | Contrast enhancement using brightness preserving bi-histogram equalization[END_REF][START_REF] Wang | Image enhancement based on equal area dualistic sub-image histogram equalization method[END_REF][START_REF] Chen | Minimum mean brightness error bi-histogram equalization in contrast enhancement[END_REF]. All these methods decompose the original image into two sub-image by using statistical properties of the image, such as the mean gray-level value [START_REF] Kim | Contrast enhancement using brightness preserving bi-histogram equalization[END_REF], the level which separates the histogram of the image in equal areas [START_REF] Wang | Image enhancement based on equal area dualistic sub-image histogram equalization method[END_REF] and the level which yields the minimum brightness changing in the output image [START_REF] Chen | Minimum mean brightness error bi-histogram equalization in contrast enhancement[END_REF]. Once the image is decomposed, each sub-image histogram is equalized to produce the output image. It is mathematically shown that these methods keep the brightness of the output image near to the input one. An extension of [START_REF] Kim | Contrast enhancement using brightness preserving bi-histogram equalization[END_REF]'s work was proposed in [START_REF] Chen | Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation[END_REF]. This last method proposes to recursively decompose the image into sub-images by using its mean gray-level value, yielding a controlled scalable brightness preservation. All these methods will be detailed in Section 3.2, since they are directly related with this thesis.

In [START_REF] Wang | Brightness preserving histogram equalization with maximum entropy: A variational perspective[END_REF], an elegant and sophisticated variational framework for image contrast enhancement brightness preserving with maximum entropy was introduced. Although the authors claim that their method is a histogram equalization one, it is, in fact, a histogram specification of an entropy distribution. Numerical results achieved by this method, i.e., the entropy and brightness of the output images, are similar to the ones of [START_REF] Chen | Minimum mean brightness error bi-histogram equalization in contrast enhancement[END_REF]'s method.

Histogram Specification for Contrast Enhancement of Color Images

This section presents a number of methods for contrast enhancement in color images. In some cases, such as images from mobile phones and digital cameras preserving the hue is essential. In others preserving perceptual attributes is sometimes less important than obtaining the greatest possible color contrast improvement [START_REF] Mlsna | A multivariate contrast enhancement technique for multispectral images[END_REF] (this is especially true for color composites derived from multi-spectral images such as remote sensing images, which have no significant basis in human perception). These methods can be roughly divided into two classes: non hue-preserving and hue-preserving methods. Section 2.3.1 presents non-hue-preserving methods, while Section 2.3.2 presents hue-preserving ones.

Non-Hue-Preserving Histogram Specification Methods

This section describes histogram specification methods for color images which do not preserve the hue attribute of the color. We start by describing the work of [START_REF] Soha | Multidimensional histogram normalization contrast enhancement[END_REF]. They proposed a multi-spectral histogram normalization for effective contrast enhancement in color image by stretching the original RGB [START_REF] Kuehni | Color Ordered: A Survey of Color Systems from Antiquity to the Present[END_REF] components along the principal component axis, in order to equalize the variance of all components (i.e., channels). This method de-correlates the color channels, and does not take into account perceptual features of the color space. Hence, unrealistic colors may be produced. Either linear or non-linear contrast stretching can be used. If a Gaussian stretch is applied, a symmetrical multidimensional Gaussian histogram is produced. This method implicitly offers a favorable feature, because it offers the opportunity to apply smoothing (low pass filtering) to the low order (poorer signal to noise ratio) principal components, and/or edge sharpening (high frequency boost filtering) to the higher order components, prior to performing the inverse rotation.

In turn, the method proposed in [START_REF] Niblack | An Introduction to Digital Image Processing[END_REF] stretches iteratively three 2D histograms on the RGB color space, i.e., RG, GB, BR. For the three 2D histograms (RG, GB, BR), the following steps are performed iteratively: [START_REF] Abdou | Quantitative design and evaluation of enhancement/thresholding edge detectors[END_REF] In RG, stretch the g values for each r value;

(2) In GB, stretch the b values for each g value; (3) In BR, stretch the r values for each b value. This method causes distortion in the color space and it is not hue-preserving [START_REF] Naik | Hue-preserving color image enhancement without gamut problem[END_REF].

In [START_REF] Trahanias | Color image enhancement through 3-d histogram equalization[END_REF], a direct 3D histogram equalization method for color image contrast enhancement based on the RGB color system was proposed. This method produces images that are over-enhanced, i.e., the colors are well saturated. However, it is indicated to multivalued images (or color images) where the channels are well correlated, such as in satellite images. This method has (L 3 ) time complexity (typically L = 256) which does not allow its implementation for real-time application. This method is described in details in Chapter 4, Section 4.2, because it is directly related to our proposed method for enhancing the contrast of color images.

In [START_REF] Pitas | Multichannel techniques in color image enhancement and modeling[END_REF], two histogram equalization methods based on the RGB and HSI color spaces for color image contrast enhancement were proposed. In the first algorithm, a 3D histogram based on RGB color space is equalized following its joint probability density function in the RGB cube. This algorithm and the [START_REF] Trahanias | Color image enhancement through 3-d histogram equalization[END_REF]'s method differ in the way the output RGB histogram is obtained, i.e., the manner which output function transformation is computed. Furthermore, the first algorithm proposed by [START_REF] Pitas | Multichannel techniques in color image enhancement and modeling[END_REF] has (L 3 ) time complexity. To reduce this complexity, a parallel algorithm was proposed for color image histogram calculation and equalization, scanning the image L times, where L is the number of discrete levels for each component R, G and B. In the second algorithm, a 2D histogram to be equalized, built from the combination of saturation and intensity channels of HSI color space, is specified following rules based on both saturation and intensity thresholds. Note that this later algorithm is hue-preserving, i.e., the saturation and the intensity (or the luminance) channels are enhanced and the hue is left unchanged, but is described in this section because it is an extension of the non-hue-preserving method initially proposed.

[18] presented an interesting method for color image contrast enhancement based on region segmentation histogram equalization. The method proposes to initially divide the image into small areas using the principles of graph theory, since the graph theory gives high accurate boundaries for regions. The method is applied to multi-spectral satellite imagery by assigning the colors red, green and blue to three different spectral images. When compared to the traditional histogram equalization method, the proposed method clearly outperforms the latter one when a subjective visual assessment is carried out.

In [START_REF] Pichon | Color histogram equalization through mesh deformation[END_REF], a histogram equalization method which takes into account color channels correlations through mesh deformation, which always generates almost (i.e., discrete) uniform color histograms, is proposed. This algorithm makes an optimal use of the RGB color space, and it is appropriated for scientific visualization, but not for image enhancement, because it does not preserve the image natural features.

Hue-Preserving Histogram Specification Methods

This section describes hue-preserving contrast enhancement methods. The most common way to preserve the hue attribute when working with histogram specification is to convert the image from its original color space (e.g., RGB ) to another one, such as LHS, HSI, HSV -color spaces based on luminance (L -or intensity (I )), saturation (S ), and hue (H )attributes, YIQ, etc. After that the histogram specification is applied to the luminance and/or saturation components in order to improve the contrast, keeping the hue unchanged. And finally, the image is converted back to its original color space. In the next paragraphs, we describe some methods following this approach.

In [10], a histogram equalization method based on luminance, saturation, and hue (LHS ) color space [START_REF] Kuehni | Color Ordered: A Survey of Color Systems from Antiquity to the Present[END_REF] was proposed. The equalization is applied to the luminance (L) and the saturation (S ) histograms for the smaller regions, while the hue value (H ) is preserved.

In [START_REF] Yang | Efficient luminance and saturation processing techniques for bypassing color coordinate transformations[END_REF], a scaling and a shifting operator are directly applied to the RGB color space for histogram equalization of the luminance component while preserving the chromatic properties of LHS and YIQ color spaces was proposed. After some analysis, the authors concluded that scaling transformations in luminance preserves the hue and the saturation of the LHS color space. However, in the YIQ color space, only the hue is preserved. In contrast, shifting transformations in luminance preserve the hue and saturation of the YIQ color space, whilst only the hue is preserved in the LHS color space.

[128] proposed a method which modifies the saturation and intensity components of C-Y color space 6 [54]. This algorithm partitions the whole C-Y color space into n × k number of subspaces, where n and k are the number of partition in the luminance and saturation components, respectively. Saturation is equalized once for each of these n × k subspaces, within the maximum realizable saturation of the subspace. Later, the luminance component is also equalized, but considering the whole image. To take care of the R, G, and B values exceeding the bounds, [START_REF] Weeks | Histogram specification of 24-bit color images in the color difference (c-y) color space[END_REF] suggested to normalize (i.e., clipping) each component using (255)/(max(R, G, B)).

In [START_REF] Mlsna | A multivariate contrast enhancement technique for multispectral images[END_REF], a multivariate contrast enhancement method named "histogram explosion" was proposed. This method aims at exploding the RGB histogram, i.e., stretch the histogram to its maximum, in order to maximize the contrast enhancement. The proposed method is indicated to remote sensing imagery, and it can be hue-preserving if the parameters which model the histogram explosion are chosen properly. This method is able to explode nearly the full extent of the RGB gamut without clipping, and it is later extended to the CIELUV space [START_REF] Mlsna | 3-d histogram modification of color images[END_REF]. The same authors later proposed a recursive algorithm for 3D histogram enhancement scheme for color images [START_REF] Zhang | 3-d histogram modification of color images[END_REF].

[23] proposed a novel histogram processing method for color image contrast enhancement. This method proposes to produce a good balancing between histogram equalization (contrast enhancement) and the maintenance of the image original pixel distribution (to be faithful to the original image visual appearances). Because of its characteristics, it is expected to produce realistic and good-looking pictures. In this method, only the saturation component is enhanced, and it works as follows. The HSI color space is divided into A (a = 1, ..., A) hue regions, and each one of these hue regions are divided into B (b = 1, ..., B) luminance regions. For each one of these resulted (a, b) hue-luminance regions, a one-million high resolution saturation histogram is constructed. The method uses a single parameter to control the degree of contrast enhancement, and this parameter is used to recursively divide each one of these hue-luminance images high-dimensional histograms of the range [0, Sat max (a, b)] into K (k = 1, ..., K) intervals, where Sat max (a, b) is the maximum saturation value of the (a, b) hue-luminance region. After the division, the saturations falling into the k-th interval are grouped together, and represented by the same saturation value k × Sat max (a, b)/K. Then the processed HSI values are converted back to RGB values, and, if necessary, a clipping or scaling process is performed. Results showed the effectiveness of this method when compared with other previous works in literature, since it improves the contrast and colorfulness of the original image without introducing artifacts, which is caused by traditional equalization processes. Nevertheless, this method is not suitable for real-time applications, because to process a half-million image pixels it takes about one minute in a 2GHz CPU PC.

To decrease the gamut problem7 , [START_REF] Rodriguez | High-resolution histogram modification of color images[END_REF] proposed the use of high-resolution histograms when transforming the image from the RGB color space to another one, such as the YIQ color space8 [START_REF] Kuehni | Color Ordered: A Survey of Color Systems from Antiquity to the Present[END_REF]. Experimental results with histogram equalization showed that the use of a higher resolution histogram of the YIQ color space luminance leads to reduced distortion, as well as a "flatter" output histogram of the enhanced image.

In [START_REF] Naik | Hue-preserving color image enhancement without gamut problem[END_REF], a technique to avoid the gamut problem for image processing was formalized. A generalization of linear and nonlinear gray-level contrast enhancement functions to color images is presented as well.

Conclusions

In this chapter, we presented an overview on image contrast enhancement. In especial, we surveyed histogram specification methods for image contrast enhancement, since they are the core of the method proposed in this work.

In the next chapter, we present our gray-level multi-histogram equalization methods for image contrast enhancement.

3.

Multi-Histogram Equalization Methods for Gray-Level Images

Histogram equalization is a technique commonly used for image contrast enhancement. It works by redistributing the gray-levels of the input image by using its probability distribution function [START_REF] Degroot | Probability and Statistics[END_REF]. Despite its success, this technique has a well-known drawback: it does not preserve the brightness of the input image in the output image. To overcome such drawback, methods based on this technique have proposed to decompose the original image into two sub-images, and then perform the histogram equalization in each sub-image. These methods decompose the original image by using statistical properties, such as the mean gray-level value [START_REF] Kim | Contrast enhancement using brightness preserving bi-histogram equalization[END_REF], the equal-area value [START_REF] Wang | Image enhancement based on equal area dualistic sub-image histogram equalization method[END_REF] or the level which yields the minimum brightness error between the original and the enhanced images [START_REF] Chen | Minimum mean brightness error bi-histogram equalization in contrast enhancement[END_REF].

Although these methods preserve the input brightness in the output image with a significant contrast enhancement, they may produce images which do not look as natural as the input ones. In order to enhance contrast, preserve brightness and still produce natural looking images, this chapter presents a novel technique called multi-histogram equalization, which consists of decomposing the input image into several sub-images, and then applying the classical histogram equalization process to each one of them.

We propose to decompose the image by using two discrepancy functions, conceiving two multi-histogram equalization methods for image contrast enhancement. These discrepancy functions were borrowed from the multithresholding literature [START_REF] Otsu | A threshold selection method from grey-level histograms[END_REF][START_REF] Sezgin | Survey over image thresholdintg techniques and quantitative performance evaluation[END_REF][START_REF] Luessi | New results on efficient optimal multilevel image thresholding[END_REF]. A cost function, which takes into account both the discrepancy between the input and enhanced images and the number of decomposed sub-images, is used to automatically decide in how many sub-images the input image will be decomposed on.

Note that several histogram equalization methods proposed in the literature are suitable for real-time applications, because they are quite simple. Our proposed methods, even more sophisticated in the decomposition process of the original image than the others, remain fast and suitable for real-time applications.

The remainder of this chapter is organized as follows. As the proposed methods use many concepts previously introduced in the literature, Section 3.1 presents some basic definitions regarding the gray-level images, which will be referred to throughout this chapter. Section 3.2 describes some previous works in histogram equalization, which are closely related to our proposed methods. The proposed multi-histogram equalization methods are introduced in Section 3.3. Finally, conclusions are drawn in Section 3.4.

Basic Definitions

In this section, we present some basic definitions for monochromatic image and their probability functions, which will be used throughout this chapter.

I[l s , l f ] = {(x, y) → I(x, y)|l s ≤ I(x, y) ≤ l f , ∀(x, y) ∈ X mn }. ( 1
)
The sub-mapping I[l s , l f ] defines a ( sub-)image of I.

The definition above was presented to facilitate the definition of a sub-histogram and its probability functions, which are necessary for the definition of bi-and multi-histogram equalization methods. In the following, when the boundaries [l s , l f ] of the image I are omitted, they are assumed to be [0, L -1]. Definition 3.4 (Histogram) Let X mn l be a subset of X mn , such that for all (x, y) ∈ X mn l ⊆ X mn , we have I(x, y) = l. Let H I l be the absolute frequency of the level l in the image I, where 0 ≤ l ≤ L -1, i.e., H I l = ||X mn l ||. Note that H I l = 0 if there is no (x, y) ∈ X mn where I(x, y) = l. The mapping H I from the levels of the image I to their absolute frequency levels, i.e., H I : be the relative frequency (or the probability) of the level l in the (sub-)image I[l s , l f ], i.e.,

N L → N, is called the histogram of the image I. Note that L-1 i=0 H I i = m × n. Also note that H I l = H I[l s ,l f ] l , with 0 ≤ l s ≤ l ≤ l f < L.
P I[ls,l f ] l = H I l l f i=l s H I i , ( 2
)
where 0 ≤ l s ≤ l ≤ l f ≤ L -1. Note that l f i=l s P I[l s ,l f ] i = 1. The function P I[ls,l f ]
l f i=l s H I i l i=l s H I i = l i=l s P I[ls,l f ] i , ( 3
)
where 0 ≤ l s ≤ l ≤ l f ≤ L -1. Note that C I[l s ,l f ] l f = 1.
l m (I[l s , l f ]) = l f l=l s l × H I l l f l=ls H I l = l f l=ls l × P I[l s ,l f ] l . ( 4
l σ (I[l s , l f ]) = l f l=l s (l -l m (I[l s , l f ])) 2 × H I l l f l=l s H I l = l f l=l s (l -l m (I[l s , l f ])) 2 × P I[ls,l f ] l . (5)
Note that this definition of image contrast (standard deviation) is a global one. There are other definitions of contrast based on local properties of the image, e.g., neighbour points in the image [START_REF] Huang | Image enhancement based on the statistics of visual representation[END_REF].

Related Work

This section describes some previous work which make use of the histogram equalization method with the purpose of brightness preserving.

We start by describing the classical histogram equalization (CHE) method in Section 3.2.1. We then present four other methods which are extensions of the CHE, namely BBHE [START_REF] Kim | Contrast enhancement using brightness preserving bi-histogram equalization[END_REF], DSIHE [START_REF] Wang | Image enhancement based on equal area dualistic sub-image histogram equalization method[END_REF], MMBEBHE [START_REF] Chen | Minimum mean brightness error bi-histogram equalization in contrast enhancement[END_REF] and RMSHE [START_REF] Chen | Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation[END_REF], which will be later described in this section. These four extensions of the CHE method have one main point in common: they decompose the original image into two or more sub-images, and then equalize the histograms of these sub-images independently. In contrast, the major difference among these methods is the criteria they use to decompose the input image into two or more sub-images.

The first method, described in Section 3.2.2, divides the input image in two by using the mean gray-level value. An extension of this method, which recursively segments the original image, is later described in Section 3.2.5. Section 3.2.3 presents a method which uses the equal-area value to segment the images, whereas the method described in Section 3.2.4 segments images by taking into account the level which yields the minimum brightness error between the input and the enhanced images. Section 3.2.6 presents some final remarks.

Note that, for all the methods described in this section, I and O denote the input (or the original) and the output (or the processed) images, respectively. Both I and O have boundaries which will be denoted by [l s , l f ], instead of [0, L -1], as previously introduced in Section 3.1. We chose to use this definition because it is more general and, therefore, can be used by other methods which will be presented in this chapter.

Classical Histogram Equalization Method (CHE)

This section describes the classical histogram equalization (CHE) method for monochromatic images (e.g., gray-level ones) in detail, since this method is the core of the methods presented in this chapter. The CHE method for monochromatic images works as follows.

Let the boundaries of the images I and O, represented by [l s , l f ], be set as [0, L -1]. Also, let H I[l s ,l f ] (the image histogram), P I[l s ,l f ] (the image probability density function) and C I[l s ,l f ] (the image probability distribution function) be defined as in Section 3.1. Let H O[l s ,l f ] be the uniform histogram of the output image, where any level l, with 0 ≤ l s ≤ l ≤ l f ≤ L -1, has the same amount of pixels, i.e.,

H O[ls,l f ] l = 1 l f -l s + 1 l f l=l s H I[ls,l f ] l , ( 6
)
or the same density (probability), i.e.,

P O[l s ,l f ] l = 1 l f -l s + 1 . ( 7
)
The cumulative density function C O[l s ,l f ] is defined in function of l as:

C O[l s ,l f ] l = 1 l f i=l s H I[ls,l f ] i l i=l s H I[l s ,l f ] i = l i=l s P I[l s ,l f ] i = i -l s + 1 (l f -l s + 1) . ( 8
)
The l output level corresponding to the input level l is obtained as the one that minimizes the difference between

C O[ls,l f ] l and C I[ls,l f ] l
. In other words, the output level l for the input level l can be computed as the transformation function T I[ls,l f ] (l), i.e.,

l = T I[ls,l f ] (l) = l s + (l f -l s ) × C I[ls,l f ] l , ( 9
)
where z stands for the nearest integer to z ∈ R.

To generate the enhanced output image O[l s , l f ] using this transformation, for any pixel (x, y) ∈ X mn , we obtain its respective output level O[l s , l f ](x, y) as l = T I[l s ,l f ] (l), where l = I(x, y), i.e.,

O[l s , l f ] = {O(x, y) = l |l = I(x, y), l = T I[ls,l f ] (l), ∀(x, y) ∈ X mn }. ( 10
)
The high performance of the HE in enhancing the contrast of an image is a consequence of the dynamic range expansion of the gray-level image domain. That is, theoretically, the output image enhanced by a HE method uses all the gray-levels in the image domain, i.e., from 0 up to L-1. Besides, the CHE tries to produce an output image with a flat histogram, i.e., a uniform distribution. Based on information theory, the entropy of a message source will get the maximum value when the message has uniform distribution [START_REF] Wang | Image enhancement based on equal area dualistic sub-image histogram equalization method[END_REF]. This means that an enhanced image by the CHE method has the maximum information (i.e., entropy) with respect to its original one. However, the CHE method barely satisfies the uniform distribution property in images with discrete gray-level domains.

Despite the advantages offered by the CHE method, it can introduce a significant change in image brightness, i.e., its mean gray-level. That is, due to the uniform distribution specification of the output histogram, the CHE method shift the brightness of the output image to the median gray-level, i.e., L/2. This change in brightness is not desirable when applying the CHE scheme into consumer electronics devices, for instance, TV, camcorders, digital cameras and video surveillance. This is because it may introduce unnecessary visual deterioration to the output image.

Brightness Bi-Histogram Equalization Method (BBHE)

In order to overcome the drawback introduced by the CHE method described in the previous subsection, a brightness preserving bi-histogram equalization (BBHE) method was proposed in [START_REF] Kim | Contrast enhancement using brightness preserving bi-histogram equalization[END_REF]. The essence of the BBHE method is to decompose the original image into two sub-images, by using the image mean gray-level, and then apply the CHE method over each of the sub-images.

Formalizing what we just explained, the input image I is decomposed into two subimages based on its mean level l m (I), i.e.,

I = I[0, l m (I) ] ∪ I[ l m (I) + 1, L -1], (11)
where z stands for the greatest integer not greater than or equal to z (i.e., floor function). Note that in this method description, and in the next ones, the boundaries of the images I and O and their sub-images, will be represented by [l s , l f ], where 0 ≤ l s ≤ l f < L and will be indicated in the equation, e.g.,

I[l s , l f ] or O[l s , l f ].
Each of these decomposed sub-images I[0, l m (I) ] and I[ l m (I) + 1, L -1] then have their histograms equalized independently using Equation 10. The composition of the resulting processed sub-images constitutes the output image of the BBHE method, i.e.,

O = O[0, l m (I) ] ∪ O[ l m (I) + 1, L -1]. (12)
In [START_REF] Kim | Contrast enhancement using brightness preserving bi-histogram equalization[END_REF], it is mathematically shown that the BBHE method produces an output image with the value of the brightness (the mean gray-level) located in the middle of the mean of the input image and the median gray-level, i.e.,

l m (O) = 1 2 (l m (I) + L/2). ( 13
)
Notice that the output mean brightness of the BBHE method is a function of the input mean brightness l m (I). This fact clearly indicates that the BBHE preserves the brightness of the image when compared to the case of classical histogram equalization, where the output brightness always tends to the median gray-level, i.e., L/2.

Dualistic Sub-Image Histogram Equalization Method (DSIHE)

Before we start to describe this method, two useful definitions need to be introduced.

Definition 3.9 (Discrete Entropy) Let I[l s , l f ] be a sub-image of I. We define the discrete entropy of the image I[l s , l f ] as:

Ent(I[l s , l f ]) = - l f l=ls P I[ls,l f ] l × log 2 P I[ls,l f ] l . ( 14
)
Note that the discrete entropy of an image can, to some extent, depict the richness of details.

Definition 3.10 (Equal-Area Level) Let I[l s , l f ] be a sub-image of I. The level l a (I[l s , l f ]) which decomposes the image I[l s , l f ] into two sub-images I[l s , l a (I[l s , l f ])] and I[l a (I[l s , l f ]) + 1, l f ]
with almost ( i.e., in discrete meaning) equal area ( i.e., equal density), is called the equal-area level of the image I[l s , l f ], and it is defined as:

l a (I[l s , l f ]) = arg min ls≤l≤l f | l i=ls P I[l s ,l f ] i -1/2|, ( 15
)
where |z| stands for the absolute value of z ∈ R.

After these definitions, following the same basic ideas used by the BBHE method of decomposing the original image into two sub-images and then equalizing the histograms of the sub-images separately, [START_REF] Wang | Image enhancement based on equal area dualistic sub-image histogram equalization method[END_REF] proposed the so called equal area dualistic sub-image histogram equalization (DSIHE) method. Instead of decomposing the image based on its mean gray-level, the DSIHE method decomposes the images aiming at the maximization of the Shannon's entropy [START_REF] Shannon | A mathematical theory of communication[END_REF][START_REF] Kapur | Measures of Information and Their Applications[END_REF] of the output image. The method uses the Shannon's entropy because the condition to maximize the average information content (i.e., the entropy) of the processed image can seldom be held for discrete images. For such aim, the input image is decomposed into two sub-images, being one dark and one bright image, respecting the equal area property, i.e.,

I = I[0, l a (I)] ∪ I[l a (I) + 1, L -1], (16)
where l a (I) stands for the equal-area level of the image I.

Then the two sub-images I[0, l a (I)] and I[l a (I)+1, L-1] have their histogram equalized independently using Equation 10, and the composition of the resulting processed subimages constitutes the output image of the DSIHE method, i.e.,

O = O[0, l a (I)] ∪ O[l a (I) + 1, L -1]. (17)
In [START_REF] Wang | Image enhancement based on equal area dualistic sub-image histogram equalization method[END_REF], it is shown that the brightness of the output image O produced by the DSIHE method is the average of the equal-area level l a (I) of the image I and the median gray-level of the image L/2, i.e.,

l m (O) = 1 2 (l a (I) + L/2). ( 18
)
The authors claim that the brightness of the output image O generated by the DSIHE method does not present a significant shift in relation to the brightness of the input image, especially for the large area of the image with the same gray-levels (represented by small areas in histograms with great concentration of gray-levels), e.g., images with small objects regarding the great darker or brighter backgrounds.

Minimum Mean Brightness Error Bi-Histogram Equalization Method (MMBEBHE)

Still following the basic principle of the BBHE and DSIHE methods of decomposing an image before applying the CHE method to equalize the resulting sub-images independently, [START_REF] Chen | Minimum mean brightness error bi-histogram equalization in contrast enhancement[END_REF] proposed the minimum mean brightness error bi-histogram equalization (MMBEBHE) method. The main difference between the BBHE and the DSIHE methods and the MM-BEBHE one is that the latter searches for a threshold level l t that decomposes the image I into two sub-images I[0, l t ] and I[l t + 1, L -1], such that the minimum brightness difference between the input and output images is achieved, whereas the former methods consider only the input image to perform the decomposition. In this method, the image decomposition process can be described as follows:

I = I[0, l t ] ∪ I[l t + 1, L -1], (19)
where l t (I) stands for the threshold level which yields the minimum mean brightness error, i.e.,

l t = arg min 0≤l≤L-1 l m (I) -l m (O(l)) , ( 20
)
z stands for the nearest integer value to z ∈ R, O(l) is the output image for the threshold level l, i.e.,

O(l) = O[0, l] ∪ O[l + 1, L -1], (21)

Recursive Mean-Separate Histogram Equalization Method (RMSHE)

and O[0, l] and O[l + 1, L -1] are the enhanced images obtained by the histograms equalization of the images I[0, l] and I[l + 1, L -1] using Equation 10.

The output processed image which generates the minimum mean brightness error is given by:

O = O[0, l t ] ∪ O[l t + 1, L -1]. (22)
Assumptions and manipulations for finding the threshold level l t that minimizes the mean brightness error between the input and output images in (L) time complexity were made in [START_REF] Chen | Minimum mean brightness error bi-histogram equalization in contrast enhancement[END_REF]. Such strategy allows us to obtain the brightness

l m (O[0, l t ] ∪ O[l t + 1, L -1])
of the output image without generating the output image for each possible threshold level l, and its aim is to produce a method suitable for real-time applications.

Recursive Mean-Separate Histogram Equalization Method (RMSHE)

Let us recall that the extensions of the CHE method described so far in this chapter were characterized by decomposing the original image into two new sub-images. However, an extended version of the BBHE method (see Section 3.2.2), introduced in [START_REF] Chen | Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation[END_REF], and named Recursive Mean-Separate Histogram Equalization (RMSHE), proposes the following. Instead of decomposing the image only once, the RMSHE method proposed to perform image decomposition recursively, up to a scale r, generating 2 r sub-images.

As in the BBHE method, each sub-image I q-1 [l s , l f ] is decomposed based on its mean gray-level l m (I q-1 [l s , l f ]), i.e.,

I q-1 [l s , l f ] = I q [l s , l m (I q-1 [l s , l f ]) ] ∪ I q [ l m (I q-1 [l s , l f ]) + 1, l f ], (23)
where q stands for the scale of decomposition, with 0 < q ≤ r. Note that I 0 [l s , l f ] stands for I[0, L -1]. After the decomposition process, each one of these 2 r sub-images I r [l s , l f ] is independently enhanced using the CHE method. The output image O is composed by the union of all the enhanced sub-images O r [l s , l f ] obtained by Equation 10. Note that when r = 0 (no sub-images are generated) and r = 1, the RMSHE method is equivalent to the CHE and BBHE methods, respectively.

In [START_REF] Chen | Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation[END_REF], the authors mathematically showed that the brightness l m (O) of the output image O is better preserved as r increases following:

l m (O) = l m (I) + (L/2 -l m (I))/2 r . ( 24
)
Note that, as far as time complexity is concerned, this method presents a drawback: the number of decomposed sub-histograms increases in a power of two.

An Insight on the Results Produced by HE Methods

The previous sections described methods which use histogram equalization with the purpose of preserving the brightness of gray-level images. Figure 3.1 shows, for the girl image, the output images produced by these HE methods. In turn, Table 3.1 shows values of the brightness and contrast obtained for these images. By analyzing the data in Table 3.1 and the images in Figure 3.1, we observe that the only method which preserves the brightness of the input image and generates a natural looking image is the RMSHE method. Let us recall that this method is based on multihistogram decomposition or, in other words, on the recursive decomposition of the image into two sub-images.

From the results in Table 3.1, we can also conclude that the bi-histogram equalization methods are not robust regarding the brightness preserving. To overcome this drawback, Section 3.3 introduces two new robust methods for image contrast enhancement and brightness preserving, also capable of producing natural looking images.

The Proposed Methods

As mentioned before, the HE method enhances the contrast of an image but cannot preserve its brightness (which is shifted to the median gray-level value). As a result, the histogram equalization method can generate unnatural and nonexisting objects in the processed image. In contrast, bi-histogram equalization methods can produce a significative image contrast enhancement and, at some extent, preserve the brightness of the image. However, the images generated might not have a natural appearance. To surmount such drawbacks, the main idea of our generic proposed method is to decompose the image into several sub-images, such that the image contrast enhancement provided by the HE in each sub-image is less intense, leading the output image to have a more natural looking. The conception of this method brings up two points.

The first point is how to decompose the input image. As histogram equalization is the focus of the work, the image decomposition process is based on the histogram of the image. The histogram is divided into classes, determined by threshold levels, where each histogram class represents a sub-image. The decomposition process can be seen as an image segmentation process based on multi-threshold selection [START_REF] Otsu | A threshold selection method from grey-level histograms[END_REF][START_REF] Luessi | New results on efficient optimal multilevel image thresholding[END_REF]. The second point is in how many sub-images an image must be decomposed into. This number depends on how the image is decomposed.

In order to answer these questions, Section 3.3.1 presents two cost functions to decompose an image based on threshold levels, whereas the algorithm used to find the optimal threshold levels is presented in Section 3.3.2. These two cost functions conceive two instantiations of the generic MHE method. Finally, a criterion for automatically selecting the number of decomposed sub-images is exposed in Section 3.3.3.

Multi-Histogram Decomposition

Many histogram equalization-based methods have been proposed in the literature to decompose an image into sub-images by using the value of some statistical measure based on the image gray-level value [START_REF] Kim | Contrast enhancement using brightness preserving bi-histogram equalization[END_REF][START_REF] Wang | Image enhancement based on equal area dualistic sub-image histogram equalization method[END_REF][START_REF] Chen | Minimum mean brightness error bi-histogram equalization in contrast enhancement[END_REF][START_REF] Chen | Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation[END_REF]. These methods aim at optimizing the entropy or preserve the brightness of the image. Here, we will focus our attention on decomposing an image such that the enhanced images still have a natural appearance. For such aim,

Multi-Histogram Decomposition 56

we propose to cluster the histogram of the image in classes, where each class corresponds to a sub-image. By doing that, we want to minimize the brightness shift yielded by the histogram equalization process into each sub-image. With the minimization of this shift, this method is expected to preserve both the brightness and the natural appearance of the processed image.

From the multi-threshold selection literature point of view, the problem stated above can be seen as the minimization of the within-histogram class variance [START_REF] Otsu | A threshold selection method from grey-level histograms[END_REF], where the the within-class variance is the total squared error of each histogram class with respect to its mean value (i.e., the brightness). That is, the decomposition aim is to find the optimal threshold set T k = {t k 1 , ..., t k k-1 } which minimizes the decomposition error of the histogram of the image into k histogram classes (or sub-images) and decomposes the image

I[0, L -1] into k sub-images I[l 1,k s , l 1,k f ], ..., I[l k,k s , l k,k f ],
where l j,k s and l j,k f stand for the lower and upper gray-level boundaries of each sub-image j when the image is decomposed into k sub-images. They are defined as: l j,k s = t k j-1 , if j > 1, and l j,k s = 0 otherwise, and l j,k f = t k j + 1, if j = k, and l j,k f = L -1 otherwise. The discrepancy function for decomposing the original image into k sub-images (or histogram classes) following the minimization of within-class variance can be expressed as:

Disc(k) = k j=1 l j,k f l=l j,k s (l -l m (I[l j,k s , l j,k f ])) 2 P I[0,L-1] l . ( 25
)
The variant method conceived with this discrepancy function is called Minimum Within-Class Variance MHE method (MWCVMHE). Note that the mean gray-level (i.e., the brightness) of each sub-image processed by the CHE method is theoretically shifted to the median gray-level of its range, i.e.,

l m (O[l s , l f ]) = l mm (I[l s , l f ]) = l mm (O[l s , l f ]) = (l s + l f )/2.
As we want to minimize the brightness shift of each processed sub-image such that the global processed image has its contrast enhanced and its brightness preserved (creating a natural looking output image), we focus our attention on the brightness of the output image. Hence, instead of using the mean l m (I[l s , l f ]) of each input sub-image I[l s , l f ] in the discrepancy function, we propose to use its median level (l s +l f )/2, since every enhanced sub-image O[l s , l f ] will theoretically have its mean value (brightness) on the median level of the image range -thanks to the specification of a uniform histogram distribution. Therefore, a new discrepancy function is proposed and it is expressed as:

Disc(k) = k j=1 l j,k f l=l j,k s (l -l mm (I[l j,k s , l j,k f ])) 2 P I[0,L-1] l , ( 26
)
where l mm (I[l j,k s , l j,k f ]) stands for the median value of the image I[l j,k s , l j,k f ] and it is defined as (l s + l f )/2 . The variant method conceived with this discrepancy function is called Minimum Middle-Level Squared Error MHE method (MMLSEMHE). Data: ϕ(p, q) -discrepancy of sub-image I[p, q] Result: D(p) q -discrepancy function Disc(p) up to level q Result: P T -optimum thresholds matrix for q ← 0 ; q < L ; q + + do D(1) q ← ϕ(0, q) ;

1 for p ← 1 ; p ≤ k ; p + + do 2 D(p + 1) p ← D(p) p-1 + ϕ(p -1, p -1) ; 3 P T (p + 1, p) ← p -1 ; 4 for q ← p + 1 ; q ≤ L -k + p ; q + + do 5 D(p + 1) q ← -∞ ; 6 for l ← p -1 ; l ≤ q -1 ; l + + do 7 if (D(p + 1) q > D(p) l + ϕ(l + 1, q)) then 8 D(p + 1) q ← D(p) l + ϕ(l + 1, q) ; 9 P T (p + 1, q) ← l ; 10
Note that the only difference between Equations 25 and 26 is the use of l m (I[l j,k s , l j,k f ]) or l mm (I[l j,k s , l j,k f ]). In the former, we are using the mean of the input image, whilst, in the latter, we are using an expectation of the mean of the output image, i.e., (l s + l f )/2.

Finding the Optimal Thresholds

The task of finding the optimal k -1 threshold levels which segment an image into k classes can be easily performed by a dynamic programming algorithm with (kL 2 ) time complexity [START_REF] Otsu | An automatic threshold selection method based on discriminant and least squares criteria[END_REF].

Algorithm 3.1 presents this algorithm, where ϕ(p, q) stands for the "discrepancy contribution" of the sub-image I[p, q], i.e.,

ϕ(p, q) = q l=p (l -γ) 2 P I[0,L-1] l , ( 27
)
where γ stands for l m (I[p, q]) or l mm (I[p, q]) depending on the discrepancy function used (see Equations 25 and 26). Once Algorithm 3.1 is run, the optimal threshold vector T k can be obtained by a back-searching procedure on P T , i.e.,

t k j = P T (j + 1, t k * j+1 ), (28)
where 1 ≤ j < k, t k * j+1 = L -1 if j + 1 = k, and t k * j+1 = t k j+1 otherwise. One remark is that, recently, [START_REF] Luessi | New results on efficient optimal multilevel image thresholding[END_REF] proposed a new scheme jointing the matrix search procedure to the dynamic programming one, yielding a faster time complexity algorithm ( (kL)) to multithresholding. This method can also be employed to perform the image decomposition process described here. Moreover, note that even faster approximated methods based on descendent gradient steps can be employed to find the thresholds [START_REF] Reddi | An optimal multiple threshold scheme for image segmentation[END_REF][START_REF] Lee | Comments of "an optimal multiple threshold scheme for image segmentation[END_REF].

Automatic Thresholding Criterium

This section presents an approach for automatically choosing the number of sub-images in which the original image will be decomposed on. This decision is a key point of our work, which has three main aims: 1) contrast enhancement; 2) brightness preserving; 3) natural appearance. Nonetheless, these goals cannot be all maximized simultaneously.

We take into account that, as the number of sub-images in which the original image is decomposed increases, the chance of preserving the image brightness and natural appearance also increases. In contrast, the chances of enhancing the image contrast decrease. Hence, in order to decide in how many sub-images the original image should be decomposed on, this tradeoff should be considered. We propose to use a cost function, initially used in [START_REF] Yen | A new criterion for automatic multilevel thresholding[END_REF], to automatically select the number of decomposed sub-images. This cost function takes into account both the discrepancy between the original and processed images (which is our own aim decomposition function), and the number of sub-images in which the original image is decomposed on. This cost function is defined as:

C(k) = ρ(Disc(k)) 1/2 + (log 2 (k)) 2 , ( 29
)
where ρ is a positive weighting constant, and it is setup to 0.8 as done in [START_REF] Yen | A new criterion for automatic multilevel thresholding[END_REF] and shown in the experiments. The number of decomposed sub-images k is automatically given as the one which minimizes the cost function C(k). It is shown in [START_REF] Yen | A new criterion for automatic multilevel thresholding[END_REF] that the cost function presented in Equation 29 has a unique minimum for practical cases (i.e., Disc(k) is of the form α × k -λ , α > 0, λ > 0, ρ < 4 ln L × L λ/2 /(λα 1/2 (ln 2) 2 ) and 0 < k < L). Hence, instead of finding the value k which minimizes C(k) throughout k values range, it is enough to search for k from 0 up to a value where C(k) starts to increase.

Conclusions

In this chapter, we introduced two new gray-level multi-histogram equalization methods for image contrast enhancement and brightness preserving. Note that the time complexity of our methods is upper-bounded by the step of finding the optimal thresholds which has (kL 2 ) time complexity (or even (kL), if [START_REF] Luessi | New results on efficient optimal multilevel image thresholding[END_REF]'s algorithm is used) plus the time complexity of computing the image histogram, i.e., (mn), where mn stands for the image dimension. Hence, the time complexity of our method is (max(kL 2 , mn)) These time complexities make our methods fast and suitable for real-time applications, even though they are more sophisticated than the previous ones in the original image decomposition process. Experiments comparing our methods and the ones described in Section 3.2 are presented in Section 5.1.

4.

Fast Hue-Preserving Histogram Equalization Methods

In the previous chapter we described some classical methods based on histogram equalization which are used to enhance gray-level images, and proposed new ones. Following this same line, in this chapter, we propose a generic fast hue-preserving histogram equalization (HE) method based on the RGB color space for image contrast enhancement and two instantiation of that generic process. The first method uses R-red, G-green, and B -blue 1D histograms to estimate a RGB 3D histogram to be equalized, whereas the second method uses RG, RB, and GB 2D histograms. The proposed methods preserve many of the ideas presented by other methods based on histogram equalization [START_REF] Gonzalez | Digital Image Processing[END_REF][START_REF] Trahanias | Color image enhancement through 3-d histogram equalization[END_REF]. However, they have two main advantages: first, the methods are hue-preserving, i.e., they avoid that new and unrealistic colors appear in the enhanced image; second, the methods have low time complexity (both instantiations are linear with the image dimension), which makes them suitable for real-time applications, such as contrast enhancement of natural images acquired by mobile phones and PDAs.

This chapter starts with Section 4.1 introducing some basic definitions which will be used in the remaining sections. Following these definitions, in order to give a detailed description of our methods, Section 4.2 describes other methods from which the proposed methods borrow ideas from. Our fast hue-preserving histogram equalization methods for color image contrast enhancement are then introduced in Section 4.3. Section 4.4 discusses the time and space complexities of the described methods and the proposed ones. Finally, conclusions are drawn in Section 4.5.

Basic Definitions

In a context of discrete variables, the histogram of a variable represents the absolute frequency of each discrete value, whereas the probability density function of a variable constitutes the relative frequency of these values. The probability distribution function (or the cumulative probability density function), in turn, can be seen as the probability of a variable be less or equal to a value. These functions are used to estimate the probability of an event that is happening.

Considering that a color image is a discrete variable, this section describes its multidimensional histograms and their probability functions, which will be used throughout this chapter.

Definition 4.1 (Color Images) Let N denote the set of natural numbers. Let X mn be a subset of points (x, y) ∈ N 2 , such that 0 ≤ x < m, and 0 ≤ y < n, where m and n denote the dimensions of X mn . Let ||Y || denote the cardinality of a set Y ⊆ N 2 . Note that

||X mn || = m × n. A mapping I, from X mn to N 3
L , is called a ( color) image ( in the RGB color space). By abusing terminology we denote a color image by I RGB . Indeed, a color image I RGB has three mappings from X mn to N L , which are the red, green, and blue images, i.e., I R , I G , and I B , respectively.

Let us also define three other mappings from X mn to N 2 L , i.e., I RG , I RB , and I GB . We call these mappings as red/ green, red/ blue, and green/ blue images, respectively. Definition 4.2 (Levels) For a point (x, y) ∈ X mn , R i = I R (x, y), G i = I G (x, y) and B i = I B (x, y) are called the red, green and blue levels of the point (x, y) in I RGB , respectively, where 0 ≤ R i , G i , B i < L. We can also denote (R i , G i , B i ), (R i , G i ), (R i , B i ) and (G i , B i ) by I RGB (x, y), I RG (x, y), I RB (x, y) and I GB (x, y), respectively.

In the following, we define 1D, 2D, and 3D histograms and probability density and distribution functions for color images.

For the 1D case, we firstly consider the R color channel.

Definition 4.3 (1D Histogram) Let X mn R i be a subset of X mn , such that for all (x, y) ∈ X mn R i ⊆ X mn , we have I R (x, y) = R i . Let H I R R i be the absolute frequency of the level R i in the image I R , where 0 ≤ R i < L, i.e., H I R R i = ||X mn R i ||. Note that H I R R i = 0, if there is no (x, y) ∈ X mn such that I R (x, y) = R i .
The mapping H I R from the levels of the image I R to its absolute frequency levels, i.e.,

H I R : N L → N, is called the histogram of the image I R . Note that L-1 R i =0 H I R R i = m × n.
Definition 4.4 (1D Probability Density Function) Let P I R R i be the relative frequency (or the probability) of the level R i in the image I R , i.e., R i be the probability distribution (or the cumulative probability density) of the level R i in the image I R , i.e.,

P I R R i = H I R R i m × n , ( 30
)
where 0 ≤ R i < L. Note that R i r i =0 P I R r i = 1. The function P I R composed by all P I R R i is the probability density function of the image I R .
C I R R i = 1 m × n R i r i =0 H I R r i = R i r i =0 P I R r i , ( 31
)
where

0 ≤ R i < L. Note that C I R L-1 = 1. The function C I R composed by all C I R
R i is the probability distribution function (or the cumulative probability density function) of the image I R .

It is immediate to extend the above definitions for the image I R , i.e., H I R , P I R , and C I R , to the images I G and I B . Note that the definitions for 1D histograms and their probability functions of color images, here introduced, are identical to the ones presented in Section 3.1 for monochrome images. They are again presented for sake of coherence on notation for color images.

For 2D histograms and their probability functions, we firstly consider the R and G color channels. Definition 4.6 (2D Histogram) Let X mn R i ,G i be a subset of X mn , such that for all (x, y) ∈ X mn R i ,G i ⊆ X mn , we have (R i , G i ) = I RG (x, y). Let H I RG R i ,G i be the absolute frequency of the color levels R i and G i in the image I RG , i.e., H

I RG R i ,G i = ||X mn R i ,G i ||. Note that H I RG R i ,G i = 0, if there is no (x, y) ∈ X mn such that I RG (x, y) = (R i , G i ).
The mapping H I RG from the levels of the image I RG to its absolute frequency, i.e., H

I RG : N 2 L → N, is called the histogram of the image I RG . Note that L-1 r i =0 L-1 g i =0 H I RG r i ,g i = m × n.
Definition 4.7 (2D Probability Density Function) Let P I RG R i ,G i be the relative frequency (or the probability) of the color levels R i and G i in the image I RG , i.e., R i ,G i be the probability distribution (or the cumulative probability density) of the color levels R i and G i in the image I RG , i.e.,

P I RG R i ,G i = H I RG R i ,G i m × n , ( 32
)
where 0 ≤ R i , G i < L. Note that L-1 r i =0 L-1 g i =0 P I RG r i ,g i = 1.

The function P I RG composed by all P

I RG R i ,G i is called
C I RG R i ,G i = R i r i =0 G i g i =0 P I RG r i ,g i , ( 33
)
where

0 ≤ R i , G i < L. Note that C I RG L-1,L-1 = 1.
The C I RG function composed by all C I RG R i ,G i is called the probability distribution function (or the cumulative probability density function) of the image I RG .

Note that to compute C I RG for all possible R i and G i , the formulation shown in Equation 33 has complexity (L 4 ). By using a recursive definition as:

C I RG R i ,G i =          P I RG R i ,G i , if R i = 0 and G i = 0 C I RG R i ,G i -1 + P I RG R i ,G i , if R i = 0 and G i = 0 C I RG R i -1,G i + P I RG R i ,G i , if R i = 0 and G i = 0 C I RG R i -1,G i + C I RG R i ,G i -1 -C I RG R i -1,G i -1 + P I RG R i ,G i , otherwise. ( 34
)
we can save time, and all possible R i and G i can be computed in (L 2 ).

It is immediate to extend the above definitions for the image I RG , i.e., H I RG , P I RG , and C I RG , to the images I RB and I GB .

For the last scenario, we have a single 3D histogram and its probability functions to be defined. Definition 4.9 (3D Histogram) Let X mn R i ,G i ,B i be a subset of X mn , such that for all (x, y) ∈ X mn R i ,G i ,B i ⊆ X mn , we have

I RGB (x, y) = (R i , G i , B i ). Let H I RGB R i ,G i ,B
i be the absolute frequency of the color levels R i , G i , and B i in the image I RGB , i.e., H

I RGB R i ,G i ,B i = ||X mn R i ,G i ,B i ||. Note that H I RGB R i ,G i ,B i = 0, if there is no (x, y) ∈ X mn such that I RGB (x, y) = (R i , G i , B i ).
The mapping H I RGB from the levels of the image I RGB to its absolute frequency, i.e., H

I RGB : N 3 L → N, is called the histogram of the image I RGB . Note that L-1 r i =0 L-1 g i =0 L-1 b i =0 H I RGB r i ,g i ,b i = m × n.
Definition 4.10 (3D Probability Density Function) Let P I RGB R i ,G i ,B i be the relative frequency (or the probability density or simply the probability) of the color levels R i , G i , and B i in the image I RGB , i.e., R i ,G i ,B i be the probability distribution (or the cumulative probability density) of the color levels R i , G i , and B i in the image I RGB , i.e.,

P I RGB R i ,G i ,B i = H I RGB R i ,G i ,B i m × n , ( 35
)
where 0 ≤ R i , G i , B i < L. Note that L-1 r i =0 L-1 g i =0 L-1 b i =0 P I RGB r i ,g i ,b i = 1.

The function P I RGB composed by all P

I RGB R i ,G i ,B i is
C I RGB R i ,G i ,B i = R i r i =0 G i g i =0 B i b i =0 P I RGB r i ,g i ,b i , ( 36
)
where

0 ≤ R i , G i , B i < L. Note that C I RGB L-1,L-1,L-1 = 1.

Fast Hue-Preserving Histogram Equalization Methods

The function C I RGB composed by all C I RGB R i ,G i ,B i is called the probability distribution function (or the cumulative probability density function) of the image I RGB .

One remark is that the formulation shown in Equation 36has complexity (L 6 ) to compute C I RGB for all possible R i , G i , and B i . Similary to the 2D case (Equation 34), by using a recursive definition as:

C I RGB R i ,G i ,B i =                                                                                        P I RGB R i ,G i ,B i , if R i = 0, G i = 0 and B i = 0 C I RGB R i ,G i ,B i -1 + P I RGB R i ,G i ,B i , if R i = 0, G i = 0 and B i = 0 C I RGB R i ,G i -1,B i + P I RGB R i ,G i ,B i , if R i = 0, G i = 0 and B i = 0 C I RGB R i -1,G i ,B i + P I RGB R i ,G i ,B i , if R i = 0, G i = 0 and B i = 0 C I RGB R i -1,G i ,B i + C I RGB R i ,G i -1,B i if R i = 0, G i = 0 and B i = 0 -C I RGB R i -1,G i -1,B i + P I RGB R i ,G i ,B i , C I RGB R i -1,G i ,B i + C I RGB R i ,G i ,B i -1 if R i = 0, G i = 0 and B i = 0 -C I RGB R i -1,G i ,B i -1 + P I RGB R i ,G i ,B i , C I RGB R i ,G i -1,B i + C I RGB R i ,G i ,B i -1 if R i = 0, G i = 0 and B i = 0 -C I RGB R i ,G i -1,B i -1 + P I RGB R i ,G i ,B i , C I RGB R i -1,G i -1,B i -1 + C I RGB R i -1,G i ,B i + C I RGB R i ,G i -1,B i otherwise. +C I RGB R i ,G i ,B i -1 -C I RGB R i -1,G i -1,B i -C I RGB R i -1,G i ,B i -1 -C I RGB R i ,G i -1,B i -1 + P I RGB R i ,G i ,B i , ( 37
) we can save time and compute all possible R i , G i , and B i in (L 3 ).

Previous Works

In this section, we present two histogram equalization methods directly related to our proposed methods. These methods are particularly important because we borrowed some ideas from them when implementing the methods proposed in this chapter. Note that all the histogram equalization methods described in this chapter work in three phases: 1) they compute the histograms of the image; 2) they compute the probability density and distribution functions of the image from the histograms; and 3) they enhance the image through histogram equalization.

The process carried out to compute the histogram of the image is the same in all methods. With a single scan throughout the image we can compute 1D, 2D, or 3D histograms, according to the definitions given in Section 4.1.

The second phase, where the probability density and distribution functions are calculated, strongly depends on the dimensions of the probability functions used for the method. It is well known that a typical color image has its R, G, and B color channels neither full correlated nor totally independent distributed. Hence, the dimension (i.e., 1D, 2D, or 3D) of the probability density and distribution functions of the images used for the methods has a great impact on the quality of enhanced images and on the time complexity of the methods. In this respect, whereas some methods take into account only the red, green, and blue channels separately (calculating 1D histograms), others consider the correlation among these channels two at-a-time, or even consider the three of them all together.

Regarding the third phase (the histogram equalization itself), the methods can follow very specific rules to achieve it. The classical method processes the 1D histograms separately, and then employs the equalized histograms to enhance the image. Other methods process the image pixel by pixel, using an iterative process, in a way that the histogram of the output enhanced image has a uniform distribution, i.e., it is equalized.

In the next subsections, we recall the classical 1D histogram equalization method. We then show the 3D histogram equalization method proposed by [START_REF] Trahanias | Color image enhancement through 3-d histogram equalization[END_REF]. This latter method presents important concepts which will be then incorporated into our methods, described later in Section 4.3.

Classical 1D Histogram Equalization Method

In Section 3.2.1, we described the classical histogram equalization method for enhancing monochromatic images. This classical method can be extended and also applied to enhance color images. However, as the extended version of this method uses a completely different set of notations, in this section we recall what was presented in Section 3.2.1, but using a notation which is more suitable for color images. We focus the description of the method on red images, and then extend it to green and blue images. Putting together these definitions in red, green, and blue images, we can perform histogram equalization on the RGB color space.

The histogram equalization method for red images is described as follows. Let I R and O R be the red input and output images, or the original and equalized images, respectively. Let H I R (histogram), P I R (probability density function), and C I R (cumulative probability density function) be defined as in Section 4.1. The computation of the histogram and the probability functions of the input image constitute the first two phases of the method. Hence, let H O R be the desired uniform histogram of the output image, where any level R o of H O R has the same amount of pixels, i.e.,

H O R Ro = 1 L (m × n), ( 38
)
or the same density (i.e., probability), i.e.,

P O R R o = 1 L . ( 39
)
Thus, the cumulative probability density function

C O R is defined in function of R o as: C O R R o = 1 m × n Ro r o =0 H I R r o = Ro r o =0 P I R r o = R o + 1 L . ( 40
)
The third phase consists of computing the equalized histogram from the cumulative density function of the input image, and then equalizing the image. The R o output equalized level corresponding to the input level R i is obtained as the one that minimizes the difference between

C O R R o and C I R R i .
In practice, the output level R o for the input level R i is computed by the transformation function

T I R (R i ), i.e., R o = T I R (R i ) = (L -1) × C I R R i , (41)
where

(L -1) × C I R R i
stands for the nearest integer to ((L -1) × C I R R i ) ∈ R. This transformation function was named single mapping law (SML) in [START_REF] Zhang | Improving the accuracy of direct histogram specification[END_REF]. In this same work, a general mapping law (GML) was also proposed with the purpose of improving the accuracy of a uniform histogram specification. Nonetheless, in this work, we use the SML, i.e., Equation 41, because it is simpler and faster to compute.

To generate the output enhanced image with this transformation, for any pixel (x, y) ∈ X mn , we obtain the output value O R (x, y) as

R o = T I R (R i ), where R i = I R (x, y).
This method can be easily extended for color image contrast enhancement by applying separately the equalization process described above to the images I R , I G and I B . This extended method presents a well-known problem: it produces unrealistic colors, since it is not hue-preserving [START_REF] Naik | Hue-preserving color image enhancement without gamut problem[END_REF]. Note that this method has (max(m × n, L)) and (L) time and space complexities, respectively. From now on, we refer to this extended method as the classical 1D histogram equalization method, i.e., C1DHE method.

3D Histogram Equalization Method

In this section, we describe the method proposed by [START_REF] Trahanias | Color image enhancement through 3-d histogram equalization[END_REF], which takes into account the correlation of the three color channels, R, G, and B, simultaneously. It is described as follows.

Let I RGB and O RGB be the input and output color images. Let H I RGB , P I RGB , and C I RGB be as defined in Section 4.1. Let H O RGB be the uniform histogram of the output image, where any entry (R o , G o , B o ) has the same amount of pixels, once such output histogram is desired, i.e.,

H O RGB Ro,Go,Bo = 1 L 3 (m × n), ( 42
)
or the same density, i.e.,

P O RGB R o ,G o ,B o = 1 L 3 . ( 43
)
Hence, any entry

(R o , G o , B o ) in C O RGB is computed using P O RGB , i.e., C O RGB Ro,Go,Bo = R o ro=0 G o go=0 B o b o =0 P O RGB ro,go,bo = R o r o =0 G o g o =0 B o bo=0 1 L 3 = (R o + 1)(G o + 1)(B o + 1) L 3 . ( 44
) Note that C O RGB R o ,G o ,B
o can be directly obtained by its own values, i.e., R o , G o , and B o . To yield the output enhanced image, for every input pixel (x, y) ∈ X mn , where

(R i , G i , B i ) = I RGB (x, y), we obtain the smallest (R o , G o , B o )
for which the inequality:

|C I RGB R i ,G i ,B i -C O RGB Ro,Go,Bo | ≥ 0, (45) holds.
However, this process of calculating the output image presents an ambiguity, mainly because there are many solutions for (R o , G o , B o ) which satisfy Equation 45. This ambiguity is remedied as follows. The computed value of

C I RGB at (R i , G i , B i ) is initially compared to the value of C O RGB at (R o , G o , B o ). If C I RGB is greater (resp. less) than C O RGB , then the indexes R o , G o ,
(R o , G o , B o ) is the output entry to the corresponding input (R i , G i , B i ), i.e., if (x, y) ∈ X mn and (R i , G i , B i ) = I RGB (x, y), then O RGB (x, y) = (R o , G o , B o ).
From now on, we call the [START_REF] Trahanias | Color image enhancement through 3-d histogram equalization[END_REF] 3D method as TV3DHE method. Note that the TV3DHE method has (max(m × n × L, L 3 )) and (L 3 ) time and space complexities, respectively.

Note that the methods discussed in this section have drawbacks that make them not suitable for real-world and real-time applications. Whereas the C1DHE method is not hue-preserving, the TV3DHE method is neither hue-preserving nor complies with realtime application requirements.

The Proposed Methods

In this section, we present a generic method which, in contrast with the methods presented in the previous section, is both hue-preserving and has time and space complexities which complies with real-world and real-time applications. We propose two variants from the generic method, which are characterized by the histograms dimension used to estimate the 3D probability functions, i.e., 1D or 2D histograms -making the variant point of the generic method to be the probability function estimation phase.

Generic Hue-preserving Histogram Equalization Method

In this section, we present our generic method which, as the other ones, is divided in three phases. Initially, let I and O be the input and output images, respectively. Let the input #D histograms and probability functions be defined as in Section 4.1, where # is the histogram dimension used (this is the variant point of our method). Although the proposed method works with #D histograms, we do not equalize the #D histograms per say, but a 3D pseudo-histogram, i.e., H I RGB . The H I RGB definition is based on a pseudo 3D cumulative density function, built through probability density functions.

The computation of this cumulative density function, C I RGB , which constitutes the second phase of our method, is performed as the product of the three #D cumulative density functions for any entry (R i , G i , B i ). We show in details the variant methods in Section 4.3.2 and 4.3.3.

The third phase works as follows. Unlike the method described in Section 4.2.2, which iteratively increased or decreased the values of R o , G o , and B o in order to minimize Equation 45, we propose to find the output triplet (R o , G o , B o ) for any image pixel, in a single step, i.e., [START_REF] Abdou | Quantitative design and evaluation of enhancement/thresholding edge detectors[END_REF]. Thus, from Equations 44 and 45, we have:

C I RGB R i ,G i ,B i - (R o + 1)(G o + 1)(B o + 1) L 3 = 0. (46)
If we take R o , G o and B o as R i + k, G i + k and B i + k, respectively, where k would be the number of iterations required for minimizing Equation 45, we obtain:

k 3 + k 2 [R i + G i + B i ]+ k[R i × G i + R i × B i + G i × B i ]+ R i × G i × B i -L 3 × C I RGB R i ,G i ,B i = 0, (47)
where R i , G i , and

B i mean R i + 1, G i +
+ k , G i + k , B i + k ),
where k stands for the nearest integer to k ∈ R. Equation 47 can be easily solved by the methods proposed in [START_REF] Nickalls | A new approach to solving the cubic: Cardan's solution revealed[END_REF] and [START_REF] Cardano | Artis magnae, sive de regulis algebraicis[END_REF] apud [START_REF] Nickalls | A new approach to solving the cubic: Cardan's solution revealed[END_REF]. The former method is faster and mathematically simpler than the latter, which uses transcendental functions. Based on their complexities, in this work, we use the [START_REF] Nickalls | A new approach to solving the cubic: Cardan's solution revealed[END_REF]'s method.

Observe that any image pixel is enhanced following a shift transformation by a k factor, i.e., from

(R i , G i , B i ) to (R o , G o , B o ) = (R i + k , G i + k , B i + k ),
which makes our generic method hue-preserving [START_REF] Naik | Hue-preserving color image enhancement without gamut problem[END_REF].

Having described this generic method, the next subsections show our variant methods, which differ only on the used histogram dimension. By respecting the chronology's conception of our method, the method based on RG, RB, and GB 2D histograms [START_REF] Menotti | Color image enhancement throught 2D histogram equalization[END_REF] (from now on HP2DHE method), is firstly described in Section 4.3.2. Then, the method based on 1D histograms [START_REF] Menotti | A fast hue-preserving histogram equalization method for color image enhancement using a bayesian framework[END_REF] (from now on HP1DHE method) is presented in Section 4.3.3.

Hue-preserving 2D Histogram Equalization Method

In this section, we present our HP2DHE method which was initially introduced in [START_REF] Pontes Melo | Realce de imagens coloridas através da equalização de histogramas 2D[END_REF] and after in [START_REF] Menotti | Color image enhancement throught 2D histogram equalization[END_REF]. It uses 2D histograms (as defined in Section 4.1) and is based on the joint probability distribution function of channels two at-a-time to perform the histogram equalization.

The cumulative probability density function (or the probability distribution function), C I RGB , is then computed as the product of the three 2D joint probability distribution functions for any entry

(R i , G i , B i ), i.e., C I RGB R i ,G i ,B i = C I RG R i ,G i × C I RB R i ,B i × C I GB G i ,B i . ( 48
)
The main rationale for computing this pseudo-cumulative probability density function as the product of three 2D cumulative functions is that the three color channels in an image are usually not simultaneously correlated.

Note that, in [START_REF] Menotti | Color image enhancement throught 2D histogram equalization[END_REF], we proposed to solve Equation 45 iteratively, as done in [120] (TV3DHE method), by using a non hue-preserving transformation. Here, we modify the method originally proposed in [START_REF] Menotti | Color image enhancement throught 2D histogram equalization[END_REF] to use the hue-preserving shift transformation and the solution of Equation 45 described in the previous subsection. These two modifications make the HP2DHE method presented here hue-preserving, and reduces its initial time complexity from (max(m × n × L, L 2 )) to (max(m × n, L 2 )).

Hue-preserving 1D Histogram Equalization Method

In this section, we present a hue-preserving histogram equalization method based on the RGB color space for image contrast enhancement, which uses 1D histograms, and is also a variant of the generic method described in Section 4.3.1. The method is based on the independence assumption of color channels, which is used for computing the cumulative density function. We use 1D histograms to estimate a 3D probability distribution function, and then equalize the conceived histogram through the estimated probability function.

Hence, the function C I RGB is estimated for every entry (R i , G i , B i ) as the product of every probability distribution function

C I R R i , C I G G i , and C I B B i , following the rule, i.e., C I RGB R i ,G i ,B i = C I R R i × C I G G i × C I B B i . ( 49
)
Note that, in Equation 49 (the one of HP1DHE method), C I RGB is defined with a correct dimensional meaning, i.e., C I RGB , a 3D cumulative function, is computed as the product of three 1D cumulative probability distribution functions, while in Equation 48(the one of HP2DHE method) C I RGB is defined with a wrong dimensional meaning, i.e., C I RGB is computed as the product of three 2D joint probability distribution functions. Nevertheless, the images processed by the HP2DHE method produce similar results to the HP1DHE method, as the experiments reported in the next chapter (Section 5.2) will show.

As we use 1D histograms, this method has the time complexity greater than the HP2DHE method, i.e., (max(m × n, L)), and the space complexity is linear, i.e., (L).

Moreover, the time and space complexities of HP1DHE are exactly the same of the C1DHE method, which are the best to our knowledge for color image contrast enhancement through histogram equalization.

Complexity Analysis

In this section, we present an analysis of the space and time complexities of the histogram equalization methods described in this chapter, including our proposed method (i.e., its variants). As explained before, histogram equalization methods work in three main phases: 1) histogram computation; 2) probability density and distribution (or cumulative density) functions computation; 3) image contrast enhancement through histogram equalization. We firstly discuss the time complexity of these methods in each of these three phases.

The first phase is computed with a single scan throughout the image, and hence it has

(m × n) time complexity.
The second phase depends on the dimension histograms used. The probability functions for 1D histograms can be computed in (L). By using recursive definitions presented in Section 4.1, one can compute the probability functions for 2D, and 3D histograms in (L 2 ) and (L 3 ), respectively. Hence, it is confirmed that the time complexity of this second phase is dependent on the dimension of the histograms.

In the third phase, the image is processed pixel by pixel, i.e., (m × n). The C1DHE method, however, before processing each image, performs a preprocessing in (L) to compute lookup tables, i.e., it computes the transformation function in Equation 41only once for each level of each channel R, G, and B. The TV3DHE method executes an iterative process for each pixel in the image, and has (L) time complexity for each one. Note that TV3DHE method can perform (3(L-1)) steps in the worst case, since it gives one unitary step at-a-time in only one of the three channels. Whilst the C1DHE method preprocesses a look-up table in order to perform the histogram equalization in (1) for any image pixel, our methods have no preprocessing and they perform the third phase in (1) for any image pixel as well. However, solving the cubic equation described in Equation 47is computationally heavy, making the total run-time performance of our methods worst than the C1DHE one. Table 4.1 summarizes the time complexity of the methods. Now, we discuss the space complexity of the methods presented in this chapter. The space complexity of the methods depends totally on the used histograms dimension, e.g., (L), (L 2 ), or (L 3 ). That is, our HP1DHE and the C1DHE methods have linear space complexity with respect to the number of discrete levels, i.e., (L), whilst our HP2DHE and the TV3DHE methods have quadratic and cubic space complexity, i.e., (L 2 ), (L 3 ), respectively. One remark is that the HP1DHE and HP2DHE methods have (max(m × n, L)) and (max(m × n, L 2 )) time complexities, respectively. And they are linear and quadratic for space complexity, i.e., (L), (L 2 ), respectively. Hence, such time and space complexities comply with real-time application requirements.

Probabilities (L) (L 3 ) (L 2 ) (L) Equalization (M [mn, L]) (mn × L) (mn) (mn) Total (M [mn, L]) (M [mn × L, L 3 ]) (M [mn, L 2 ]) (M [mn, L])
Note that as the term m× n on the time complexity expression is much more important than the second one9 , on a run-time comparison the methods have similar performance, as will be further illustrated in the next chapter. Observe that especial attention for the run-time of the methods with respect to the image dimension is given in the next chapter in the experiments and is presented in Section 5.2.3.

Conclusions

In this chapter, we have introduced and described two new hue-preserving histogram equalization methods based on the RGB color space for image contrast enhancement. In next chapter, we present the experiments for the methods proposed in this chapter and in Chapter 3.

5.

Experiments

This section reports the results of experiments performed to evaluate the methods introduced in Chapter 3 and 4, and it is divided in two parts. Section 5.1 reports the results concerning the gray-level image contrast enhancement methods introduced in Chapter 3, whereas Section 5.2 presents the results related to the color image contrast enhancement methods proposed in Chapter 4.

Multi-Histogram Equalization Methods for Graylevel Image Contrast Enhancement and Brightness Preserving

In this section, we report results of experiments comparing our proposed methods in Chapter 3 (Section 3.3) with the other HE methods described in Section 3.2 and the method proposed in [START_REF] Wang | Brightness preserving histogram equalization with maximum entropy: A variational perspective[END_REF]. The input images used in the experiments were the ones previously used in [START_REF] Kim | Contrast enhancement using brightness preserving bi-histogram equalization[END_REF], [START_REF] Wang | Image enhancement based on equal area dualistic sub-image histogram equalization method[END_REF], [START_REF] Chen | Minimum mean brightness error bi-histogram equalization in contrast enhancement[END_REF], [START_REF] Chen | Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation[END_REF], and [START_REF] Wang | Brightness preserving histogram equalization with maximum entropy: A variational perspective[END_REF]. They are named as they were in the works where they first appeared: arctic hare, bottle, copter, couple, Einstein, F16, girl, hands, house, jet, U2, woman (girl in [START_REF] Wang | Brightness preserving histogram equalization with maximum entropy: A variational perspective[END_REF]). Images were extracted from the CVG-UGR database [21] and provided by the authors of [START_REF] Chen | Minimum mean brightness error bi-histogram equalization in contrast enhancement[END_REF] and [START_REF] Chen | Contrast enhancement using recursive mean-separate histogram equalization for scalable brightness preservation[END_REF]. Table 5.1 shows the number of sub-images automatically obtained by the methods MWCVMHE and MMLSEMHE (i.e., the value of the parameter k -see Section 3.3.3), represented by the columns l m and l mm , respectively. These values were obtained using the threshold criterion for weighting the constant ρ with the value 0.8 (as done in [START_REF] Yen | A new criterion for automatic multilevel thresholding[END_REF]). In practice, our methods take less than 50 milliseconds to find the number k, decompose and enhance an image of 1024 × 1024 pixels on a Pentium IV -2GHz 10 . Remember that the time complexity of these methods are upper-bounded by the step of finding the optimal thresholds which has (kL 2 ) time complexity. To start our analysis, for each image, we compute the brightness (i.e., the mean) and contrast (i.e., the standard deviation) of the original and the output images obtained by the HE methods. Moreover, in order to assess the appropriateness of the processed images for consumer electronics products, we compute the P SN R (Peak Signal-to-Noise Ratio) measure [START_REF] Rabbani | Digital Image Compression Techniques[END_REF] as well, i.e.,

Multi-Histogram Equalization Methods for Gray-level Image Contrast Enhancement and Brightness Preserving 72

P SN R = 10 × log 10 (L -1) 2 M SE , (50)
where

M SE = 1 m × n m-1 x=0 n-1 y=0 |I(x, y) -O(x, y)| 2 , ( 51
)
and I(x, y) and O(x, y) stand for the level of point (x, y) in the input and output (processed/enhanced) images, respectively.

In the image processing literature, the P SN R has been used as a standard measure to evaluate and compare compression and segmentation algorithms [START_REF] Rabbani | Digital Image Compression Techniques[END_REF]. It is well-known that a processed image with good quality (with respect to the original one) presents P SN R values within 30 dB and 40 dB [START_REF] Rabbani | Digital Image Compression Techniques[END_REF].

The values of brightness, contrast, and P SN R obtained for each image are presented in Tables 5.2, 5.3 and 5.4. These tables are divided into three parts: 1) the names and the data of original images (for the P SN R table, the values of original images are constant, i.e., ∞); 2) the data values obtained by the Uni-, Bi-HE, and [START_REF] Wang | Brightness preserving histogram equalization with maximum entropy: A variational perspective[END_REF]'s methods, i.e., HE, BBHE, DSIHE, MMBEBHE, and BPHEME; 3) the values obtained by the MHE methods, i.e., RMSHE (r = 2), and our proposed MWCVMHE and MMLSEMHE methods. In Tables 5.2 and 5.3, we firstly compare the data values (image brightness and image contrast, respectively) of each of the 8 processed images with the original image and highlight in gray the best results in parts 2 (i.e., Uni-, Bi-HE, and [START_REF] Wang | Brightness preserving histogram equalization with maximum entropy: A variational perspective[END_REF]) and 3 (i.e., MHE) of the table. In a second step, we compare the best values in parts 2 and 3 of the tables against each other (i.e., Uni-, Bi-HE, and [START_REF] Wang | Brightness preserving histogram equalization with maximum entropy: A variational perspective[END_REF]'s methods against MHE methods). The best value is dark-grayed, the worst light-grayed.

Let us first analyze the results in Table 5.2, regarding the brightness of the original and the processed images. By observing the absolute difference between the value of the brightness in the original and processed images (i.e., the brightness preservation), we state that: 1) the images produced by our proposed methods are better in preserving the brightness of the original images in 8 out of 12 images; 2) even though our methods are not always the best brightness preserving ones, their resulting brightness is always very close to the brightness of the original images; 3) the MMLSEMHE method has shown to be more robust than the MWCVMHE method in terms of brightness preservation.

We perform a similar analysis to the one performed in Table 5.2 in Table 5. [START_REF] Andrews | Image processing by digital computer[END_REF]. By observing the contrast values, we state that: 1) the DSIHE method produces the best image contrast enhancement in 10 out of 12 images, losing only twice for the classical HE method; 2) the RMSHE method (with r = 2 -four sub-images) presents the best image contrast enhancement among the MHE methods in 10 out 12 images, losing only twice for our MWCVMHE method; 3) the MMLSEMHE method produces the smallest image contrast enhancement -this is the price to pay to obtain at the same time image contrast enhancement, brightness preserving, and natural looking images. Nonetheless, as will be shown in a further visual analysis of images, the images produced by the MMLSEMHE method are the best ones regarding the natural look.

Finally, we analyze the data presented in Table 5.4. In Table 5.4, the best values of P SN R are highlighted in gray. Let us recall that the greater the value of the P SN R, the better it is. Looking at these figures, we observe that the images processed by the MMLSEMHE method produces the best P SN R values, as they are within the range [30dB, 40dB]. Based on this result we argue that the MMLSEMHE method performs image contrast enhancement, preserves the brightness and also produces images with a natural looking. Moreover, this result corroborates, in practice, our hypothesis that the MMLSEMHE method, using the discrepancy function in Equation 26, yields image with the best P SN R values among all the HE methods.

Once the images were analyzed considering their brightness, contrast, and P SN R, we performed an image visual assessment. One remark is that all the 12 input images, their histograms, their respective enhanced images and equalized histograms (obtained by all the methods listed in Tables 5.2, 5.3, and 5.4), adding up more than 200 images, can be seen at Internet in [START_REF] Menotti | NPDI repository: Test images of multi-histogram equalization methods for gray-level image contrast enhancement[END_REF]. Here we present an analysis of 3 images: girl, Einstein, and arctic hare.

Figure 5.1 shows the resulting images obtained by the BPHEME method [START_REF] Wang | Brightness preserving histogram equalization with maximum entropy: A variational perspective[END_REF] and our proposed ones for the girl's image. Note that the output images obtained by Bi-HE and the RMSHE methods for the girl's image can be observed at Figure 3 (i.e., RMSHE (with r = 2), MWCVMHE, and MMLSEMHE methods) are able to generate natural looking images and still offer contrast enhancement. Figure 5.2 shows the Einstein and the resulting images obtained by the MHE methods, i.e., RMSHE (with r = 2), MWCVMHE, and MMLSEMHE. By observing the processed images, it is noticeable that our proposed methods are the only ones among the MHE methods that can produce images with a natural looking. Let us recall that the other methods are worse than MHE methods for producing natural looking images.

Figure 5.3 shows the images obtained by applying the MHE methods to the image arctic hare. We chose this picture because it shows that, even though the image contrast produced by our methods is sometimes limited, they can enhance particular and interesting parts of an image. Observe that on the upper right corner of the images, we can perceive contrast enhancement. Nonetheless, the RMSHE (with r = 2) and MWCVMHE methods generate better enhancement on that region than the MMLSEMHE method.

After analyzing the data presented in Tables 5.2, 5.3, and 5.4 and visually observing some processed images, we conclude that: 1) the MMLSEMHE method produces images with better quality than the other methods with respect to the P SN R measure; 2) nonetheless, a better image contrast enhancement can be obtained by the MWCVMHE method, which also presents satisfactory brightness preserving and natural looking images; 3) the RMSHE method (with r = 2) should be employed when better contrast enhancement than the one offered by the MMLSEMHE and MWCVMHE methods is desired. However, in this case, the processed image may present some annoying and unnatural artifacts (for instance Figure 5.2b).

Histogram Equalization Methods for Color Image Contrast Enhancement based on the RGB

Color Space 80

Histogram Equalization Methods for Color Image Contrast Enhancement based on the RGB Color Space

In this section, a comparison among our proposed HE methods for color images and the ones described in Section 4.2 is carried out. Firstly, we show how difficult is to use a subjective assessment to compare the visual quality of two images: the beach and the train. After, we define objective measures to compare quantitatively the quality of the yielded images and the contrast improvement obtained for the processed images. Finally, a run-time analysis of the HE methods for color contrast enhancement images is performed.

Subjective Evaluation: An attempt

In this section, we visually compare the processed images to the original ones, in order to assess the quality of the processed images. The main goal is highlight how delicate it is to evaluate subjectively enhanced images. Figure 5.4 shows the results for the beach image. Note that unrealistic colors are present in the image generated by the C1DHE method (Figure 5.4b). The image produced by the TV3DHE method (Figure 5.4c) is overenhanced, or more specifically, it is undersaturated 11 . In turn, the image produced by our HP2DHE method (Figure 5.4d) is more realistic than all the others. However, from another viewpoint, which considers the application in which the methods are used, we can say that the output image of the TV3DHE method has better quality than the others. This is because the water region in this particular image (Figure 5.4c) was better enhanced. Despite these arguments, we can say that our HP1DHE method generates an image (Figure 5.4e) with a good balance between non undersaturated (no bright colors) and realistic colors.

Figure 5.5 shows the results for the second image, the train. We observe that the TV3DHE method produces an undersaturated image (Figure 5.5c), as it did for the beach image. The images produced by our methods (Figure 5.5d and Figure 5.5e) are more real than the one obtained by the TV3DHE method. However, some hidden details in dark regions continue to be uncleared. In our opinion, the best enhancement is achieved by the image produced by the C1DHE method (Figure 5.5b). This is because the image produced by the C1DHE method presents colors which are more realistic for the green regions, and have more details than those produced by the other three methods. However, again, note that in the sky portion of the image unrealistic colors are produced by the C1DHE method.

From the discussion above, we claim that our methods produce images (Figures 5.4d, 5.4e, 5.5d, and 5.5e) with the best trade-off between the saturated colors and quality preservation (i.e., realistic images). That is, our methods produce images with colors that are more realistic than the C1DHE (which is not hue preserving), and the images are not so saturated as the ones produced by the TV3DHE method. Nonetheless, we notice from the experiments just reported that it is difficult to assess the quality of an enhanced image using only a subjective measure. Ideally, a more objective and quantitative evaluation should be performed, allowing us to draw more clear and solid

Objective Evaluation

As noticed above, it is imperative to evaluate the image quality yielded by the HE methods quantitatively, since subjective evaluation can be very application-dependent and not always conclusive. Hence, here, we use quantitative measures to assess the quality of original and processed images produced by the methods described in Section 4.2 and ours (presented in Section 4.3), and then perform an objective comparison among them. We also evaluate the contrast improvement by comparing the processed images to the original one.

The measures used for comparing the methods are defined in Section 5.2.2.1. The numerical results obtained through these quantitative measures in a data set of 300 images taken from the Berkeley University [START_REF] Martin | A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics[END_REF] are analyzed and discussed in Section 5.2.2.2.

Measures for Assessing Color Images Quality and Contrast

This section describes two types of measures that can be used to evaluate color images: a color image quality measure and a measure of contrast as defined bellow. The defined color image quality measure (CIQM) [START_REF] Yendrikhovskij | Perceptually optimal color reproduction[END_REF][START_REF] Yendrikhovskij | Optimizing color reproduction of natural images[END_REF] is composed by the color image naturalness and colorfulness indexes (two psycho-physical measures defined according to the human vision system), and is used to verify if the HE methods preserve the quality of the images. These measures are based on the CIELUV color space, and are described as follows.

The naturalness is the degree of correspondence between human perception and the reality of the world. Based on assumptions experimentally proved, the CIE a * b * or CIE u v planes are roughly divided into four privileged segments: achromatic, orange-yellow, yellow-green and blue. The naturalness index is suggested to be computed as the sum of the naturalness indexes of the privileged segments, weighted by the number of pixels within a privileged segment. In turn, the naturalness index of a privileged segment is defined as a Gaussian density function of the difference between the apparent color of the segment and the prototypical color of that segment category. The colorfulness presents the color vividness degree. The colorfulness index can be computed as a linear function of the average saturation of the image and its standard deviation.

The naturalness and colorfulness indexes can be computed for every image without any other additional information, such as a reference image, being provided. Hence, by using these quantitative measures based on the human vision system, we can compare the performance of various histogram equalization methods for color image contrast enhancement without any subjective evaluation.

In order to define the CIQM, we firstly calculate the color naturalness index (CN I) and the colorfulness index (CCI). These two indices are defined in the CIELUV color space [START_REF] Yendrikhovskij | Perceptually optimal color reproduction[END_REF]. Note that even though the conversion required for computing the CIQMs are said to be standard, essential implementation details are no clear in [START_REF] Yendrikhovskij | Perceptually optimal color reproduction[END_REF].

According to [START_REF] Yendrikhovskij | Perceptually optimal color reproduction[END_REF], the first index, the CN I, is computed as follows:

1. Converting the image from the RGB color space to the CIELUV color space. This is done by first converting the image from the RGB color space to the XY Z one (using

D
  ×   d(R) d(G) d(B)   , (52)
where

d(K) = ((K + 0.055)/1.055) 2.4 , if K > 0.04045 K/12.92, otherwise. (53)
Having the image in the XY Z color space, we convert it to the CIELUV one, i.e.,

L * = 116(Y /Y n ) 1/3 -16, if Y /Y n > 0.008856 903.3(Y /Y n ), otherwise, (54)
u * = 13L * (u -u n ), (55)
v * = 13L * (v -v n ), (56)
where u = (4X)/(X + 15Y + 3Z), 4. Defining three kinds of pixels according to hue value (H * uv ): 25 -70 is called "skin" pixels, 95 -135 is called "grass" pixels, and 185 -260 is called "sky" pixels, following [START_REF] Yendrikhovskij | Perceptually optimal color reproduction[END_REF]'s psychophysic studies. Note that saturation and hue values are defined based on polar coordinates, and the hue varies from 0 to 360 degrees (see Figure 5.6).

) v = (9Y )/(X + 15Y + 3Z), (57
= arctan(v * /u * ), (59)
S * uv = C * uv /L * = (u * ) 2 + (v * ) 2 /L * . ( 60

5.

Computing the average saturation values for "skin" S skin , "grass" S grass , and "sky" S sky pixels, i.e.,

S skin = p∈skin S * uv (p) n skin , ( 61
)
S grass = p∈grass S * uv (p) n grass , ( 62
)
S sky = p∈sky S * uv (p) n sky . ( 63
)
where n skin , n grass , and n sky stand for the number of "skin", "grass", and "sky" pixels.

6. Computing local CN I values for "skin" N skin , "grass" N grass , and "sky" N sky pixels: The "skin", "grass", and "sky" segments derived from the naturalness judgments of the colors from [START_REF] Yendrikhovskij | Perceptually optimal color reproduction[END_REF]'s work, where the "skin", "grass", and "sky" segment centers are represented by a circle, a square, and a triangle, respectively, and the ellipses stand for standard deviations of a Gaussian approximation to subject's responses. Data are shown in the CIELU V color space and this painting presents a window of the CIELU V color space, where the segments are inside a triangle.

N skin = exp(-0.5((S skin -0.763)/0.524) 2 ), 12 (64)
N grass = exp(-0.5((S grass -0.810)/0.528) 2 ),

N sky = exp(-0.

) 67
Note that the conversion described above is in low level of detail such that the numerical results presented in this section can be easily reproduced.

Our second index, the CCI, can be easily computed as:

CCI = µ S * uv + σ S * uv , (68)
where µ S * uv and σ S * uv stand for the mean and standard deviation of the saturation in CIELUV (S * uv ), defined in Equation 60, respectively. Having calculated these two indexes, we define the color image quality measure Q in terms of CN I and CCI, i.e.,

Q = wCN I + (1 -w)CCI/CCI max , ( 69
)
where the weighting parameter w is set to 0.75 as suggested in [START_REF] Yendrikhovskij | Perceptually optimal color reproduction[END_REF], and CCI max is set to 2.8396 following the maximum CCI value found in our experiments. This first measure shows us the quality of both the original and the processed images in terms of color.

The second measure is the image contrast, and is defined as follows. Let us firstly define the regional standard deviation of the luminance, i.e.,

L α σ (x, y) = x+W p=x-W y+W q=y-W (L α (p, q) -L α µ (x, y)) 2 (2W + 1) 2 , ( 70
)
where

L α µ (x, y) = 1 (2W + 1) 2 x+W p=x-W y+W q=y-W L α (p, q), (71)
L α stands either for the luminance L * in the CIELUV color space (defined as in Equation 54), or for the luminance in the RGB color space, which is defined as the average of the three channels R, G and B, i.e., L RGB = (R i + G i + B i )/3, and the parameter W is setup to 24 (i.e., blocks of 49 × 49 pixels as in [START_REF] Jobson | The statistics of visual representation[END_REF]).

From here, we define the overall contrast of an image by the mean of the regional standard deviations of the luminance [START_REF] Jobson | The statistics of visual representation[END_REF]. This measure provides a gross measure of the regional contrast variations, and it has been used by [START_REF] Huang | Image enhancement based on the statistics of visual representation[END_REF] as a measure of contrast in gray-level images.

Note that we define the contrast for the luminance in both the CIELUV and RGB color spaces. In the CIELUV color space it is done because it is where the color quality image measure is defined, and in the RGB color space, it is because our method work here. We do that to highlight that the HE methods improve the contrast for the luminance in both color spaces, as the analysis of the results, in the next section, will confirm.

Computational Results

This section presents and discusses the numerical results obtained by using the metrics described in the previous section to evaluate the two proposed methods (HP1DHE and HP2DHE) and the others described in Section 4.3 (C1DHE and TV3DHE) in a data set composed of 300 images.

We compute, for both the original and the processed images, the contrast in both the CIELUV and RGB color spaces, as described in Equation 70. We also compute the CIQMs, as described in Equations 67, 68 and 69. Tables 5.5, and 5.6 show these data. Note that the values in both tables are presented in the form µ ± σ, i.e., the mean and standard deviation obtained from the data set of 300 images. All images used and produced in this experiment can be seen in [START_REF] Menotti | NPDI repository: Test images of fast hue-preserving histogram equalization methods for color image contrast enhancement[END_REF]. 5.5 shows the contrast in both the CIELUV and RGB color space for the original and processed images. From this table, we observe that the images processed by our methods, i.e., HP1DHE and HP2DHE, have the value of the contrast increased, in average, about 50% in both the CIELUV and RGB color space, showing that our methods produce a significant improvement in the image contrast. The values of the contrast of images processed by the C1DHE method increase in a similar fashion. In contrast, the TV3DHE method is the one which increases the least the contrast. One remark is that, in general, the improvement of the value of contrast in the CIELUV color space is proportional to the one in the RGB space (the range of the CIELUV luminance is [0, 100] and the RGB luminance is [0, 255] (with L = 256)). Confirming what we had hypothesized in the previous section, the HE methods increased the contrast in both color spaces. From this first analysis, we state that our methods and the C1DHE are effective in yielding significant increasing in the value of images contrast.

Table 5.6 shows the Q, CN I, and CCI measures for the original and processed images. Note that the first numerical column in this table reports the Q measure values, which are a weighting function of the CN I and CCI measures. We observe that, in average, the images processed by our methods have preserved the values of Q in the processed images close to the value in the original ones. This means that our methods produce images with quality similar to the original images. Also note that the images enhanced by the C1DHE method have obtained similar Q values to the ones obtained by our methods. In contrast, the images produced by the TV3DHE method have Q values quite smaller than the ones calculated from the original images. This shows that the TV3DHE method yields images with deteriorated color quality.

On the second numerical column of Table 5.6, we have the values for the CN I measure. Observe that, in average, our methods and the C1DHE keep the naturalness of the On the third numerical column of Table 5.6, we report the values for the CCI measure. Observe that the CCI measure is based on the mean and standard deviation of the saturation of the image in the CIELUV color space. The results reported show that, in average, the C1DHE method is the one that more frequently increases the value of the CCI measure from the original to the processed images. It achieves such result because it equalizes the three R, G, and B 1D histograms freely and separately. On the other hand, the C1DHE method has the well-known drawback of not being hue-preserving, which will be discussed and illustrated further in this section. The images produced by the TV3DHE method, in average, do not preserve both the CN I and CCI values and, consequently the Q value, close to the values of the original images. The fact that the TV3DHE method produces images with CCI values quite different from the ones in the original images corroborates the hypothesis previously subjectively stated in Section 5.2.1 (and in [START_REF] Menotti | Color image enhancement throught 2D histogram equalization[END_REF][START_REF] Menotti | A fast hue-preserving histogram equalization method for color image enhancement using a bayesian framework[END_REF]) that the TV3DHE method produces overenhanced/undersaturated images. That is, in general, the saturation values of the images produced by the TV3DHE method are smaller than the saturation values of the images produced by the other methods, and so are their variances.

From the analysis regarding the contrast and the CIQMs, we claim that: 1) the contrast of the images processed by our HP1DHE and HP2DHE methods is in average 50% greater than the contrast of the original images, whilst the color quality, measured by the naturalness and colorfulness indexes, of the processed images are close to the ones of the original image; 2) the TV3DHE method is the one that shows the smaller improvement on the contrast of the original image. Moreover, it produces images overenhanced, deteriorating the color quality of the images; 3) the results achieved for contrast enhancement and color quality preservation by the C1DHE method are as good as our methods.

Besides the good results that our numerical analysis attributed to the C1DHE method, the C1DHE is not suitable for real-world applications because the images produced by it do not preserve the hue of the original image. As a result, the images produced by the C1DHE method may have unnatural colors, even though the CN I, CCI and, consequently, Q, indicate that the images produced by the C1DHE method have image color quality close to the ones of the original images. These contradictory results show that the CQIMs used in this work have a drawback. They can quantitatively represent the color quality of a image by means of the naturalness and colorfulness indexes, but they do not take into account simultaneously the original and processed images in such assessment. Note that we could perform changes in the TV3DHE method in order to make it faster and hue-preserving, by applying our shift-hue-preserving transformation. Nonetheless, even after these modifications, the images enhanced by the TV3DHE method would continue to be overenhanced and the contrast improvement would not be significant.

In order to exemplify the conclusions reached here, we will carefully analyze one example of an image extracted out of the 300 presented in the database, named landscape. Table 5.7 shows the contrast and the CN I, CCI, and Q values for the original and pro-cessed landscape images in Figure 5.7. Figure 5.7b shows the landscape image processed by the C1DHE method, and highlights the fact that it is not hue-preserving. We observe that the colors present in the image in Figure 5.7b look unnatural with respect to the original image in Figure 5.7a, even though the CN I, CCI, and Q values of the processed image is close to the ones in the original image. We can also observe that the image produced by the TV3DHE method in Figure 5.7c is overenhanced, i.e., the colors are undersaturated, as explained before in this section. Moreover, we can see that the increase in the value of the image contrast produced by the TV3DHE method is the smallest among the compared methods, as shown in Table 5.7.

Finally, the claims about our methods are verified in the images in Figures 5.7d and 5.7e and confirmed in Table 5.7. As observed, the images have their contrast value increased in average 50%, while their color quality measures values are kept close to the ones of the original images. Furthermore, note that our methods are hue-preserving.

Run-time Analysis

In this section, we analyze the run-time behavior of the C1DHE, TV3DHE, HP1DHE, and HP2DHE methods with respect to the image dimension, in order to confirm the time complexity of the methods as exposed in Section 4.4. Other factors that affect the runtime of the methods are also analyzed. Nonetheless, in the experiments of this section, we consider the number of levels of each channel constant, i.e., L = 256.

In order to perform this analysis, we build a setup as follows. We select three images (the train, beach, and landscape), and reshape and resize each one of them in seven different image dimensions, starting from 128 × 128 pixels, and increasing by a multiplicative factor of 2 up to 1024 × 1024 pixels, i.e., 128 × 128, 256 × 128, 256 × 256, 512 × 256, 512 × 512, 1024 × 512, and 1024 × 1024. We end up with twenty one images to be used for run-time analysis of the four methods.

In order to collect unbiased run-times, we randomly select and run each one of these images ten times as input for each method. Table 5.8 shows the average run-time measured to run the images for the methods. Note that the time for loading and saving the image files are also take into account. One remark is that the standard deviation data is not included in Table 5.8, since this data tends to zero and it is insignificant to the analysis performed.

Although the C1DHE method is in average about five times faster than ours, note that it is not hue-preserving. In contrast, our HP1DHE and HP2DHE methods are, in average, seven times faster than the TV3DHE method. These last two statements are based on a linear regression on the data presented in Table 5.8. Note that, in average, our methods enhance images of 512 × 512 pixels in about 100 milliseconds on a Pentium 4 -2GHz. This run-time complies with real-time applications. Figure 5.8 shows the run-time curves of the four methods built based on the data in Table 5.8. As we can observe, the slant (i.e., the angular coefficient) of the TV3DHE curve is much bigger than the others. This fact can be explained by the slow, iterative and not hue-preserving third step of the TV3DHE, i.e., the histogram equalization step -(3(L -1)).

Also observe that the linear coefficient of the run-time curves of the methods based on 1D and 2D histograms (our HP1DHE and HP2DHE methods and the C1DHE one) is much lower than the one based on 3D histograms (TV3DHE method). This difference is clearly explained by the cost of storing/computing the 3D histograms.

In order to highlight the difference among the run-time curves of the methods based on 1D and 2D histograms, Figure 5.9 shows the run-time curves of the C1DHE, HP1DHE, and HP2DHE methods. We note that the computational time of the HP2DHE method is slightly more expensive than the HP1DHE one. This is because the HP2DHE method uses 2D histograms instead of 1D histograms -this is the only difference on the implementation of these methods. In the graph of Figure 5.9, it is clear that the C1DHE method is faster than ours. Nonetheless, once more, note that the C1DHE is not hue-preserving.

Conclusion

In this chapter, we firstly showed results of experiments regarding the multi-histogram equalization methods for gray-level image contrast enhancement. These experiments showed that our methods are better on preserving the brightness of the processed image (in relation to the original one) and yielding images with natural appearance, at the cost of contrast enhancement. These experiments bring two major contributions to the current literature: 1) an objective comparison among all the HE studied methods using quantitative measures, such as the P SN R, brightness, and contrast; 2) an analysis showing the boundaries of the HE technique and its variations (i.e., Bi-and Multi-HE methods) for contrast enhancement, brightness preserving, and natural appearance.

In the second part of this chapter, we presented experiments regarding the histogram equalization methods for color image contrast enhancement. We firstly performed an subjective assessment on the quality of the processed images with respect to the original one, which was not conclusive. After, we evaluated the processed images objectively by using measures of contrast, naturalness, and colorfulness on a database composed of 300 images, such that a quantitative comparison could be performed. The analysis of the experiments showed that the value of the contrast of the images produced by our methods is in average 50% greater than the original value. Simultaneously, our HP1DHE and HP1DHE methods keep the quality of the image in terms of naturalness and colorfulness close to the quality of the original image. The same results are achieved by the C1DHE method. However, this classical method does not preserve the hue and produces images that are not realistic with respect to the original image. Finally, we performed a runtime analysis confirming the time and space complexities of the methods for color image contrast enhancement.

In the next chapter, we point out the conclusions of this work.

6.

Conclusion and Future Work

This work has presented two new methodologies for image contrast enhancement through histogram equalization. The main motivation to use methods based on histogram equalization to improve contrast in images was their simplicity and appropriateness for real-time applications [START_REF] Woods | Real-time digital image enhancement[END_REF][START_REF] Reza | Realization of the contrast limited adaptive histogram equalization (clahe) for real-time image enhancement[END_REF]. Whereas the first type of proposed methods is suitable for gray-level images, the second type can be applied to color images. The gray-level multi-histogram equalization methods, introduced in Chapter 3, differ from other methods previously proposed in the literature in one major point. They segment the image into several sub-images based on discrepancy functions borrowed from the multi-thresholding literature, instead of using image statistical features. As showed by experiments reported in Section 5.1, the proposed methods are successful in enhancing the contrast of images while preserving their brightness and avoiding the appearance of unnatural artifacts. Furthermore, although the proposed methods used a more sophisticated technique to decompose the original image than the other methods described in this thesis, they are still fast and, consequently, suitable to be applied to real-time problems.

The fast hue-preserving histogram equalization methods for color image contrast enhancement, proposed in Chapter 4, also showed to be able to produce images with colors which are more realistic than the ones produced by methods which are not hue-preserving. Besides, the output images were also not as saturated as the ones produced by other histogram equalization methods that we have compared them to.

We also performed an objective and quantitative evaluation of the output images using measures based on human vision system, such as the naturalness and the colorfulness indexes. The motivation for doing that was that subjective assessment carried out to judge the quality of the color images produced by contrast enhancement methods is not very effective. Indicating subjectively the best method over all the compared ones is not a straightforward task.

It is important to note that, to the best of our knowledge, this is the first work to evaluate histogram equalization methods with a well-known database of 300 images by using measures such as naturalness and colorfulness. In this section we present future work as possible extensions of this thesis.

Polar Color Spaces

The histogram equalization method for color images proposed in Chapter 4 is based on the RGB color space. However, the RGB color space is not the only one which can be used when working with images. There is a set of color spaces called polar spaces. Polar spaces, introduced in the late seventies [START_REF] Smith | Color gammet transform pairs[END_REF], are transformations of the RGB color space, and include the HSV (hue, saturation, value) color space -also known as HSB (hue, saturation, brightness), and the HSL (hue, saturation, lightness/luminance) color space -also known as HLS or HSI (hue, saturation, intensity). The main difference between the HSL and the HSV color spaces is that the brightness of a pure color is equal to the brightness of white, whereas the lightness of a pure color is equal to the lightness of a medium gray-level.

Polar spaces are often used by artists instead of the RGB color space because it is often more natural to think about a color in terms of hue and saturation, instead of in terms of additive or subtractive color components. With this in mind, we plan to develop a method for image contrast enhancement using the polar color space. This method would also be based on histogram equalization techniques, as the two other methods proposed in this work.

However, note that the polar spaces were not conceived neither for processing purposes nor for the current computing facilities. For this reason, these color spaces are not coherent with the theory of synthesis of colors (Newton's Disk) [START_REF] Newton | Theory about light and colors[END_REF]. In other words, these colors spaces are not able to perform image processing transformations such that coherent colors are yielded (e.g., according to the Newton theory of synthesis, summing up the colors red and blue should result in the color magenta). Hence, [START_REF] Serra | Morphological segmentations of colour images[END_REF] proposed L1 -L2 norms to correct this problem, and make the polar color spaces adequate to perform color transformations.

Recently, [START_REF] Angulo | Morphological colour operations in totally ordered lattices based on distances: Application to image filtering, enhancement and analysis[END_REF] started analyzing the impact of these corrections proposed by [START_REF] Serra | Morphological segmentations of colour images[END_REF] while performing image contrast enhancement through spatial smoothing using morphological operators. In future work, we also propose to make a similar analysis to the one of [START_REF] Angulo | Morphological colour operations in totally ordered lattices based on distances: Application to image filtering, enhancement and analysis[END_REF], but using histogram equalization methods. The main motivation for doing this is to verify the impact of the correction on polar color spaces when applied to color image contrast enhancement.

Color Quality Measures

The drawbacks pointed out in Chapter 5, regarding the proposed color quality measures, should be considered for future work. We plan to modify the current measures by taking into account the original and processed images simultaneously, in order to define new measures of color image quality measure.

Postscript

During the doctorate period, the student has worked in parallel on other research subjects. Some of them are briefly shown in the followings.

1D Component Tree in Linear Time and Space and its Application to Gray-Level Image Multithresholding

The upper-weighted sets of a signal are the sets of points with weight above a given threshold. The components of the upper-weighted sets, thanks to the inclusion relation, can be organized in a tree structure, which is called the component tree. In [START_REF] Menotti | 1d component tree in linear time and space and its application to gray-level image multithresholding[END_REF], we present a linear time and space algorithm to compute the component tree of one-dimensional signals.

From this algorithm we derive an efficient gray-level image multithresholding method, which is based on the hypothesis that objects which appear on an image can be represented by salient classes present in the histogram of this image. These classes are modelled as the most significative components of the histogram's component tree, where the importance corresponds to the volume attribute. We show results of the proposed method and compare it with classical methods.

Segmentation of Envelopes and Address Block Location

Although nowadays there are working systems for sorting mail in some constrained ways, segmenting gray-level images of envelopes and locating address blocks in them is still a difficult problem. Pattern Recognition research has contributed greatly to this area since the problem concerns feature design, extraction, recognition, and also the image segmentation if one deals with the original gray-level images from the beginning.

The problem consists of segmenting and locating the address block in postal envelopes. The aim is to automatically separate in postal envelopes the regions related to background, stamps, rubber stamps, and the address blocks. We worked with three different approaches for solve the problem.

The first one is based on statistical hypothesis testing and feature selection in the wavelet space [START_REF] Menotti | Segmentation of envelopes and address block location by salient features and hypothesis testing[END_REF][START_REF] Menotti | Segmentação de envelopes postais para localizacao do bloco endereco: uma abordagem baseada em seleção de características no espaco Wavelet[END_REF][START_REF] Menotti | Segmentation of postal envelopes for address block location: an approach based on feature selection in wavelet space[END_REF][START_REF] Menotti | Salient features and hypothesis testing: Evaluating a novel approach for segmentation and address block location[END_REF]. First, a typical image of a postal envelope is decomposed using Mallat algorithm and Haar basis. High frequency channel outputs are analyzed to locate salient points in order to separate the background. A statistical hypothesis test is taken to decide upon more consistent regions in order to clean out some noise left. The selected points are projected back to the original gray-level image, where the evidence from the wavelet space is used to start a growing process to include the pixels more likely to belong to the regions of stamps, rubber stamps, and written area.

We also proposed two other approaches which are based on fractal dimension [START_REF] Luiz | Postal envelope address block location by fractal-based approach[END_REF][START_REF] Luiz | Envelope address block segmentation through fractal-based approach[END_REF][START_REF] Luiz | Segmentation of envelope address blocks through fractal-based approach[END_REF] and lacunarity [START_REF] Facon | Lacunarity as a texture measure for address block segmentation[END_REF]. These approaches are variants of the first approach on the feature selection step, i.e., instead of using the wavelet space, we use fractal dimension and lacunarity as features to solve the problem.

We evaluate all these works by a pixel to pixel accuracy measure [START_REF] Menotti | A quantitative evaluation of segmentation results through the use of ground-truth images: an application to postal envelope segmentation[END_REF] using a ground truth database composed of 200 real images with different layouts and backgrounds. The success rate for address block location which has been reached is over 90%.

Statistical Hypothesis Testing and Wavelet Features for Region Segmentation

In [START_REF] Menotti | Statistical hypothesis testing and wavelets features for region segmentation[END_REF], we introduce a novel approach for region segmentation. In order to represent the regions, we devise and test new features based on low and high frequency wavelet coefficients which allow to capture and judge regions using changes in brightness and texture. A fusion process through statistical hypothesis testing among regions is established in order to obtain the final segmentation. The proposed local features are extracted from image data driven by global statistical information. Preliminary experiments show that the approach can segment both texturized and regions cluttered with edges, demonstrating promising results. Hypothesis testing is shown to be effective in grouping even small patches in the process.

A New Algorithm for Constructing Minimal Perfect Hash Functions

In [11], we present a three-step algorithm for generating minimal perfect hash functions which runs very fast in practice. The first step is probabilistic and involves the generation of random graphs. The second step determines the order in which hash values are assigned to keys. The third step assigns hash values to the keys. We have given strong evidences that the first step takes linear random time and the second and third steps take deterministic linear time. We improve upon the fastest known method for generating minimal perfect hash functions. The total time to find a minimal perfect hash function in a PC computer took approximately 175 seconds for a collection of 20 million keys. The time to compute a table entry for any key is also fast because it uses only two different hash functions that are computable in time proportional to the size of the key. The amount of space necessary to store the minimal perfect hash function is approximately half the space used by the fastest known algorithm.

1. 1

 1 Illustration of HE. (a) Original image. (b) Histogram of the original image. (c) Processed image by the classical HE method [32]. (d) Histogram of the processed image, where the blue line stands for the specified uniform distribution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Brightness shifting and unnatural looking produced by the classical HE. (a) Original image. (b) Histogram of the original image. (c) Processed image by the classical HE method [32]. (d) Histogram of the processed image, where the blue line stands for the specified uniform distribution. The brightness (mean) of the original and processed images are 139.20 and 133.94, respectively. 1.3 Bi-HE methods and still not natural looking images: (a) original image; enhanced images using (a) as input by [51]-(BBHE), [126]-(DSIHE), and [17]-(MMBHEBE) methods are shown in (b), (c), and (d), respectively. . . 1.4 The classical HE method independently applied on each one of the three channel of the RGB color space and the not hue-preserving resulting image. (a) The original and (b) processed images, respectively. . . . . . . . . . . . 3.1 An example illustrates the CHE and Bi-HE methods for image brightness preserving and contrast enhancement may fail when producing natural looking images: (a) original image; enhanced images using (a) as input by CHE, BBHE, DSIHE, RMSHE (r = 2), and MMBHEBE methods are shown in (b), (c), (d), (e), and (f), respectively. . . . . . . . . . . . . . . . . . . . . . 5.1 Results: (b), (c), and (d) are the enhanced resulting images by BPHEME, MWCVMHE (k = 5), and MMLSEMHE (k = 6) methods, respectively, using (a) the girl's image as input. . . . . . . . . . . . . . . . . . . . . . . 5.2 Results for : (a) original image; (b), (c), and (d) are the enhanced resulting images by RMSHE (r = 2), MWCVMHE (k = 6), and MMLSEMHE (k = 7) methods, respectively, using the Einstein image. . . . . . . . . . . . . . . . 5.3 Results for : (a) original image; (b), (c), and (d) are the enhanced resulting images by RMSHE (r = 2), MWCVMHE (k = 5), and MMLSEMHE (k = 7) methods, respectively, using the arctic hare image. . . . . . . . . . . . . . . 5.4 Results for the beach (partial brazilian flag) image: (a) original image; (b) C1DHE; (c) TV3DHE; (d) HP2DHE; (e) HP1DHE. . . . . . . . . . . . . 5.5 Results for the train image: (a) original image; (b) C1DHE; (c) TV3DHE; (d) HP2DHE; (e) HP1DHE. . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6 The "skin", "grass", and "sky" segments derived from the naturalness judgments of the colors from [135]'s work, where the "skin", "grass", and "sky" segment centers are represented by a circle, a square, and a triangle, respectively, and the ellipses stand for standard deviations of a Gaussian approximation to subject's responses. Data are shown in the CIELU V color space and this painting presents a window of the CIELU V color space, where the segments are inside a triangle. . . . . . . . . . . . . . . . . . . . . . . . . . 5.7 Results for the landscape image: (a) original image; (b) C1DHE; (c) TV3DHE; (d) our HP1DHE; (e) our HP2DHE. . . . . . . . . . . . . . . . 5.8 Run-time curves of the C1DHE, TV3DHE, HP1DHE, and HP2DHE methods. 5.9 Run-time curves of the C1DHE, HP1DHE, and HP2DHE methods. . . . .

3. 1

 1 Brightness preserving methods for image contrast enhancement. . . . . . . 4.1 A summary about time complexity of the histogram equalization methods. M [x, y] stands for max(x, y), and mn stands for m × n. . . . . . . . . . . . 5.1 Automatic selection of the number of sub-images -k. . . . . . . . . . . . . 5.2 Image brightness -Mean (µ = L-1 l=0 l × p(l)) . . . . . . . . . . . . . . -µ) × p(l), where µ = L-1 l=0 l × p(l)) . . . . . . . . . . . . . . . 5.4 P SN R = 10 × log 10 [(L -1) 2 /M SE] . . . . . . . . . . . . . . . . . . . . . 5.5 Contrast for the images in the CIELUV and RGB color spaces. . . . . . . 5.6 Color image quality measures. . . . . . . . . . . . . . . . . . . . . . . . . . 5.7 Color image quality and contrast measures for the images in Figure 5.7. . . 5.8 Average run-time in milliseconds for analysis. . . . . . . . . . . . . . . . . .

Figure 1 . 1 :

 11 Figure 1.1: Illustration of HE. (a) Original image. (b) Histogram of the original image. (c) Processed image by the classical HE method [32]. (d) Histogram of the processed image, where the blue line stands for the specified uniform distribution.

Figure 1 . 2 :

 12 Figure 1.2: Brightness shifting and unnatural looking produced by the classical HE. (a) Original image. (b) Histogram of the original image. (c) Processed image by the classical HE method [32]. (d) Histogram of the processed image, where the blue line stands for the specified uniform distribution. The brightness (mean) of the original and processed images are 139.20 and 133.94, respectively.

Figure 1 .Figure 1 . 3 :

 113 Figure 1.3: Bi-HE methods and still not natural looking images: (a) original image; enhanced images using (a) as input by [51]-(BBHE), [126]-(DSIHE), and [17]-(MMBHEBE) methods are shown in (b), (c), and (d), respectively.

Figure 1 . 4 :

 14 Figure 1.4: The classical HE method independently applied on each one of the three channel of the RGB color space and the not hue-preserving resulting image. (a) The original and (b) processed images, respectively.

1 .

 1 The operator sensitivity to the image context; 2. The area of the image covered by the operation;3. The goals of the operation;

34 4 .

 4 The techniques involved in image enhancement.

Definition 3 . 2 (

 32 Level or Intensity) For a point (x, y) ∈ X mn , l = I(x, y) is called the level or intensity of the point (x, y) in I. Definition 3.3 (Sub-Image) Let l s and l f be levels of the image I, where 0 ≤ l s ≤ l f < L. Let I[l s , l f ] ⊆ I be composed by all mappings from points (x, y) ∈ X mn to {l s , l s+1 , ..., l f -1 , l f }, i.e.,

Definition 3 . 5 (

 35 Probability Density Function) Let P I[l s ,l f ] l

  , which is composed by all P I[l s ,l f ] l , is the probability density function of the image I[l s , l f ]. Definition 3.6 (Probability Distribution Function) Let C I[l s ,l f ] l be the probability distribution (or the cumulative probability density) of the level l in the image I[l s , l f ], i.e., C I[ls,l f ] l = 1

  The function C I[ls,l f ] composed by all C I[l s ,l f ] l is the probability distribution function (or the cumulative probability density function) of the image I[l s , l f ]. Definition 3.7 (Brightness) Let I[l s , l f ] be a sub-image of I. We define the mean (or the brightness) of the image I[l s , l f ] as:

) Definition 3 . 8 (

 38 Contrast) Let I[l s , l f ] be a sub-image of I. We define the standard deviation (or the contrast) of the image I[l s , l f ] as:

Figure 3 . 1 :

 31 Figure 3.1: An example illustrates the CHE and Bi-HE methods for image brightness preserving and contrast enhancement may fail when producing natural looking images: (a) original image; enhanced images using (a) as input by CHE, BBHE, DSIHE, RMSHE (r = 2), and MMBHEBE methods are shown in (b), (c), (d), (e), and (f), respectively.

Algorithm 3 . 1 :

 31 Computing Disc(k) and P T (k, L -1)

61 4 .

 4 Fast Hue-Preserving Histogram Equalization Methods Definition 4.5 (1D Probability Distribution Function) Let C I R

  the probability density function of the image I RG . Definition 4.8 (2D Probability Distribution Function) Let C I RG

  the probability density function of the image I RGB . Definition 4.11 (3D Probability Distribution Function) Let C I RGB

63

 63

  and B o are repeatedly increased (resp. decreased), one at-a-time, until Equation 45 is satisfied. The obtained

  .1. By visually inspecting the images on these two figures, we can clearly see that only the MHE methods

Figure 5 . 1 :

 51 Figure 5.1: Results: (b), (c), and (d) are the enhanced resulting images by BPHEME, MWCVMHE (k = 5), and MMLSEMHE (k = 6) methods, respectively, using (a) the girl's image as input.

5. 1 .Figure 5 . 2 :

 152 Figure 5.2: Results for : (a) original image; (b), (c), and (d) are the enhanced resulting images by RMSHE (r = 2), MWCVMHE (k = 6), and MMLSEMHE (k = 7) methods, respectively, using the Einstein image.

Figure 5 . 3 :

 53 Figure 5.3: Results for : (a) original image; (b), (c), and (d) are the enhanced resulting images by RMSHE (r = 2), MWCVMHE (k = 5), and MMLSEMHE (k = 7) methods, respectively, using the arctic hare image.

Figure 5 . 4 :

 54 Figure 5.4: Results for the beach (partial brazilian flag) image: (a) original image; (b) C1DHE; (c) TV3DHE; (d) HP2DHE; (e) HP1DHE.

Figure 5 . 5 :

 55 Figure 5.5: Results for the train image: (a) original image; (b) C1DHE; (c) TV3DHE; (d) HP2DHE; (e) HP1DHE.

) 3 .

 3 Thresholding the L * and S * uv components, where L * values between 20 and 80 and S * uv values over 0.1 are kept.

Figure 5 . 6 :

 56 Figure 5.6: The "skin", "grass", and "sky" segments derived from the naturalness judgments of the colors from[START_REF] Yendrikhovskij | Perceptually optimal color reproduction[END_REF]'s work, where the "skin", "grass", and "sky" segment centers are represented by a circle, a square, and a triangle, respectively, and the ellipses stand for standard deviations of a Gaussian approximation to subject's responses. Data are shown in the CIELU V color space and this painting presents a window of the CIELU V color space, where the segments are inside a triangle.

Figure 5 . 7 :

 57 Figure 5.7: Results for the landscape image: (a) original image; (b) C1DHE; (c) TV3DHE; (d) our HP1DHE; (e) our HP2DHE.

Figure 5 . 8 :

 58 Figure 5.8: Run-time curves of the C1DHE, TV3DHE, HP1DHE, and HP2DHE methods.

Figure 5 . 9 :

 59 Figure 5.9: Run-time curves of the C1DHE, HP1DHE, and HP2DHE methods.

  1. (*) Menotti, D., de Albuquerque Araújo, A., Najman, L., Pappa, G. L. and Facon, J. (2008a). Contrast enhancement in digital imaging using histogram equalization. VII Workshop of Theses and Dissertations on Computer Graphics and Image Processing Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Multi-Histogram Equalization Methods for Gray-Level Images . . . . . Automatic Thresholding Criterium . . . . . . . . . . . . . . . . . . 3.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Fast Hue-Preserving Histogram Equalization Methods . . . . . . . . . . 4.1 Basic Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Previous Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 Classical 1D Histogram Equalization Method . . . . . . . . . . . . 4.2.2 3D Histogram Equalization Method . . . . . . . . . . . . . . . . . . 4.3 The Proposed Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Generic Hue-preserving Histogram Equalization Method . . . . . . 4.3.2 Hue-preserving 2D Histogram Equalization Method . . . . . . . . . 4.3.3 Hue-preserving 1D Histogram Equalization Method . . . . . . . . . 4.4 Complexity Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

	. .
	3.2.1 Classical Histogram Equalization Method (CHE) . . . . . . . . . .
	3.2.2 Brightness Bi-Histogram Equalization Method (BBHE) . . . . . . .
	3.2.3 Dualistic Sub-Image Histogram Equalization Method (DSIHE) . . .
	3.2.4 Minimum Mean Brightness Error Bi-Histogram Equalization Method

(WTDCGPI)

, part of SIBGRAPI'2008, pp. 10, Campo Grande, Mato Grosso do Sul, Brazil. in press.

2. (*) Menotti, D., Najman, L., de Albuquerque Araújo, A. and

Facon, J. (2007b)

.

A fast hue-preserving histogram equalization method for color image enhancement using a bayesian framework. 14th International Workshop on Systems, Signals and Contents 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Organization of the Document . . . . . . . . . . . . . . . . . . . . . . . . . 2 Histogram Specification for Image Contrast Enhancement: An Overview 2.1 Radiometric Scale Transformation . . . . . . . . . . . . . . . . . . . . . . . 2.2 Histogram Specification for Contrast Enhancement of Gray-level Images . . 2.2.1 Non-brightness Preserving Histogram Specification Methods . . . . 2.2.2 Brightness Preserving Histogram Specification Methods . . . . . . . 2.3 Histogram Specification for Contrast Enhancement of Color Images . . . . 2.3.1 Non-Hue-Preserving Histogram Specification Methods . . . . . . . . 2.3.2 Hue-Preserving Histogram Specification Methods . . . . . . . . . . 2.4 3.1 Basic Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (MMBEBHE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.5 Recursive Mean-Separate Histogram Equalization Method (RMSHE) 3.2.6 An Insight on the Results Produced by HE Methods . . . . . . . . 3.3 The Proposed Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 Multi-Histogram Decomposition . . . . . . . . . . . . . . . . . . . . 3.3.2 Finding the Optimal Thresholds . . . . . . . . . . . . . . . . . . . . Contents 3.3.3 5 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Multi-Histogram Equalization Methods for Gray-level Image Contrast Enhancement and Brightness Preserving . . . . . . . . . . . . . . . . . . . . . 5.2 Histogram Equalization Methods for Color Image Contrast Enhancement based on the RGB Color Space . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 Subjective Evaluation: An attempt . . . . . . . . . . . . . . . . . . 5.2.2 Objective Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.3 Run-time Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Conclusion and Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 Polar Color Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.2 Color Quality Measures . . . . . . . . . . . . . . . . . . . . . . . .

Table 3 .

 3 1: Brightness preserving methods for image contrast enhancement.

	Method	Brightness Contrast
	Original	139.20	29.70
	HE	133.94	75.47
	BBHE	162.78	70.09
	DSIHE	131.66	75.42
	RMSHE (r = 2)	139.77	37.81
	MMBEBHE	144.97	68.70

  1, and B i + 1, respectively. By solving this cubic equation in function of k, we obtain the desired output triplet (R o , G o , B o ) as the input one plus the displacement k, i.e., (R i

Table 4 .

 4 1: A summary about time complexity of the histogram equalization methods. M [x, y] stands for max(x, y), and mn stands for m × n.

		C1DHE	TV3DHE method HP2DHE method	HP1DHE
	Histograms	(mn)	(mn)	(mn)	(mn)

Table 5 .

 5 1: Automatic selection of the number of sub-images -k.

	Image	l m l mm
	arctic-hare 5	7
	bottle	6	6
	copter	6	6
	couple	5	6
	Einstein	6	7
	F16	5	7
	girl	5	6
	hands	5	6
	house	6	6
	jet	5	5
	U2	4	4
	woman	6	7

Table 5 .

 5

		MWCVMHE MMLSEMHE	217.96 220.13	78.94 79.08	190.20 190.53	36.54 35.45	110.50 108.64	184.99 178.93	139.46 140.05	41.61 31.63	72.68 71.35	200.75 201.70	32.66 33.55	113.84 113.24
	2: Image brightness -Mean (µ = L-1 l=0 l × p(l))	Image original HE BBHE DSIHE MMBEBHE BPHEME RMSHE (r = 2)	arctic hare 220.89 139.45 199.18 184.76 209.22 222.92 218.05	bottle 78.76 128.35 94.15 97.73 82.36 79.37 81.08	copter 191.44 128.69 174.23 164.47 188.57 192.12 188.43	couple 33.35 129.83 66.47 77.23 49.79 33.96 43.46	Einstein 107.75 128.83 126.99 119.78 108.84 109.00 117.85	F16 179.20 129.42 180.22 163.24 180.24 180.32 180.40	girl 139.20 133.94 162.78 131.66 144.97 145.21 139.77	hands 27.99 179.71 52.99 46.64 46.06 38.36 31.75	house 68.97 129.86 94.00 95.48 70.48 70.74 77.01	jet 201.11 129.33 196.15 174.25 201.51 201.93 200.42	U2 32.51 131.33 49.32 74.21 39.78 33.56 37.06	woman 113.13 128.52 129.07 124.43 114.17 114.12 113.00

Table 5 .

 5

	woman 49.19 73.51 73.62 73.69 66.11 72.80 62.57 52.26 50.69	U2 25.62 72.23 64.58 78.39 50.00 32.14 44.68 36.52 29.63	jet 52.00 74.31 64.71 78.33 54.36 49.70 56.79 57.19 55.92	house 38.25 73.61 75.14 75.55 55.43 59.66 56.84 41.93 39.72	hands 54.36 27.29 60.92 75.80 69.39 21.74 59.90 50.51 54.69	girl 29.70 75.47 70.09 75.42 68.70 74.67 37.81 35.37 31.47	F16 45.12 74.57 67.68 77.40 68.79 62.61 61.08 55.30 46.74	Einstein 37.11 73.56 73.87 73.92 62.33 72.14 57.92 40.05 37.59	couple 31.57 71.81 74.13 79.50 48.46 32.98 53.26 35.83 32.02	copter 40.66 73.90 72.70 76.76 52.52 55.89 52.05 44.85 44.48	bottle 52.07 73.34 73.47 75.70 59.65 63.65 59.12 55.19 54.83	arctic hare 49.07 86.73 71.91 81.29 57.90 34.87 52.76 56.69 49.11	Image original HE BBHE DSIHE MMBEBHE BPHEME RMSHE (r = 2) MWCVMHE MMLSEMHE	3: Image contrast -Global Standard Deviation (σ = L-1 l=0 (l -µ) × p(l), where µ = L-1 l=0 l × p(l))

  and u n and v n are computed using the D 65 white point, i.e., (X n , Y n , Z n ) = (95.047, 100.000, 108.883), based on Equations 57 and 58.

2. Computing the hue (H * uv ) and saturation (S * uv ), i.e., H * uv

Table 5 .

 5 5: Contrast for the images in the CIELUV and RGB color spaces.

	Method	L *	L RGB
	Original	12.53 ± 3.98 31.13 ± 9.90
	C1DHE	18.38 ± 3.78 47.11 ± 9.76
	HP1DHE 18.14 ± 3.71 46.73 ± 9.61
	HP2DHE 18.55 ± 3.91 47.02 ± 10.01
	TV3DHE 13.30 ± 2.89 36.44 ± 7.72
	Table

Table 5 .

 5 6: Color image quality measures. to the one in the original image, whereas the images produced by the TV3DHE method have CCI values significantly smaller than the ones obtained from the original images.

	Method	Q	CNI	CCI
	Original	0.68 ± 0.02 0.81 ± 0.03 0.80 ± 0.12
	C1DHE	0.68 ± 0.01 0.78 ± 0.03 1.03 ± 0.13
	HP1DHE 0.66 ± 0.02 0.78 ± 0.04 0.78 ± 0.07
	HP2DHE 0.67 ± 0.02 0.78 ± 0.04 0.91 ± 0.10
	TV3DHE 0.58 ± 0.02 0.72 ± 0.02 0.49 ± 0.05
	produced images close

Table 5 .

 5 7: Color image quality and contrast measures for the images in Figure 5.7.

	Method	Q	Color Quality CN I CCI	Contrast CIELUV RGB
	Original	0.7038 0.8540 0.7196	7.00	17.03
	C1DHE	0.7681 0.9292 0.8089	12.09	30.32
	HP1DHE 0.7210 0.8725 0.7575	11.50	28.98
	HP2DHE 0.6504 0.7688 0.8381	11.00	27.59
	TV3DHE 0.7140 0.9004 0.4392	8.76	23.68

Table 5 .

 5 8: Average run-time in milliseconds for analysis.

	Image Dimension C1DHE TV3DHE HP1DHE HP2DHE
	128 × 128	4	737	11	20
	256 × 128	8	786	18	28
	256 × 256	10	876	32	41
	512 × 256	15	1049	52	61
	512 × 512	24	1399	95	104
	1024 × 512	38	2068	181	193
	1024 × 1024	66	3272	350	371

CIELUV and CIELAB are two uniform color spaces developed by the Commission Internationale de l'Eclairage -CIE, where L stands for the luminance and A, B, U and V stand for the color channels.

The luminance quantization error can be significantly magnified by the transformation function, leading to distortion in the processed image. For more details, see[START_REF] Naik | Hue-preserving color image enhancement without gamut problem[END_REF].

In[START_REF] Naik | Hue-preserving color image enhancement without gamut problem[END_REF], it is shown that a shift transformation on the RGB color space by the same factor in all three channels is hue-preserving

Histogram Specification for Image Contrast Enhancement

CMOS -complementary metal oxide semi-conductor

The C-Y color space (also called color difference space), composed of luminance (Y ) and chromatic information (R-Y ) and (B-Y ), is implemented as a linear combination of R, G and B channels of the RGB color space. This space is the same as the YIQ one rotated by 33 degrees[START_REF] Martin | Technical Television[END_REF].

The luminance quantization error can be significantly magnified by the transformation function, leading to distortion in the processed image, i.e., the gamut problem[START_REF] Naik | Hue-preserving color image enhancement without gamut problem[END_REF].

YIQ is the color space used by the NTSC color TV system, employed mainly in North and Central America, and Japan. The Y component represents the luminance information (i.e., the luminance), and is the only component used by black-and-white television receivers -the achromatic part of the signal, whereas I and Q stands for in-phase and quadrature, respectively, referring to the components used in quadrature amplitude modulation, which represent the chrominance information.

Multi-Histogram Equalization Methods for Gray-Level Images

Usually we have m × n greater than L and the run-time taken on the third phase, where the term m × n is the only taken into account, is much more heavy

We take into account the loading and storing time of the image file as well.

A processed image is considered undersaturated when its colors are quite brighter than the ones of the original image.

The values 0.763, 0.810, 0.432, 0.524, 0.528 and 0.221 were determined experimentally[START_REF] Yendrikhovskij | Perceptually optimal color reproduction[END_REF].