point operations
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 PresentationTRANSCRIPT
![Page 1: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/1.jpg)
1
Point Operations
![Page 2: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/2.jpg)
General Image Operations
• Three type of image operations1. Point operations
2. Geometric operations
3. Spatial operations
![Page 3: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/3.jpg)
Point Operations
yxfMyxg ,,
![Page 4: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/4.jpg)
Point Operations
· Operation depends on Pixel's value.
· Context free (memory-less).
· Operation can be performed on the Histogram.
· Example:
yxfyxg ,,
![Page 5: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/5.jpg)
Geometric Operations
yxGfyxg ,,
![Page 6: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/6.jpg)
Geometric Operations
· Operation depend on pixel's coordinates.· Context free.· Independent of pixels value.· Example:
byaxfyxg ,,
![Page 7: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/7.jpg)
Spatial Operations
yxNjijifMyxg ,),(|,,
![Page 8: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/8.jpg)
Spatial Operations
· Operation depends on Pixel's value and coordinates.· Context dependant.· Spatial v.s. Frequency domain.· Example:
njifyxgyxNji
/,,),(,
![Page 9: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/9.jpg)
Point 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](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/10.jpg)
• 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](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/11.jpg)
Contrast 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](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/12.jpg)
The Negative Mapping
v
M(v)
255
255
vvM 255
![Page 13: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/13.jpg)
Point Operations and the Histogram
Given a point operation: ab vMv
A
B
M(v) M-1(v)
Ha
Hb
Ca
Cb
![Page 14: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/14.jpg)
Point 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 monotonic increasing 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 15: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/15.jpg)
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)
va
vb
![Page 16: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/16.jpg)
v
v
Ca
Cb
M(v)
vva
vb
• The value of Ca at va is equal to the value of Cb at vb.
![Page 17: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/17.jpg)
Q: Is it possible to obtain Hb directly from Ha and M(v)?
A
B
M(v) M-1(v)
Ha
Hb
Ca
Cb
?
![Page 18: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/18.jpg)
• A: Since M(v) is monotonic, Ca(va)=Cb(vb) therefore:
v
v
Ca
Cb
M(v)
v
babb vMCvC 1
va
vb
![Page 19: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/19.jpg)
• The histogram of image B can be calculated:
1 vCvCvH bbb
A
B
M(v) M-1(v)
HaCa
M(v)
HbCb
![Page 20: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/20.jpg)
Q: Is it possible to obtain M(v) directly from Ha and Hb ?
AHaCa
BHbCb
M(v) ?
![Page 21: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/21.jpg)
• A: Since Cb is monotonic and Cb(vb)=Ca(va)
• Alternatively M(va)=vb if Ca(va)=Cb(vb)
aaabb vMvCCv 1
v
v
Ca
Cb
M(v)
vva
vb
![Page 22: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/22.jpg)
v
Ca
Cb
M(v)
v
va
vb
Calculating M(v) from Ca and Cb:
![Page 23: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/23.jpg)
Cb
M(v)
v
Calculating M(v) from Ca and Cb: 2-pointer Algorithm
v
Ca
Is this always possible?
![Page 24: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/24.jpg)
Histogram 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 25: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/25.jpg)
Histogram 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 26: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/26.jpg)
Histogram Equalization: Algorithm
AHa
Hb
Ca
Cb
• Define:
• Assign:
grayValues
pixelsvvCb #
#
aaabb vMvCCv 1
M(v) ?
![Page 27: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/27.jpg)
Hist. 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 28: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/28.jpg)
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 algorithm
![Page 29: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/29.jpg)
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 1
![Page 30: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/30.jpg)
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 2
![Page 31: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/31.jpg)
Hist. Eq.: Example 3
![Page 32: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/32.jpg)
From B. Girod, IP
Adaptive Histogram Equalization
![Page 33: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/33.jpg)
Histogram 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 34: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/34.jpg)
• However, in cases where corresponding colors between images are not “consistent” this mapping may fail:
from: S. Kagarlitsky: M.Sc. thesis 2010.
![Page 35: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/35.jpg)
• 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 36: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/36.jpg)
• More results: (Heeger & Bergen 1995):
![Page 37: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/37.jpg)
Discussion:
• 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 38: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/38.jpg)
hist. match
Original
Example:Destination
![Page 39: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/39.jpg)
Pattern Matching by Tone Mapping (MTM)(ICCV 2011)
Pattern Window
Find the BEST tone mapping between Pattern and Window
![Page 40: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/40.jpg)
Pattern Matching by Tone Mapping (MTM)
Use the Slice Transform (SLT) to represent image as a linear sum of “slice” signals:
0 0 1
0 1 0
1 0 0
0 0 1
1 0 0
=
AAp xpxS
Image xA
(ICCV 2011)
![Page 41: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/41.jpg)
Pattern Slices
• We define a pattern slice
![Page 42: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/42.jpg)
Pattern Slices
0 1
• We define a pattern slice
![Page 43: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/43.jpg)
Pattern Slices
0 1
*
**
*
**
+
=
v
M(v)
255
255
![Page 44: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/44.jpg)
4444
Linear Combination of Image Slices
5 bins were used α = [0, 51, 102, 153, 204, 256]Slices are shown inverted (1 = white, 0 = black)
![Page 45: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/45.jpg)
Pattern Slices
v
M(v)
255
255
![Page 46: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/46.jpg)
SLT
results
Example:
Hist. match
Original Destination
![Page 47: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/47.jpg)
47
Point Operation on Two+ Images
![Page 48: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/48.jpg)
http://www.cambridgeincolour.com/tutorials
Noise reduction by Averaging
![Page 49: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/49.jpg)
Malik 1997
High Dynamic Range Images
Different Exposures Combined Image
![Page 50: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/50.jpg)
Image Subtraction
MaskImage
NewImage
DifferenceImage
ContrastEnhanced
Image
http://www.isi.uu.nl/Research/Gallery/DSA/
![Page 51: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/51.jpg)
Image Subtraction
ImageProto
ImageDefect
DifferenceImage
NoAlignment
B. Girod
DifferenceImageWith
Alignment
![Page 52: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/52.jpg)
Image Subtraction – Foreground Detection
Frame 1 Frame 2
DifferenceImage
Real Difference
Image
![Page 53: Point Operations](https://reader036.vdocuments.mx/reader036/viewer/2022062801/568143a6550346895db02ce0/html5/thumbnails/53.jpg)
53