Point Operations and The Histogram - PowerPoint PPT Presentation

Loading...

PPT – Point Operations and The Histogram PowerPoint presentation | free to view - id: 1897e9-ZDc1Z



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Point Operations and The Histogram

Description:

Auto focus. Enhancement: Histogram equalization ... Auto-Focus ... Blurred image can be detected by its histogram: Image mean is not affected by blurring. ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 38
Provided by: csHai
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Point Operations and The Histogram


1
Point Operations and The Histogram
Image Processing - Lesson 3
2
Image Operations
  • Pixel Operations
  • Operation depends on Pixel's value.
  • Context free.
  • Operation can be performed on the Histogram.
  • Example
  • Geometric Operations
  • Operation depend on Pixel's coordinates.
  • Context free.
  • Independent of pixels value.
  • Example
  • Spatial Operations
  • Operation depends on Pixel's value and
    coordinates.
  • Context dependent.
  • Binary v.s. Gray-Scale images.
  • Spatial v.s. Frequency domain.
  • Example

3
The Image Histogram
  • Point operations depend on pixels value and can
    be performed on image histogram.
  • Image Histogram
  • Normalized Histogram
  • where N is the total number of pixels in the
    image I.
  • PI(k) defines the probability to get the value k
    in the image I.
  • Accumulated Histogram
  • A(k) is the prob. that a pixel has a value less
    or equal to k
  • Note that A(k)-A(k-1)P(k)

HI(k) pixels with gray-level k
PI(k)H(k)/N
4
Histogram
15000
10000
5000
0
1
2
3
4
5
6
7
8
9
10
gray level
Normalized Histogram
0.25
0.2
0.15
0.1
0.05
0
1
2
3
4
5
6
7
8
9
10
gray level
Accumulated Histogram
1
0.8
0.6
0.4
0.2
0
1
2
3
4
5
6
7
8
9
10
gray level
5
The Image Histogram (Cont.)
PI(k)
1
k
PI(k)
1
0.5
k
PI(k)
0.1
k
6
  • Decreasing the image contrast
  • Increasing the new image average

PI(k)
0.1
k
0.5
PI(k)
0.1
k
PI(k)
0.1
k
7
Histogram properties
  • The image mean
  • The image s.t.d.

mean
std
8
Uses of the Histogram
  • Digitizing parameters
  • Auto focus
  • Enhancement
  • Histogram equalization
  • Histogram stretching
  • Threshold selection
  • Histogram matching

9
Auto-Focus
  • In some optical equipment (e.g. slide projectors)
    inappropriate lens position creates a blurred
    (out-of-focus) image.
  • We would like to automatically adjust the lens.

Demo
10
  • Blurred image can be detected by its histogram
  • Image mean is not affected by blurring.
  • Image s.t.d. is decreased by blurring.
  • Algorithm Adjust lens according the changes in
    the histogram s.t.d.

11
Thresholding
knew
F(k)
255
kold
255
Threshold value
12
Thresholding Value
Original Image
Binary Image
Threshold too high
Threshold too low
13
Segmentation using Thresholding
Original
Histogram
50
75
Threshold 75
Threshold 50
14
Original
Histogram
21
Threshold 21
15
Point Operations
  • A point operation can be defined as a function
  • knewF(kold)
  • F(k) takes any value kold in the source image
    into knew in the destination image.
  • Example knewF(kold)kold10
  • increasing brightness
  • knewF(kold)round(kold0.8)
  • decreasing contrastbrightness

16
Point Operations
  • Simplest case - Linear Mapping

knew
F(k)
q
p
kold
p
q
17
  • If it is required to map the full gray-level
    range (256 values) to its full range - A
    piecewise linear mapping is required

knew
F(k)
255
stretching
kold
255
contraction
18
Clipping Function
  • If most of the gray-levels in the image are in
    u1 u2, the following mapping increases the
    image contrast.
  • What is F(k)?

knew
F(k)
255
kold
u1
u2
255
19
knew
255
F(k)
kold
255
?
20
Applying Point Operations on an image
  • Given a point operation
  • kbF(ka)
  • F(ka) takes any value ka in image A into kb in
    image B.

kb
F(k)
ka
21
Image Statistics (Histograms)
Ia
Ha
Aa
F(k)
Ib
Ab
Hb
Histogram of Ia differs from that of Ib.
22
Is it possible to obtain Hb directly from Ha and
F(k)?
k
kb
F(k)
ka
Hb
Ha
k
23
Is it possible to obtain Ab directly from Aa and
F(k)?
  • Requirement F is an increasing function
  • (F-1 exists).
  • Since F(k) is monotonic, the area under Ha
    between 0 and ka is equal to the area under Hb
    between 0 and kb

k
kb
F(k)
ka
Hb
Ha
k
24
The histogram of image B can be calculated
Ia
Ha
Aa
F(k)
Ib
Ab
Hb
25
If F(k) is not increasing?
  • Requirement F is a non-decreasing function
    (F-1 may/may not exists).

k
kb
F(k)
ka
Hb
Ha
k
26
  • Is it possible to obtain F(k) directly from Ha
    and Hb (Aa and Ab)?

Ia
Ha
Aa
F(k)
Ib
Ab
Hb
27
Example Finding F(k) for Gray Level Separation
Visual discrimination between objects depends on
the their gray-level separation. Can we improve
discrimination AFTER image has been quantized?
Hard to discriminate
3 4
Doesnt help
23 24
This is better
23
3
??????
3 4
23 24
28
Histogram Equalization
  • For better visual discrimination we would like to
    re-assign gray-levels with maximal uniformity.
  • Define a gray-level transformation
  • such that
  • The histogram Hb is as flat as possible.
  • The order of Gray-levels is maintained.
  • The histogram bars are not fragmented.

Hb
Ha
k
k
29
Histogram Equalization
Ha
Hb
k
k
Aa
Ab
k
k
Define
30
Histogram Equalization 2 Pointer Algorithm
Method Aa -gt Ab
Original
Goal
Aa
Ab
k
k
j Pnew
31
Histogram Equalization 2 Pointer Algorithm
Method Ha -gt Hb
Original
Goal
Pnew
old
0 1 2 3 4 5 6 7 8 9 10 11 0 0 0 1 1 1 3 5 8 9 9
11
new
32
30
25
20
15
10
5
0
0
1
2
3
4
5
6
7
8
9
10
11
old
0 1 2 3 4 5 6 7 8 9 10 11 0 0 0 1 1 1 3 5 8 9 9
11
new
33
(No Transcript)
34
Histogram Equalization - Example
Original
Equalized
Demo
35
2 Pointer Algorithm
2-pointer Histogram Equalization Algorithm
Pold 0 Pnew 0 E_levelsum(Hist)/K
BucketE_level while (Pold ? k) if
Hist(Pold) lt Bucket Bucket
Bucket - Hist(Pold) New_Gray(Pold) Pnew
Pold else Hist(Pold)
Hist(Pold)-Bucket Bucket E_level Pnew
end end
K number of gray-level values. Hist A vector
with the original histogram. New_gray A vector
with the gray-level transformation.
36
Histogram Matching
  • Transforms an image A so that its histogram
    matches that of another image B.
  • Could be used before comparing two images of the
    same scene acquired under different lighting
    condition.

Aa
Ab
D
D
37
Application Texture Synthesis (Heeger Bergen
1995)
About PowerShow.com