You are on page 1of 25

IMAGE PROCESSING

Caroline Petitjean

PPT5 :
- Intensity transformation
- Contrast enhancement
- Image thresholding
Intensity transformation
• In order to modify the image histogram, one can design
an intensity transformation
• This transformation is defined via a function M:

How many connex objects in this image,


with 4-connexity?
Output image Input image
Intensity transformation
• What does this transformation?
Intensity transformation
• Image inversion (negative)
• Some transformations are applied on the image on the
left. Find the corresponding results!
Gamma correction
• Non linear
transformation:

• F(n) = pow(n,gamma)
Contrast enhancement
• How to enhance the image contrast? Suggest a
transformation.
Histogram stretching
• It consists in an affine transformation of the grey levels, so
that the resulting image leverage the whole intensity range.
Histogram stretching
Histogram stretching
Histogram stretching
Histogram equalization

• The goal of histogram equalization aims at flattening the


histogram as much as possible
Histogram equalization
• Let us compute the cumulated histogram

Histogram
Number of
Original pixels with
image intensity ≤ n

0 255
Cumulated
histogram
Histogram equalization

Histogram
Original
Output grey
image
level

255
Equalized
histogram

0
0 255
Image after
Input grey level
equalization
Transformation
Histogram equalization
Histogram equalization
Other intensity transformation
• What is the output of this transformation ?
Binarization via thresholding
• If I(x,y) > threshold, then It(x,y) = 1
• If I(x,y) <= threshold, then It(x,y) = 0
Thresholding: different thresholds
50
6000
100

150 5000

200
4000

250
3000
300

350 2000

400
1000

450
0
500
0 50 100 150 200 250
550

100 200 300 400 500 600 700

T  64
50
50
T  150
100
100

150
150

200
200

250
250

T  127
300

T  180
300

350
350
50 400
400
50
100 450
450
100
150 500
500
150
200 550
550
200
100 200 300 400 500 600 700 250 100 200 300 400 500 600 700
250
300
300
350
350
400
400
450
450
500
500
550
550
100 200 300 400 500 600 700
100 200 300 400 500 600 700
Image thresholding
• How to chose the threshold
value?

• Manually by analyzing the histogram

• Automatic method to find the minimum


betwwen 2 main peaks (Otsu)
Multiple thresholds
Image thresholding
• What if object and background have mixed grey levels?
Image thresholding
• Global thresholding: one value for the whole image
• Global thresholding is not relevant when background and
object are not homogeneous:
Image thresholding
• Global thresholding: one value for the whole image

• Local thresholding:
• Let’s split the image into sub-images or windows
• Compute one threshold value for each sub-image
• Apply thresholding for each window individually
Local thresholding

global

local

You might also like