Preprocessing - Histogram equalization, Thresholding Flashcards

1
Q

What is the problem with low contrast signals?

A

Captured images often have a small dynamic range:
• Allpixelswithinasmallrangeofvalues
• Rangetypicallymuchsmallerthanthecapabilityofthesensor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What das the histogram of a picture show?

A

Histograms show the distribution of intensity values, grouped into bins. (counting)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How is histogram stretching applied?

A

Rescale image intensities fi such that intensities are in (0,255)
1. Problem:
- if f min/max are 0/255, no stretching
(e.g. pictures with very high contrasts in it can’t be stretched)
Solution:
- Use percentiles

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the idea of Histogram Equalization?

A
  • method to improve images with a limited range of values
  • redistribution of intensities
  • based on histograms
  • effectively spreads out the most frequently used intensities
  • goal: image with uniform distribution of intensities

Algorithm

  1. Compute the intensity histogram of a given image 2. Compute its cumulative distribution function
  2. Map the gray value of each pixel:

Resulting image:
• Approximately uniform distribution of the intensity values
• Pixels are spread evenly across the entire range of intensity values
• Highest possible contrast

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the use for Histogram Equalization?

A
  • Straightforward, easy to implement
  • Computationally not expensive
  • Works well for images where both the foreground and the background are dark (or both are bright)
  • Facilitates further detection and analysis in cases where spatial correlation is more important than the intensity values themselves
  • Often produces unrealistic looking images or undesirable effects

• Histogram equalization/stretching can also be applied on color images
• Each channel independently
• ConverttoHSV,applyonlyonVchannel
• When image contains regions that are significantly lighter/darker than most of the image 􏰕
-> contrast in those regions will not be sufficiently enhanced
􏰕-> Adaptive histogram equalization (AHE)
• Transforming each pixel with a transformation function derived from a
neighbourhood region
• Noise might get amplified in near-constant regions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is thresholding?

A

Process of converting a grayscale image of l1 gray levels into one of l2 levels, where l2 ≪ l1, based on threshold values
Binarization:
T(fij)=􏰘 0 if fij≤θ otherwise 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are Bimodal Histograms?

A

Simplest binarization algorithms:
• assume background: one intensity value & object(s) of interest another value
• bimodal histogram due to shading variations:
• histogramwithtwolocalmaxima
• onemaximumforforeground,oneforbackground
• idea: pick a value between two maxima for θ

Algorithm
1. compute the histogram
2. determine the values of p0, μ0, σ0, μ1, and σ1 that best fit the histogram 3. analytically compute θ
Drawbacks:
• computationally very expensive
• may not even fit the data very well
• often the pdfs for the background or the object(s) are not unimodal or not Gaussian

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the Gaussian Mixture Model (GMM)?

A
  • linear combination of Gaussians
  • widely used in pattern recognition
  • approximation of unknown pdfs with a convex combination of Gaussians
  • convex combination: mixture weights sum up to 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the alternative approach in Bimodal Histogram?

A

Alternative, though sub-optimal iterative solution:

  1. choose a threshold θ
  2. estimate μ0 and σ0 from the histogram values x ≤ θ and μ1 and σ1 from the histogram values x > θ
  3. estimate p0 from the number of pixels x ≤ θ
  4. compute an approximation error and adjust θ accordingly
  5. repeat steps 2–4 until the approximation error converges

Optimal threshold
• more general binarization
• quite common to set c0 =μ0 and c1 =μ1
• choose a threshold θ such that ε (loss of information) is minimal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are difficulties with most pictures?

A

difficult to detect the valley bottom precisely due to:
• flat and broad valley bottom
• noise
• extreme differences between the heights of the two peaks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the idea of Otsu’s threshold?

A

Assumption of Otsu’s thresholding
• well-thresholded classes are separated in gray levels
• conversely: threshold giving the best separation of classes in gray levels is the best threshold

  • maximizing the squared distance between the 2 mean values
  • multiplied by the prior class probabilities (favoring equal priors);
  • equivalent to minimizing the within-class variance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the Unimodal histogram heuristic?

A

• common form of gray-value distributions:
only one big dominant mode with smaller ones on one side
• for all practical purposes:
considered approximately a unimodal histogram

Threshold selection:

  1. find the gray value with the highest number of occurrences
  2. get farthest non-zero histogram value of previous peak
  3. connect these two points with a straight line
  4. The threshold θ is the intensity of that point on the histogram that has the maximum perpendicular distance to the line.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the Basic Global Thresholding Algorithm?

A
  1. initialize θ to the average gray value of the image:
    θ= 1/m mSUMi=1 xi
  2. partition the data around θ and compute the mean values μ0 and μ1 for each partition
  3. select the mean of these two means as the new threshold:
    θ = 1/2(μ0 + μ1)
  4. repeat steps 2 and 3 until the mean values μ0 and μ1 do not change in successive iterations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the problem with global threshold methods?

A

• Non-uniform illumination/contrast changes 􏰕

-> Adaptive/local thresholding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is local Thresholding doing?

A

Use global thresholding methods in a local window 􏰕

  • > Window size crucial
  • > Possibly computational expensive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are other alternatives to local Thresholding?

A

Others: use statistics computed locally from window w of size s around pixel i (Niblack, Sauvola)

  1. Apply local contrast equalization method, e.g. CLAHE [1]
  2. Apply global thresholding method