Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.
-
Upload
lee-edwards -
Category
Documents
-
view
216 -
download
2
Transcript of Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.
![Page 1: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/1.jpg)
Pixels
Last updated 2015. 03. 22
Heejune Ahn, SeoulTech
![Page 2: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/2.jpg)
Outline What is Pixel-level processing? Pixel level Operations Transform
Histogram HE (Histogram Equalization) HA (histogram Matching)
Trhesholding
![Page 3: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/3.jpg)
1. Pixel Processing in pixel level
Not using information of neighbor pixels
Information of pixel level visual color/intensity : camera data IR (infrared) : emission from heat object, night-vision,
surveillance Medical image : density of tissue, CT (computed
tomography), MRI (magnetic resonance imaging), 3D (stack of 2Ds)
Ladar/sonar 3-D imaging: 3D scanning, depth map Scientific image
![Page 4: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/4.jpg)
![Page 5: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/5.jpg)
2. Operations upon pixels Individual, pixel-by-pixel
Iout (n,m) = f (Iin(n,m))
E.g. Iin(n,m) + IB(n,m) or Iin(n,m) + C
Arithmetic operation contrast adjustment : imadd(I, const)
![Page 6: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/6.jpg)
Blending(mixing): imadd(I1, I2)
Substraction: imsubstract(I1, I2) Difference : imabsdiff(I1, I2)
![Page 7: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/7.jpg)
Multiplication, division : immultiply(I, const), imdivide(I, const)
Saturation issue Overflow & underflow problem in range [0, 255] matlab “im” functions handle the saturation
![Page 8: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/8.jpg)
Logical operations Mostly for binary image NOT: imcomplement(I) OR, XOR, AND, NAND, NOR, NXOR
Thresholding Gray scale to binary image : im2bw(I, thres) Io = 1 if Iin > T or 0 o.w. Used for extract fg from bg variations
![Page 9: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/9.jpg)
Thresholding for simple and complex image
![Page 10: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/10.jpg)
4. transform Mostly for improving the contrast of images
(dynamic range) Logarithmic transform
Increase the contrast in “low” values
![Page 11: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/11.jpg)
Exponential transform Increase contrast in high values
![Page 12: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/12.jpg)
Gamma (power)
flexible r < 1 : log-style r > 1 : exp-style
![Page 13: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/13.jpg)
4. Histograms Histogram
h(x) = # of pixels whose value is x. pmf (x) = h(x) / # of pixels
![Page 14: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/14.jpg)
Thresholding Global Threshold selection
Bi-modal distribution (F3.12, previous slide) : easy to select
Multi-modal/complicated (F3.13) : not easy
![Page 15: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/15.jpg)
Otsu’s Method: global optimal algorithm Threshold that minimizes the intra class standard
variance (a clustering algorithm)
level =graythresth(Img) in MATLAB
Intra-class variances
Inter-class variances
Minimizing
Maximizing
![Page 16: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/16.jpg)
Adaptive thresholding Reason: Illumination is not uniform, multiple objects T(n, m) = f ( W[n,m] )
Threashold value “adapts” neighbors of pixel (n,m), W. E.g of function
mean, median, floor((max – min/2) +C
orignal
f
median
T
+ margin
still noise
![Page 17: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/17.jpg)
Contrast Control To enhance visual perception Linear contrast stretching
Tips: outlier problem Use c at 5%, d at 95%
[c, d] [b= 0, a = 255] (value – c) (a-b)/(c-d) + a
![Page 18: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/18.jpg)
Histogram equalization Equalization
Resultant histogram is flat/equal Nonlinear & dependent image histogram
Global method proof: Iout ~ py(y)Iin ~ px(x)
y = f(x)
![Page 19: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/19.jpg)
Example Not exactly flat (in discrete values)
![Page 20: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/20.jpg)
Histogram Matching Generalization of histogram equalization map output image’s histogram to a specific
function.
Iout ~ py(y) ~ Cy(y)
Iin ~ px(x) ~ Cx(x) y = f(x)
f(x) = C-1z[Cx(x)]
![Page 21: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/21.jpg)
Adaptive histogram equalizer Similar reason as adaptive thresholding Local histogram generation
Sliding windows method Tile-based method
Low computation Blocking effects
inner window
outter window
![Page 22: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/22.jpg)
Pizer’s approach Weighted histogram
![Page 23: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/23.jpg)
Contrast limiting Not to over-amplificate noise pixels Concept
MATLAB J = adapthisteq
(I, [param1,val1]...) Params
ClipLimit : [0:1] (0.01) NumTiles: (8) Distribution
Target distist. (uniform)
Rayleigh
exponential uniform
![Page 24: Pixels Last updated 2015. 03. 22 Heejune Ahn, SeoulTech.](https://reader035.fdocuments.in/reader035/viewer/2022081603/5697bfe71a28abf838cb5e2c/html5/thumbnails/24.jpg)
A Real Application Budapest Castle (Hungary)
Taken by Galaxy S5 in the evening
gray/hsv
GHE
AHE
rgb