Point Operations

38
1

description

Point Operations. General Image Operations. Three type of image operations Point operations Geometric operations Spatial operations. Point Operations. Point Operations. Operation depends on Pixel's value. Context free (memory-less). Operation can be performed on the Histogram. Example:. - PowerPoint PPT Presentation

Transcript of Point Operations

Page 1: Point Operations

1

Page 2: Point Operations

General Image OperationsGeneral Image Operations

• Three type of image operations1. Point operations

2. Geometric operations

3. Spatial operations

Page 3: Point Operations

Point OperationsPoint Operations

yxfMyxg ,,

Page 4: Point Operations

Point OperationsPoint Operations Point OperationsPoint Operations

Operation depends on Pixel's value.

Context free (memory-less).

Operation can be performed on the Histogram.

Example:

yxfyxg ,,

Page 5: Point Operations

Geometric OperationsGeometric Operations

yxGfyxg ,,

Page 6: Point Operations

Geometric OperationsGeometric Operations Geometric OperationsGeometric Operations

Operation depend on pixel's coordinates. Context free. Independent of pixels value. Example:

byaxfyxg ,,

Page 7: Point Operations

Spatial OperationsSpatial Operations

yxNjijifMyxg ,),(|,,

Page 8: Point Operations

Spatial OperationsSpatial Operations Spatial OperationsSpatial Operations

Operation depends on Pixel's value and coordinates. Context dependant. Spatial v.s. Frequency domain. Example:

njifyxgyxNji

/,,),(,

Page 9: Point Operations

Point OperationsPoint Operations

• A point operation can be defined as a mapping function:

where v stands for gray values.

• M(v) takes any value v in the source image into vnew

in the destination image.

• Simplest case - Linear Mapping:

oldnew vMv

vvMM(v)

vp q

p’

q’ pppq

pq

';''

Page 10: Point Operations

• If it is required to map the full gray-level range (256 values) to its full range while keeping the gray-level order - a non-decreasing monotonic mapping function is needed:

v

M(v)

255

255

contraction

stretching

Page 11: Point Operations

Contrast EnhancementContrast Enhancement

• If most of the gray-levels in the image are in [u1 u2], the following mapping increases the image contrast.

• The values u1 and u2 can be found by using the image’s accumulated histogram.

v

M(v)

255

255

u1 u2

Page 12: Point Operations

The Negative MappingThe Negative Mapping

v

M(v)

255

255

vvM 255

Page 13: Point Operations

Point Operations and the HistogramPoint Operations and the Histogram

• Given a point operation:

• M(va) takes any value va in image A and maps it into vb in image B.

• Requirement: the mapping M is a non descending function (M-1 exists).

• In this case, the area under Ha between 0 and va is equal to the area under Hb between 0 and vb

ab vMv

Page 14: Point Operations

AA

BB

M(v) M-1(v)

Ha

Hb

Ca

Cb

• A point operation and the induced histograms:

Page 15: Point Operations

v

v

Ha

Hb

M(v)

v

• The area under Ha between 0 and va is equal to the area under Hb between 0 and vb=M(va)

Page 16: Point Operations

• Q: Is it possible to obtain Hb directly from Ha and M(v)?

• A: Since M(v) is monotonic, Ca(va)=Cb(vb) therefore:

v

v

Ca

Cb

M(v)

v

babb vMCvC 1

Page 17: Point Operations

• The histogram of image B can be calculated:

1 vCvCvH bbb

AA

BB

M(v)M-1(v)

HaCa

M(v)

HbCb

Page 18: Point Operations

• Q: Is it possible to obtain M(v) directly from Ha and Hb ?

• A: Since Cb is monotonic and Cb(vb)=Ca(va)

• Alternatively M(va)=vb if Ca(va)=Cb(vb)

aaabb vMvCCv 1

AAHaCa

BBHbCb

M(v)

Page 19: Point Operations

v

Ca

Cb

M(v)

v

va

vb

Calculating M(v) from Ca and Cb:

Page 20: Point Operations

Histogram EqualizationHistogram Equalization

• Visual discrimination between objects depends on the their gray-level separation.

• How can we improve discrimination after image has been acquired?

Hard to discriminate Doesn’t help This is better

What about this?

Page 21: Point Operations

Histogram EqualizationHistogram Equalization

• For a better visual discrimination of an image we would like to re-assign gray-levels so that gray-level resource will be optimally assigned.

• Our goal: finding a gray-level transformation M(v) such that:

– The histogram Hb is as flat as possible.

– The order of gray-levels is maintained.

– The histogram bars are not fragmented.

Page 22: Point Operations

Histogram Equalization: AlgorithmHistogram Equalization: Algorithm

AAHa

Hb

Ca

Cb

• Define:

• Assign:

grayValues

pixelsvvCb #

#

aaabb vMvCCv 1

Page 23: Point Operations

Hist. Eq.: The two pointers algorithmHist. Eq.: The two pointers algorithm

0 1 2 3 4 5 6 7 8 9 10 110 0 0 1 1 1 3 5 8 9 9 11

old

new

Page 24: Point Operations

0 1 2 3 4 5 6 7 8 9 10 110 0 0 1 1 1 3 5 8 9 9 11

old

new

0 1 2 3 4 5 6 7 8 9 10 110

5

10

15

20

25

30

0 1 2 3 4 5 6 7 8 9 10 110

5

10

15

20

25

30

(4)(3) (3)

(4) (4)(3)

(1)

(20)(22)

(30)

(5)

(21)

0 1 2 3 4 5 6 7 8 9 10 110

5

10

15

20

25

30

Result

GoalOriginal

Hist. Eq.: The two pointers algorithmHist. Eq.: The two pointers algorithm

Page 25: Point Operations

0 50 100 150 200 2500

500

1000

1500

2000

2500

3000

3500

0 50 100 150 200 2500

500

1000

1500

2000

2500

3000

3500

Original Equalized

Hist. Eq.: Example 1Hist. Eq.: Example 1

Page 26: Point Operations

0 50 100 150 200 2500

500

1000

1500

2000

2500

3000

0 50 100 150 200 2500

500

1000

1500

2000

2500

3000

Original Equalized

Hist. Eq.: Example 2Hist. Eq.: Example 2

Page 27: Point Operations

Hist. Eq.: Example 3Hist. Eq.: Example 3

Page 28: Point Operations

Histogram matchingHistogram matching

• Transforms an image A so that its histogram will match that of another image B.

• Usage: before comparing two images of the same scene (change detection) acquired under different lighting conditions or different camera parameters.

source target mapped source

Page 29: Point Operations

• However, in cases where corresponding colors between images are not “consistent” this mapping may fail:

from: S. Kagarlitsky: M.Sc. thesis 2010.

Page 30: Point Operations

• Surprising usage: Texture Synthesis (Heeger & Bergen 1995).

– Start with a random image.– Step1: multi-resolution decomposition– Step2: histogram matching for each resolution– Iterate

synthesis

Page 31: Point Operations

• More results: (Heeger & Bergen 1995):

Page 32: Point Operations

DiscussionDiscussion::

• Histogram matching produces the optimal monotonic mapping so that the resulting histogram will be as close as possible to the target histogram.

• This does not necessarily imply similar images.

Page 33: Point Operations

hist. match

results

Example:

Page 34: Point Operations

The Slice Transform (SLT): The Slice Transform (SLT): Hel-Or & Shaked 2008Hel-Or & Shaked 2008

• The Slice Transform (SLT) can be seen as a representation of a signal using a linear sum of “slice” signals:

1 0 0

0 1 0

0 0 1

1 0 0

0 0 1

=

AAp xpxS

Signal xA

Page 35: Point Operations

Tone mapping using SLT:Tone mapping using SLT:

• The Slice Transform can represents tone mapping (point operations) in a linear form.

1 0 0

0 1 0

0 0 1

1 0 0

0 0 1

=

1 0 0

0 1 0

0 0 1

1 0 0

0 0 1

=

AAp xpxS

AAp xMqxS

Page 36: Point Operations

Tone mapping using SLT:Tone mapping using SLT:

• If a signal A can be mapped into signal B we have:

• In practice we find an optimal q so that image A will be as close as possible to image B in a LS sense:

• Takes into account spatial information as well.

• Mapping is not necessarily monotonic.

BAp xqxS

BApBTpp

Tp xxMqSxSSSq

ˆˆ

1

Page 37: Point Operations

SLT

results

Example:

Hist. Eq.

Page 38: Point Operations

T H E E N DT H E E N D

38