• No results found

Histogram Transformations: Histogram Equalization & Noise Variance Equalization

N/A
N/A
Protected

Academic year: 2021

Share "Histogram Transformations: Histogram Equalization & Noise Variance Equalization"

Copied!
52
0
0

Loading.... (view fulltext now)

Full text

(1)

Photogrammetry & Robotics Lab

Histogram Transformations:

Histogram Equalization &

Noise Variance Equalization

(2)

Image Histogram

0 255 0 128 0 0 255 0 128 2 5 occurrences

(3)
(4)

Brightness and Contrast

ยงโ€ฏ A transformation that changes the

mean, changes the image brightness

ยงโ€ฏ Analogous for variance and contrast

increasing variance increases contrast

(5)

Can We Compute the

Output Histogram Knowing

the Transformation Function?

(6)

How Do Operators Affect the

Distribution of Intensities?

ยงโ€ฏ Monotonous function

ยงโ€ฏ Histogram of the input image:

ยงโ€ฏ Compute the histogram of the

output image given and

(7)

Transformation of a PDF

a b h (b) b f(a) db da Distribution of b (compute!) must be the same area

(8)

Effect for Monotonous Point

Operator

ยงโ€ฏ The gray โ€œareaโ€ in the interval

is mapped to the interval

ยงโ€ฏ So we have (โ€œarea stays the sameโ€) a b h (b) b f(a) db da

(9)

This leads to

a b h (a) h (b) a b f(a) db da we want to compute

(10)

This leads to

a b h (a) h (b) a b f(a) db da derivative of

(11)

This leads to

a b h (a) h (b) a b f(a) db da first derivative

(12)

This leads to

a b h (a) h (b) a b f(a) db da first derivative function should depend on b, not on a

(13)

Example: Linear Function

ยงโ€ฏ If we have the linear function

ยงโ€ฏ with the first derivative

(14)

Example

ยงโ€ฏ We can directly compute the output

histogram given input and the (linear) transfer function

ยงโ€ฏ Result

ยงโ€ฏ This corresponds to a shift by k and a

(15)

Can We Design Transformations

Such That the Resulting Image

(16)
(17)

Sometimes One Can Barely See

Anything...

(18)

... but a Change in the Intensity

Values Can Help

(19)

Histogram Equalization

How to transform the image so that all intensities are used equally often?

(20)

Histogram Equalization

ยงโ€ฏ Goal: same number of values in

every histogram bin

defined (output)

to be

(21)

Histogram Equalization

ยงโ€ฏ Goal: same number of values in

every histogram bin

(22)

Histogram Equalization

(23)

Histogram Equalization

ยงโ€ฏ How to solve ?

(24)

Histogram Equalization

ยงโ€ฏ The equation

ยงโ€ฏ simplifies to

ยงโ€ฏ with the cumulative .

(25)

Histogram Equalization

ยงโ€ฏ The parameters in

ยงโ€ฏ are typically chosen so that

ยงโ€ฏ This maps the spectrum of intensity

(26)
(27)

Histogram Equalization

ยงโ€ฏ Chose the parameters so that

ยงโ€ฏ From

(28)

Histogram Equalization

ยงโ€ฏ This results in the point operator

(29)
(30)
(31)
(32)

Continuous vs. Discrete Case

continuous (ideal world)

As โ€œflatโ€ as it can get...

(33)

Effect of the Hist. Equalization

ยงโ€ฏ Typically increases the contrast

ยงโ€ฏ Areas of lower local contrast gain

higher contrast

ยงโ€ฏ Distributes the intensities over the

(34)
(35)
(36)
(37)

Variants of Histogram Equal.

ยงโ€ฏ There exist variants of HE

ยงโ€ฏ Adaptive HE (AHE) โ€“ performs HE in

local patches, not the whole image

ยงโ€ฏ AHE has issues in low contrast regions

as it over-amplifies the corrections

ยงโ€ฏ Contrast limited AHE (CLAHE) limits

this over-amplifications in homogeneous regions

(38)
(39)

Noise Variance Equalization

ยงโ€ฏ Intensity measurements are noisy

ยงโ€ฏ Sensor: variance of a measured

intensity depends on the intensity itself (Poisson distribution)

ยงโ€ฏ Goal: adjust the variance of the

intensities to a fixed value

ยงโ€ฏ Useful for statistical analysis of images

(40)

Poisson Distribution

โ€œThe Poisson distribution is a discrete

probability distribution that expresses

the probability of a given number k

of events occurring in a fixed interval

of time and/or space if these events

occur with a known average rate and

independently of the time since the

(41)

Poisson Distribution

(42)

Distribution About the Number

of Incoming Photons

ยงโ€ฏ Poisson distribution

ยงโ€ฏ with

ยงโ€ฏ : avg. number of incoming photons

per second

(43)

Properties of the Poisson Dist.

ยงโ€ฏ Mean and variance are then

ยงโ€ฏ and thus a standard deviation of

(44)

Variance Illustration

photon count photon count impacts the variance

(45)

Noise Variance Equalization

ยงโ€ฏ Consider a proportional relationship

between variance and intensity

(46)

Noise Variance Equalization

ยงโ€ฏ Consider a proportional relationship

between variance and intensity

ยงโ€ฏ Goal: for all intensities

ยงโ€ฏ Variance propagation yields

(47)

Noise Variance Equalization

ยงโ€ฏ We have

ยงโ€ฏ We can rewrite that as

(48)

Noise Variance Equalization

ยงโ€ฏ The equation

ยงโ€ฏ can be solved by integration to

ยงโ€ฏ Choose to obtain

(49)

Noise Variance Equalization

ยงโ€ฏ Thus, we set

ยงโ€ฏ For other variables:

ยงโ€ฏ This means

ยงโ€ฏ Variance equalization yields a square

root function with black=black and white=while

(50)

Noise Variance Equalization

ยงโ€ฏ Result:

ยงโ€ฏ The square root stretches the dark

(51)

Summary

ยงโ€ฏ Image histograms represent the

image intensity distributions

ยงโ€ฏ Point operators to manipulate images

ยงโ€ฏ Designing transformations such

that images have certain properties

ยงโ€ฏ Histogram equalization to obtain a

uniform distribution of intensities

(52)

Slide Information

ยงโ€ฏ The slides have been created by Cyrill Stachniss as part of the

photogrammetry and robotics courses.

ยงโ€ฏ I tried to acknowledge all people from whom I used

images or videos. In case I made a mistake or missed someone, please let me know.

ยงโ€ฏ The photogrammetry material heavily relies on the very well

written lecture notes by Wolfgang Fรถrstner and the

Photogrammetric Computer Vision book by Fรถrstner & Wrobel.

ยงโ€ฏ Parts of the robotics material stems from the great

Probabilistic Robotics book by Thrun, Burgard and Fox.

ยงโ€ฏ If you are a university lecturer, feel free to use the course

material. If you adapt the course material, please make sure that you keep the acknowledgements to others and please acknowledge me as well. To satisfy my own curiosity, please

References

Related documents

Hence, it is very easy to build real time virtual dressing room using suitable algorithms like skin color detection, face detection and lower body detection

The following data were analyzed by two-way analysis of variance (ANOV A) (presence of soil, larval density, and presence of soil x larval den- sity): number of climbers (larvae

Sweetness of sugar is not to the former or growers of sugar cane in Karnataka expected rate at which they are producing cost are not paid by the factories in time .this study

The evolution of the total pharmaceutical market and its different segments (branded OMPs, non-OMP branded and unbranded) were assessed by estimating the compound annual growth

As incremental subtrac- tions were always positive cervical to inflection point and negative incisal to it, the following can be derived: Cervically oriented shifts or errors

Atlantic Canada, located in the extreme north-eastern portion of North America, receives acid precipitation from all major acid emission sources on the eastern part of the

WORLD JOURNAL OF SURGICAL ONCOLOGY Kwak et al World Journal of Surgical Oncology 2013, 11 77 http //www wjso com/content/11/1/77 RESEARCH Open Access Breast cancer after

In addition, F values in wood properties remained relatively higher from the 1st to 25th annual ring from the pith, although F value in ARW rapidly decreased with each increase