Contrast Enhancement: What for CE is between the imaging device output and the display voltages Get best perceived intensities to communicate desired information The choice of an intensity mapping function must be made That is, to do contrast enhancement is not the choice; to do it well is the choice MIDAG@UNC In order to see the dark areas, the light looks over exposed. MIDAG@UNC Contrast Enhancement: Two General Strategies Optimize information transmission via intensity mappings Histogram as probability Information theoretic argument leads to uniform probability distribution, so histogram flattening Optimize contrast at spatial scales where most important information on object lies Smaller scales are where object boundary info is dominant; at yet smaller scales noise is dominant MIDAG@UNC Contrast Enhancement: Techniques Global vs. Local Global Intensity mappings Intensity Windowing Histogram Equalization Achieving other histograms Optimize contrast at boundary Scale decomposition and then magnification of components at appropriate scales (e.g., MUSICA) Unsharp Masking MIDAG@UNC Contrast Enhancement: Techniques Global vs. Local Locally adaptive Intensity mapping Adaptive Optimize Histogram Equalization contrast at boundary Geometry-limited diffusion MIDAG@UNC Intensity Windowing Dedicate the range of display intensities to a limited window of recorded intensities. Moves perceived object boundaries. MIDAG@UNC Unsharp Masking Inew = α · (Gsmall*I – Gbig*I) + Gbig*I Adds detail to a background image. Amplifies Mach bands. MUSICA – Multiple level-of-detail images, combination of which forms result. MIDAG@UNC Unsharp Masking: Intuitive w/r to the visual system MIDAG@UNC Global Histogram Equalization Theory: Information cleared up is maximized if the image has maximum uncertainty, i.e. a flat histogram Intensities are mapped to their rank in the image. Does not account for human contrast sensitivity, which is local. MIDAG@UNC Adaptive Histogram Equalization Intensities are mapped to their rank in the contextual region (window). Enhances noise in smooth regions Correction: limit the slope of the intensity mapping. MIDAG@UNC Bilateral Filtering: VCD and form system Think: form system input to diffusion process, and diffusion. Blurs within boundary by using a weighting function that is the product of two Gaussians: Gaussian with a spatial kernel: closer pixels have higher weight. Gaussian in the intensity domain: higher weights for pixels with similar intensities. Perona and Malik, 2002 MIDAG@UNC Test Question: Which row(s) show local histogram equalization and which show the global? How does the difference manifest itself on the spine? MIDAG@UNC Test Question: a. The doctors would like to diagnose a renal disorder that manifests itself in CT as a slight abnormality in a small region of the kidney image. 1. What kind of techniques may be applicable: list them. ans: contrast enhancement on a small scale. Local techniques are windowing, adaptive histogram equalization and derivatives. 2. If the abnormality is a matter of shape, why would windowing be a bad idea? ans: during windowing, isocontours of intensity move in the image. This may distort the perceived shapes in the image. MIDAG@UNC Test Question: b. The doctors wish to diagnose a disease that causes distant large areas of the image to slightly change intensities with respect to one another when they are usually identical. Name a technique that may work to enhance this effect in the image and why. ans: windowing may work. The min and max of the window could be set so that one area is very dark and the other is very bright. The high contrast would be noticeable to the doctor. MIDAG@UNC That’s It! Thank You. •Try it out: fspecial, imfilter, imshow, imhist, histeq, conv2 •Matlab example. s = double(imread(‘moon.tif')); s = s/max(max(s)); figure, imshow(s, [min(min(s)) max(max(s))]); h = fspecial('gaussian', [20 20], 4); sb = imfilter(s, h); figure, imshow(sb, [min(min(sb)) max(max(sb))]); sb = sb/max(max(sb)); sd = s - sb; figure, imshow(sd, [min(min(sd)) max(max(sd))]); news = 4*sd + sb; figure, imshow(news); •midag.cs.unc.edu •Pizer SM, Hemminger BM, Johnston, “Display of Two Dimensional Images”, in Image-Processing Techniques for Tumor Detection, edited by Strickland. 2002 Marcel Deckker, Basel, Switzerland. ISBN 0-8247-0637-4. MIDAG@UNC Matlab histogram equalization s = double(imread(‘moon.tif”)); figure, imshow(s, [min(min(s)) max(max(s))]); x = reshape(s, prod(size(s)),1); [n,y] = hist(x,0:255); n = n/sum(n); cn = cumsum(n); figure, plot(y,n,y,cn); J = cn(s+1); figure, imshow(J, [min(min(J)) max(max(J))]); MIDAG@UNC