Perfectly Flat Histogram Equalization

Similar documents
Character Segmentation and Recognition Algorithm of Text Region in Steel Images

Constrained PDF based histogram equalization for image constrast enhancement

Image Contrast Enhancement Techniquesbased on Dynamic Range of Histogram

COMPARISON AND ANALYSIS OF VARIOUS HISTOGRAM EQUALIZATION TECHNIQUES

Introduction to Digital Image Processing

Reversible Data Hiding VIA Optimal Code for Image

Contrast Improvement on Various Gray Scale Images Together With Gaussian Filter and Histogram Equalization

Auto-focusing Technique in a Projector-Camera System

Image Segmentation Based on Watershed and Edge Detection Techniques

Global-Local Contrast Enhancement

MULTI ORIENTATION PERFORMANCE OF FEATURE EXTRACTION FOR HUMAN HEAD RECOGNITION

Comparative Study of Linear and Non-linear Contrast Enhancement Techniques

An Information Hiding Scheme Based on Pixel- Value-Ordering and Prediction-Error Expansion with Reversibility

Preserving brightness in histogram equalization based contrast enhancement techniques

Image Error Concealment Based on Watermarking

Computation Method for Evaluation of Surface Fine Structure by Highlight Lines

A derivative based algorithm for image thresholding

Image Enhancement. Digital Image Processing, Pratt Chapter 10 (pages ) Part 1: pixel-based operations

Fast Wavelet-based Macro-block Selection Algorithm for H.264 Video Codec

Digital Image Processing

A Novel Method for Image Enhancement using Median Based Filter

A reversible data hiding based on adaptive prediction technique and histogram shifting

Semi-Automatic Global Contrast Enhancement

Filtering of impulse noise in digital signals using logical transform

Segmentation of Mushroom and Cap Width Measurement Using Modified K-Means Clustering Algorithm

Study of Brightness Preservation Histogram Equalization Techniques

CHAPTER 3 IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

OCR For Handwritten Marathi Script

Lecture 4 Image Enhancement in Spatial Domain

Automatic Segmentation of Semantic Classes in Raster Map Images

Edge Preserving Contrast Enhancement Method Using PCA in Satellite Images

Visible and Long-Wave Infrared Image Fusion Schemes for Situational. Awareness

A New Fast Motion Estimation Algorithm. - Literature Survey. Instructor: Brian L. Evans. Authors: Yue Chen, Yu Wang, Ying Lu.

A NEW FEATURE BASED IMAGE REGISTRATION ALGORITHM INTRODUCTION

Review on Image Segmentation Techniques and its Types

A Study on various Histogram Equalization Techniques to Preserve the Brightness for Gray Scale and Color Images

Implementation and Advanced Results on the Non-Interrupted Skeletonization Algorithm

Image Enhancement: To improve the quality of images

AUTOMATIC LOGO EXTRACTION FROM DOCUMENT IMAGES

AUTOMATED THRESHOLD DETECTION FOR OBJECT SEGMENTATION IN COLOUR IMAGE

Chapter 3: Intensity Transformations and Spatial Filtering

Digital Image Processing, 2nd ed. Digital Image Processing, 2nd ed. The principal objective of enhancement

III. VERVIEW OF THE METHODS

Image Classification Using Wavelet Coefficients in Low-pass Bands

Layout Segmentation of Scanned Newspaper Documents

Image contrast enhancement based on local brightness and contouring artifact improvement for large-scale LCD TVs

Statistical Image Compression using Fast Fourier Coefficients

ADVANCED IMAGE PROCESSING METHODS FOR ULTRASONIC NDE RESEARCH C. H. Chen, University of Massachusetts Dartmouth, N.

Optical Character Recognition (OCR) for Printed Devnagari Script Using Artificial Neural Network

IMAGE DIGITIZATION BY WAVELET COEFFICIENT WITH HISTOGRAM SHAPING AND SPECIFICATION

Global Thresholding Techniques to Classify Dead Cells in Diffusion Weighted Magnetic Resonant Images

PRINCIPAL COMPONENT ANALYSIS IMAGE DENOISING USING LOCAL PIXEL GROUPING

Based on Regression Diagnostics

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

A REVIEW ON HISTOGRAM EQUALIZATION TECHNIQUES FOR IMAGE ENHANCEMENT

Use of Shape Deformation to Seamlessly Stitch Historical Document Images

An Efficient way of Number Plate Alphabets and Numbers Extraction for Security Purpose

COMPARATIVE STUDY OF HISTOGRAM SHIFTING ALGORITHMS FOR DIGITAL WATERMARKING

Stereo Vision Image Processing Strategy for Moving Object Detecting

Kinematic Analysis of Lumbar Spine Undergoing Extension and Dynamic Neural Foramina Cross Section Measurement

A new approach to reference point location in fingerprint recognition

Extraction and recognition of the thoracic organs based on 3D CT images and its application

2D Grey-Level Convex Hull Computation: A Discrete 3D Approach

IMAGE ENHANCEMENT USING FUZZY TECHNIQUE: SURVEY AND OVERVIEW

CONTENT ADAPTIVE SCREEN IMAGE SCALING

Iterative Removing Salt and Pepper Noise based on Neighbourhood Information

Implementation of a Face Recognition System for Interactive TV Control System

Hybrid Algorithm for Edge Detection using Fuzzy Inference System

Defect Inspection of Liquid-Crystal-Display (LCD) Panels in Repetitive Pattern Images Using 2D Fourier Image Reconstruction

Design of Miniaturized Optical Image Stabilization and Autofocusing Camera Module for Cellphones

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

EE795: Computer Vision and Intelligent Systems

A SXGA 3D Display Processor with Reduced Rendering Data and Enhanced Precision

Data Hiding in Binary Text Documents 1. Q. Mei, E. K. Wong, and N. Memon

System Verification of Hardware Optimization Based on Edge Detection

Modified Directional Weighted Median Filter

Segmentation and Modeling of the Spinal Cord for Reality-based Surgical Simulator

Improving Latent Fingerprint Matching Performance by Orientation Field Estimation using Localized Dictionaries

Sampling and Reconstruction

Image Compression Algorithm and JPEG Standard

Detecting Digital Image Forgeries By Multi-illuminant Estimators

Digital Image Analysis and Processing

Digital Image Processing

Extensions of One-Dimensional Gray-level Nonlinear Image Processing Filters to Three-Dimensional Color Space

Reversible Image Data Hiding with Local Adaptive Contrast Enhancement

Image Compression: An Artificial Neural Network Approach

Reversible Blind Watermarking for Medical Images Based on Wavelet Histogram Shifting

Digital Image Processing

Automatically Extracting Manmade Objects from Pan-Sharpened High-Resolution Satellite Imagery Using a Fuzzy Segmentation Method

A 3-D Virtual SPIHT for Scalable Very Low Bit-Rate Embedded Video Compression

COPYRIGHT PROTECTION OF PALETTE IMAGES BY A ROBUST LOSSLESS VISIBLE WATERMARKING TECHNIQUE *

An Edge Based Adaptive Interpolation Algorithm for Image Scaling

A Novel Field-source Reverse Transform for Image Structure Representation and Analysis

A BTC-COMPRESSED DOMAIN INFORMATION HIDING METHOD BASED ON HISTOGRAM MODIFICATION AND VISUAL CRYPTOGRAPHY. Hang-Yu Fan and Zhe-Ming Lu

RESTORATION OF DEGRADED DOCUMENTS USING IMAGE BINARIZATION TECHNIQUE

An Application of Canny Edge Detection Algorithm to Rail Thermal Image Fault Detection

Improved Reversible Data Hiding in Encrypted Images Based on Reserving Room After Encryption and Pixel Prediction

A NEW IMAGE CODE RECOGNIZABLE AT A DISTANCE

A Study of Medical Image Analysis System

Transcription:

Perfectly Flat Histogram Equalization Jacob Levman, Javad Alirezaie, Gul Khan Department of Electrical and Computer Engineering, Ryerson University jlevman jalireza gnkhan@ee.ryerson.ca Abstract In this paper, we present a novel technique for histogram equalization. Histogram equalization (or flattening) is the process of redistributing an input image s grey level values to produce an output image easily analyzed by the human eye. Histogram equalization is primarily utilized in image enhancement. Most of the existing approaches to histogram flattening employ a simple transformation function that defines the resultant grey level value for any given input. We propose a multi-stage histogram equalization algorithm that guarantees a perfectly flat output histogram. Our algorithm consists of three stages, each of which creates an intermediate image. Results have shown that our approach to histogram equalization can result in excellent image enhancement. The benefits of such an algorithm are particularly important in medical applications such as x-ray images. Keywords: Image processing; histogram equalization. 1. INTRODUCTION Medical image analysis and advanced image interpretation techniques are heavily dependent on effective histogram equalization capabilities. Low contrast images are very common in medical applications and greatly benefit from histogram equalization. Histogram flattening is the process by which an algorithm redistributes grey level values so as to better define contrast differences to the user. Histogram flattening aids doctors in interpreting medical images, thus facilitating the diagnosis of ailments. Many approaches to histogram equalization have been developed. One common approach is to use the image s histogram cumulative distribution function (CDF) as a grey level transformation function [1]. This is effectively the discrete integral of the function that represents the histogram. Kim et al. present an approach that is based on the piecewise linear approximation of the CDF [5]. Another technique is a subset of histogram matching. Histogram matching is the process by which one forces an image s histogram to resemble any predefined function. This can be performed by using a transfer function that is comprised of the inverse CDF of the desired histogram and the CDF of the input histogram [3]. If a probability density function is chosen which corresponds to a flattened image, then the histogram matching problem is also an equalization task. Many of the recent developments in histogram flattening involve local histogram equalization. In local histogram flattening, an image is divided into sub-blocks and each sub-block is subjected to a separate histogram equalization process [4, 8, 9]. This method does tend to provide good solutions, but the algorithms can be complicated. Additionally, these algorithms do not ensure that the overall image will be equalized. Stark has proposed a histogram equalization technique that takes user inputs in order to produce various outputs that range from full histogram equalization to no changes at all [7]. Munteanu and Rosa approached this image enhancement problem with genetic algorithms [6]. Our approach involves three distinct phases, each of which produces an intermediate image. After each stage is performed, the intermediate image s histogram is at least as flat as the previous image s histogram. After the final stage the histogram is always perfectly flat. The first phase is concerned with eliminating any spikes in the histogram that are extremely large. The second phase is a form of histogram matching. The final phase is concerned with smoothing the histogram. It is this last stage that guarantees that the image s histogram will appear perfectly flat. Int. Conf. Signal Processing, Pattern Recognition and Applications, June 30-July 2, 2003 pp. 38-42, Rhodes Greece

2. HISTOGRAM FLATTENING The first phase of the algorithm redistributes any major peaks that are found in the input image s histogram. Let target be the desired number of pixels at any given grey level in order to make a perfectly flat histogram. A grey level is eligible for first phase redistribution if there are greater than threshold*target pixels at that given grey level. Threshold is set to 16 by default, but can be set to other values by the user. It should be noted that most standard images (photographs of people or landscapes) will not have any grey levels with a histogram reading this high. However, it commonly applies to medical images such as x-rays. It would typically represent the background black area of the image where no real information is stored. These pixel values are redistributed across all grey levels according to the following equation: pixel ( m, n) = n * 255 / midp (maxp n) * 255 / midp midp = half of the width of the image maxp = the width of the image if n midp otherwise This stage has the effect of creating a gradient from white in the center to black on the left and right sides of the image. For an illustration of this effect on the background please see figure 3. The second phase of the algorithm is a form of histogram matching. The target function is a perfectly flat histogram that only uses 64 out of the total 256 possible grey levels. Thus the target histogram s value at any grey level is defined as: 4 * tgt hist ( p) = 0 if ( p / 4) is in {0,1,2,...} otherwise tgt = image height * image width / 256 This algorithm must construct the transfer function to define the mappings of input to output grey levels. In order to do this, it first constructs the histogram cumulative distribution functions (CDFs) for both the input image and the target histogram. This algorithm selects the transfer function that will minimize the following equation: tgtcdf ( Trans ( r)) incdf ( r) tgtcdf = the CDF of the target histogram incdf = the CDF of the input image Trans( ) = the resultant transfer function r = the set of all grey levels This equation requires the transfer function to be monotonic. The algorithm also requires that the tgtcdf value not be greater than the incdf value by more than half of the distance between the histogram values at r. This section of the algorithm is based on previously developed methods [2]. The final stage of equalization is concerned with smoothing the histogram. Essentially, this algorithm traverses the histogram. Let curcount be the current count of pixels at a given location. If curcount is larger than target, then the algorithm selects curcount-target pixels randomly and moves them to the next grey level location. The selection process prioritizes those pixels originally located at this grey level ahead of those that have been previously moved to the given location. If curcount is smaller than target, then the algorithm selects target-curcount pixels from the closest grey level value that has a pixel count and grey level greater than the current value. To better illustrate this algorithm the pseudocode is provided in figure 1. for(m = number = histogram[m] if(number < target) moverandpixels(m + 1, m, target - number) else 0, m < 256, m + + ) moverandpixels(m, m + 1, number - target) end for Figure 1: Phase 3 Algorithm Here the moverandpixels function moves the number of pixels in the third parameter from the grey level specified by the first parameter to the grey level specified by the second parameter. If there are not enough pixels in the first parameter, the function will move on to the next grey level to complete the operation. Please note that this will never occur in the second call to the function. -39 -

3. RESULTS AND DISCUSSION In histogram equalization it is beneficial to produce output images that are easily analyzed by the human eye. In figure 2 we present the low contrast input medical image of a spine; its histogram is shown in figure 5. Our algorithm produces a visually appealing version of the spine, and is presented in figure 3. The output image s flat histogram is shown in figure 6. We compare our approach with the well-known method of using an image s histogram CDF as the image transfer function. As is common with many histogram equalization techniques, this approach gives the image a washed out look. The output of such an algorithm is given in figure 4 and its resultant histogram is provided in figure 7. All of the algorithms were implemented and tested on a P-II 450 computer in C++. Figure 3: Output Image Our Algorithm Figure 2: Input Image Figure 4: Output Image Comparison - 40 -

Figure 5: Input Histogram Figure 8: Input Image Figure 6: Output Histogram Figure 7: Output Histogram Comparison It is evident from the results that our algorithm performs well with respect to creating a clear contrast enhanced image. This algorithm has been applied to a variety of images and has performed very well. The spine was selected because it shows the effectiveness that such an algorithm has on medical imaging. A medical image of a human skull is provided in figure 8. This example is presented to further illustrate the benefits this algorithm provides to medical imaging. Figure 9 shows the output generated by applying our approach to histogram equalization. Once again, in figure 10, we compare our approach to the common equalization technique outlined above. Figure 9: Output Image Our Algorithm - 41 -

into a 64 grey level flattened image. The smoothing stage is concerned with forcing a perfectly flat shape on the histogram. This approach can greatly improve image contrast, particularly in medical imaging. The example output has shown this algorithm s efficacy. Acknowledgements This research is supported by a grant from NSERC Canada. References Figure 10: Output Image - Comparison Although it is evident from the results displayed that this approach can provide significant benefits for the interpretation of medical images, it should be noted that the algorithm has a tendency to introduce small amounts of distortion in low information areas of the images. This is particularly prevalent in the base of the neck in figure 9. One of the main deficiencies of this algorithm would seem to be its lack of reversibility. Most histogram equalization techniques simply utilize a transfer function for grey level conversion. It is generally thought that since a transfer function is being used, its inverse can be calculated which could then be applied to the output image to restore the original. This concept only applies properly to continuous functions. In a discrete system, a transfer function will typically map two different pixel values to the same location. No discrete inverse transfer function can reverse this effect as there is no information to discern which grey levels were the origins of each output pixel. Admittedly, this lack of reversibility is a minor issue when compared to that of our algorithm; however, most every histogram equalization technique is at least in part irreversible. 4. CONCLUSIONS We propose a novel approach to histogram equalization where the output images are guaranteed to have perfectly flat histograms. The algorithm consists of three main stages: histogram spike redistribution, histogram matching, and histogram smoothing. The spike redistribution stage is concerned with eliminating any abnormally large peaks from the histogram. The matching phase attempts to transform the histogram [1] K. R. Castleman, Digital Image Processing, pp. 91-93, Prentice Hall, Upper Saddle River, NJ, 1996. [2] Documentation > Image Processing Toolbox, http://www.mathworks.com/access/helpdesk/help /toolbox/images/histeq.shtml, March 1, 2003. [3] R. C. Gonzalez, R. E. Woods, Digital Image Processing, pp. 94-102, Prentice Hall, Upper Saddle River, NJ, 2001. [4] Joung-Youn Kim, Lee-Sup Kim, Seung-Ho Hwang, An advanced contrast enhancement using partially overlapped sub-block histogram equalization, IEEE Transactions on Circuits and Systems for Video Technology, pp. 475-484, April 2001. [5] Sang-Yeon Kim, Dongil Han, Seung-Jong Choi, Jong-Seok Park, Image contrast enhancement based on the piecewise-linear approximation of CDF, IEEE Transactions on Consumer Electronics, pp. 828-834, Aug 1999. [6] C. Munteanu, A. Rosa, Towards automatic image enhancement using genetic algorithms, Proceedings of the 2000 Congress on Evolutionary Computation, pp. 1535-1542 vol. 2, July 2000. [7] J. A. Stark, Adaptive image contrast enhancement using generalizations of histogram equalization, IEEE Transactions on Image Processing, pp. 889-896, May 2000. [8] Yu Wang, Qian Chen, Baeomin Zhang, Image enhancement based on equal area dualistic subimage histogram equalization method, IEEE Transactions on Consumer Electronics, pp. 68-75, Feb 1999. [9] Hung-Shung Wong, Jung-Hua Wang, Contrast enhancement based on divided histogram manipulation, IEEE International Conference on Systems, Man, and Cybernetics, pp. 1551-1555 vol.2, Oct 2000. -42 -