midag@unc contrast enhancement: what for ä ce is between the imaging device output and the display...

16
MIDAG@UNC MIDAG@UNC Contrast Enhancement: Contrast Enhancement: What for What for CE is between the imaging device CE is between the imaging device output and the display voltages output and the display voltages Get best perceived intensities to Get best perceived intensities to communicate desired information communicate desired information The choice of an The choice of an intensity intensity mapping function must be made mapping function must be made That is, to do contrast That is, to do contrast enhancement is not the choice; enhancement is not the choice; to do it well is the choice to do it well is the choice

Post on 21-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Contrast Enhancement: Contrast Enhancement: What forWhat for

Contrast Enhancement: Contrast Enhancement: What forWhat for

CE is between the imaging device output and the CE is between the imaging device output and the display voltagesdisplay voltages

Get best perceived intensities to communicate Get best perceived intensities to communicate desired informationdesired information

The choice of anThe choice of an intensity intensity mapping function mapping function must be mademust be madeThat is, to do contrast enhancement is not the That is, to do contrast enhancement is not the

choice; to do it well is the choicechoice; to do it well is the choice

CE is between the imaging device output and the CE is between the imaging device output and the display voltagesdisplay voltages

Get best perceived intensities to communicate Get best perceived intensities to communicate desired informationdesired information

The choice of anThe choice of an intensity intensity mapping function mapping function must be mademust be madeThat is, to do contrast enhancement is not the That is, to do contrast enhancement is not the

choice; to do it well is the choicechoice; to do it well is the choice

Page 2: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

In order to see In order to see the dark areas, the dark areas, the light looks the light looks over exposed.over exposed.

In order to see In order to see the dark areas, the dark areas, the light looks the light looks over exposed.over exposed.

Page 3: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Contrast Enhancement: Contrast Enhancement: Two General StrategiesTwo General StrategiesContrast Enhancement: Contrast Enhancement: Two General StrategiesTwo General Strategies

Optimize information transmission via intensity Optimize information transmission via intensity mappings mappings Histogram as probabilityHistogram as probability Information theoretic argument leads to uniform Information theoretic argument leads to uniform

probability distribution, so histogram flatteningprobability distribution, so histogram flattening Optimize contrast at spatial scales where most Optimize contrast at spatial scales where most

important information on object liesimportant information on object lies Smaller scales are where object boundary info is Smaller scales are where object boundary info is

dominant; at yet smaller scales noise is dominantdominant; at yet smaller scales noise is dominant

Optimize information transmission via intensity Optimize information transmission via intensity mappings mappings Histogram as probabilityHistogram as probability Information theoretic argument leads to uniform Information theoretic argument leads to uniform

probability distribution, so histogram flatteningprobability distribution, so histogram flattening Optimize contrast at spatial scales where most Optimize contrast at spatial scales where most

important information on object liesimportant information on object lies Smaller scales are where object boundary info is Smaller scales are where object boundary info is

dominant; at yet smaller scales noise is dominantdominant; at yet smaller scales noise is dominant

Page 4: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Contrast Enhancement:Contrast Enhancement:TechniquesTechniques

Contrast Enhancement:Contrast Enhancement:TechniquesTechniques

Global vs. LocalGlobal vs. Local GlobalGlobal

Intensity mappingsIntensity mappings Intensity WindowingIntensity Windowing Histogram EqualizationHistogram Equalization

Achieving other histogramsAchieving other histograms

Optimize contrast at boundaryOptimize contrast at boundary Scale decomposition and then magnification of Scale decomposition and then magnification of

components at appropriate scales (e.g., MUSICA)components at appropriate scales (e.g., MUSICA) Unsharp MaskingUnsharp Masking

Global vs. LocalGlobal vs. Local GlobalGlobal

Intensity mappingsIntensity mappings Intensity WindowingIntensity Windowing Histogram EqualizationHistogram Equalization

Achieving other histogramsAchieving other histograms

Optimize contrast at boundaryOptimize contrast at boundary Scale decomposition and then magnification of Scale decomposition and then magnification of

components at appropriate scales (e.g., MUSICA)components at appropriate scales (e.g., MUSICA) Unsharp MaskingUnsharp Masking

Page 5: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Contrast Enhancement:Contrast Enhancement:TechniquesTechniques

Contrast Enhancement:Contrast Enhancement:TechniquesTechniques

Global vs. LocalGlobal vs. Local Locally adaptiveLocally adaptive

Intensity mappingIntensity mapping Adaptive Histogram EqualizationAdaptive Histogram Equalization

Optimize contrast at boundaryOptimize contrast at boundary Geometry-limited diffusionGeometry-limited diffusion

Global vs. LocalGlobal vs. Local Locally adaptiveLocally adaptive

Intensity mappingIntensity mapping Adaptive Histogram EqualizationAdaptive Histogram Equalization

Optimize contrast at boundaryOptimize contrast at boundary Geometry-limited diffusionGeometry-limited diffusion

Page 6: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Intensity WindowingIntensity WindowingIntensity WindowingIntensity Windowing

Dedicate the range of display intensities to a limited Dedicate the range of display intensities to a limited window of recorded intensities.window of recorded intensities.

Moves perceived object boundaries.Moves perceived object boundaries.

Dedicate the range of display intensities to a limited Dedicate the range of display intensities to a limited window of recorded intensities.window of recorded intensities.

Moves perceived object boundaries.Moves perceived object boundaries.

Page 7: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Unsharp MaskingUnsharp MaskingUnsharp MaskingUnsharp Masking

IInewnew = = αα · (G · (Gsmallsmall*I – G*I – Gbigbig*I) + G*I) + Gbigbig*I*I Adds detail to a background image.Adds detail to a background image. Amplifies Mach bands.Amplifies Mach bands.

IInewnew = = αα · (G · (Gsmallsmall*I – G*I – Gbigbig*I) + G*I) + Gbigbig*I*I Adds detail to a background image.Adds detail to a background image. Amplifies Mach bands.Amplifies Mach bands.

MUSICA – Multiple level-of-detail images, MUSICA – Multiple level-of-detail images, combination of which forms result.combination of which forms result.

Page 8: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Unsharp Masking: Intuitive w/r to the Unsharp Masking: Intuitive w/r to the visual systemvisual system

Unsharp Masking: Intuitive w/r to the Unsharp Masking: Intuitive w/r to the visual systemvisual system

Page 9: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Global Histogram EqualizationGlobal Histogram EqualizationGlobal Histogram EqualizationGlobal Histogram Equalization

Theory: Information cleared up is maximized if the Theory: Information cleared up is maximized if the image has maximum uncertainty, i.e. a flat image has maximum uncertainty, i.e. a flat histogramhistogram

Intensities are mapped to their rank in the image.Intensities are mapped to their rank in the image. Does not account for human contrast sensitivity, Does not account for human contrast sensitivity,

which is local.which is local.

Theory: Information cleared up is maximized if the Theory: Information cleared up is maximized if the image has maximum uncertainty, i.e. a flat image has maximum uncertainty, i.e. a flat histogramhistogram

Intensities are mapped to their rank in the image.Intensities are mapped to their rank in the image. Does not account for human contrast sensitivity, Does not account for human contrast sensitivity,

which is local.which is local.

Page 10: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Adaptive Histogram EqualizationAdaptive Histogram EqualizationAdaptive Histogram EqualizationAdaptive Histogram Equalization

Intensities are mapped to their rank in Intensities are mapped to their rank in the contextual region (window).the contextual region (window).

Enhances noise in smooth regionsEnhances noise in smooth regions Correction: limit the slope of the intensity mapping.Correction: limit the slope of the intensity mapping.

Intensities are mapped to their rank in Intensities are mapped to their rank in the contextual region (window).the contextual region (window).

Enhances noise in smooth regionsEnhances noise in smooth regions Correction: limit the slope of the intensity mapping.Correction: limit the slope of the intensity mapping.

Page 11: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Bilateral Filtering: VCD and form Bilateral Filtering: VCD and form systemsystem

Bilateral Filtering: VCD and form Bilateral Filtering: VCD and form systemsystem

Think: form system input to Think: form system input to diffusion process, and diffusion.diffusion process, and diffusion.

Blurs within boundary by using a Blurs within boundary by using a weighting function that is the weighting function that is the product of two Gaussians:product of two Gaussians: Gaussian with a spatial kernel: Gaussian with a spatial kernel:

closer pixels have higher weight. closer pixels have higher weight. Gaussian in the intensity domain: Gaussian in the intensity domain:

higher weights for pixels with similar higher weights for pixels with similar intensities.intensities.

Perona and Malik, 2002Perona and Malik, 2002

Think: form system input to Think: form system input to diffusion process, and diffusion.diffusion process, and diffusion.

Blurs within boundary by using a Blurs within boundary by using a weighting function that is the weighting function that is the product of two Gaussians:product of two Gaussians: Gaussian with a spatial kernel: Gaussian with a spatial kernel:

closer pixels have higher weight. closer pixels have higher weight. Gaussian in the intensity domain: Gaussian in the intensity domain:

higher weights for pixels with similar higher weights for pixels with similar intensities.intensities.

Perona and Malik, 2002Perona and Malik, 2002

Page 12: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Test Question:Test Question:Test Question:Test Question:

Which row(s) show Which row(s) show local histogram local histogram equalization and equalization and which show the which show the global? How does global? How does the difference the difference manifest itself on manifest itself on the spine? the spine?

Which row(s) show Which row(s) show local histogram local histogram equalization and equalization and which show the which show the global? How does global? How does the difference the difference manifest itself on manifest itself on the spine? the spine?

Page 13: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Test Question:Test Question:Test Question:Test Question:

a. The doctors would like to diagnose a renal disorder that a. The doctors would like to diagnose a renal disorder that manifests itself in CT as a slight abnormality in a small manifests itself in CT as a slight abnormality in a small region of the kidney image. region of the kidney image.

1. What kind of techniques may be applicable: list them.1. What kind of techniques may be applicable: list them.

2. If the abnormality is a matter of shape, why would 2. If the abnormality is a matter of shape, why would windowing be a bad idea?windowing be a bad idea?

a. The doctors would like to diagnose a renal disorder that a. The doctors would like to diagnose a renal disorder that manifests itself in CT as a slight abnormality in a small manifests itself in CT as a slight abnormality in a small region of the kidney image. region of the kidney image.

1. What kind of techniques may be applicable: list them.1. What kind of techniques may be applicable: list them.

2. If the abnormality is a matter of shape, why would 2. If the abnormality is a matter of shape, why would windowing be a bad idea?windowing be a bad idea?

ans: contrast enhancement on a small scale. Local ans: contrast enhancement on a small scale. Local techniques are windowing, adaptive histogram techniques are windowing, adaptive histogram equalization and derivatives.equalization and derivatives.

ans: during windowing, isocontours of intensity move in ans: during windowing, isocontours of intensity move in the image. This may distort the perceived shapes in the the image. This may distort the perceived shapes in the image. image.

Page 14: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Test Question:Test Question:Test Question:Test Question:

b. The doctors wish to diagnose a disease that causes distant b. The doctors wish to diagnose a disease that causes distant large areas of the image to slightly change intensities with large areas of the image to slightly change intensities with respect to one another when they are usually identical. respect to one another when they are usually identical. Name a technique that may work to enhance this effect in Name a technique that may work to enhance this effect in the image and why.the image and why.

b. The doctors wish to diagnose a disease that causes distant b. The doctors wish to diagnose a disease that causes distant large areas of the image to slightly change intensities with large areas of the image to slightly change intensities with respect to one another when they are usually identical. respect to one another when they are usually identical. Name a technique that may work to enhance this effect in Name a technique that may work to enhance this effect in the image and why.the image and why. ans: windowing may work. The min and max of the ans: windowing may work. The min and max of the

window could be set so that one area is very dark and the window could be set so that one area is very dark and the other is very bright. The high contrast would be other is very bright. The high contrast would be noticeable to the doctor.noticeable to the doctor.

Page 15: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

That’s It! Thank You.That’s It! Thank You.That’s It! Thank You.That’s It! Thank You.

•Try it outTry it out: fspecial, imfilter, imshow, : fspecial, imfilter, imshow, imhist, histeq, conv2imhist, histeq, conv2

•Matlab example.Matlab example.

•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.

s = double(imread(‘moon.tif'));s = double(imread(‘moon.tif'));s = s/max(max(s));s = s/max(max(s));figure, imshow(s, [min(min(s)) max(max(s))]);figure, imshow(s, [min(min(s)) max(max(s))]);h = fspecial('gaussian', [20 20], 4);h = fspecial('gaussian', [20 20], 4);sb = imfilter(s, h);sb = imfilter(s, h);figure, imshow(sb, [min(min(sb)) max(max(sb))]);figure, imshow(sb, [min(min(sb)) max(max(sb))]);sb = sb/max(max(sb));sb = sb/max(max(sb));sd = s - sb;sd = s - sb;figure, imshow(sd, [min(min(sd)) max(max(sd))]);figure, imshow(sd, [min(min(sd)) max(max(sd))]);news = 4*sd + sb;news = 4*sd + sb;figure, imshow(news);figure, imshow(news);

Page 16: MIDAG@UNC Contrast Enhancement: What for ä CE is between the imaging device output and the display voltages ä Get best perceived intensities to communicate

MIDAG@UNCMIDAG@UNC

Matlab histogram equalizationMatlab histogram equalizationMatlab histogram equalizationMatlab histogram equalization

s = double(imread(‘moon.tif”));s = double(imread(‘moon.tif”));figure, imshow(s, [min(min(s)) max(max(s))]);figure, imshow(s, [min(min(s)) max(max(s))]);x = reshape(s, prod(size(s)),1);x = reshape(s, prod(size(s)),1);[n,y] = hist(x,0:255);[n,y] = hist(x,0:255);n = n/sum(n);n = n/sum(n);cn = cumsum(n);cn = cumsum(n);figure, plot(y,n,y,cn);figure, plot(y,n,y,cn);J = cn(s+1);J = cn(s+1);figure, imshow(J, [min(min(J)) max(max(J))]);figure, imshow(J, [min(min(J)) max(max(J))]);