Download presentation
1
Digital Image Processing
Session 3 Dr. Ghassabi Tehran shomal University Spring 2015
2
Outline Introduction Digital Image Fundamentals
Intensity Transformations and Spatial Filtering Filtering in the Frequency Domain Image Restoration and Reconstruction Color Image Processing Wavelets and Multi resolution Processing Image Compression Morphological Operation Object representation Object recognition
3
Outline Chapter 3 Background
Some Basic Intensity Transformation Functions Histogram Processing Fundamentals of Spatial Filtering Smoothing Spatial Filters Sharpening Spatial Filters Combining Spatial Enhancement Tools
4
Methods Image Enhancement Spatial Domain: Frequency Domain: Linear
Nonlinear Frequency Domain: پردازش در حوزه مکانی و در حوزه تبدیل. اولی مبتنی بر دستکاری مستقیم پیکسلها هست. دومی شامل تبدیل تصویر و پردازش و تبدیل معکوس هست. ارتقا فرایند بهبود تصویر برای کاربرد خاص Process an image so that the result will be more suitable than the original image for a specific application. The suitableness is up to each application. A method which is quite useful for enhancing an image may not necessarily be the best approach for enhancing another image Spatial Domain : (image plane) Techniques are based on direct manipulation of pixels in an image Frequency Domain : Techniques are based on modifying the Fourier transform of an image There are some enhancement techniques based on various combinations of methods from these two categories
5
IE in Spatial Domain S=T(r)
Neighborhood of a point (x,y) can be defined by using a square/rectangular (common used) or circular sub image area centered at (x,y) The center of the sub image is moved from pixel to pixel starting at the top of the corner فیلتر کردن مکانی: مثال: محاسبه میانگین در همسایگی سه در سه اطراف هر پیکسل و تکرار این عمل برای هر سطر Gray-level transformation function S=T(r) where r is the gray level of f(x,y) and s is the gray level of g(x,y) at any point (x,y)
6
Transformation For 11 neighborhood:
Contrast Enhancement/Stretching/Point process For w w neighborhood: Filtering/Mask/Kernel/Window/Template Processing تابعی که در آن مقدار پیکسل r به پیکسل S نگاشت میشود. در تابع اول تصویری با کنتراست بالاتر تولید می شود. که سطوح شدت پایین تر از m را تیره تر و سطوح شدت بالاتر از m را روشن تر خواهد نمود. نگاشت دوم تصویر باینری ایجاد میکنه.
7
Transformation Functions
IE in Spatial Domain Input gray level, r Output gray level, s Negative Log nth root Identity nth power Inverse Log Some Basic Intensity Transformation Functions Image Negatives: An image with gray level in the range [0, L-1] where L = 2n ; n = 1, 2… Negative transformation : s = L – 1 –r Reversing the intensity levels of an image. Suitable for enhancing white or gray detail embedded in dark regions of an image, especially when the black area dominant in size
8
Image Negatives: Image Negatives
برای ارتقای تصویری که ناحیه های سیاه در آن زیاد باشد یا بخش سفیدی در بخش خاکستری قرار داشته باشد.
9
y Image Negatives y=L-x L L x
10
Log Transformation بازه نازکی از مقادیر پایین شدت در تصویر ورودی را به بازه وسیع تری از سطوح خروجی تبدیل می نماید. درباره مقادیر بالاتر سطوح ورودی عکس آن درست است. از این تبدیل برای بسط مقادید پیکسلهای تاریک در یک تصویر و فشرده سازی مقادیر سطح بالاتر استقاده خواهیم کرد. کاربرد: نمایش طیف بعد از تبدیل فوریه c is a constant and r 0 Log curve maps a narrow range of low gray-level values in the input image into a wider range of output levels. Used to expand the values of dark pixels in an image while compressing the higher-level values.
11
Log Transformation Compress the dynamic range of images with large variations in pixel values Stretch dark region, suppress bright region From the range 0 – 1.5×106 to the range 0 to 6.2 We can’t see the significant degree of detail as it will be lost in the display.
12
Range Compression L x y c=100 Y=clog10dd
13
Power-Law(Gamma) Transformations
Power-law transformations: s=cr or s=c(r+ε) <1 maps a narrow range of dark input values into a wider range of output values, while >1 maps a narrow range of bright input values into a wider range of output values : gamma, gamma correction مقادیر مختلف S بر حسب r برای گاماهای مختلف ترسیم شده است. برای گامای کمتر از یک مثل تابع لگاریتم هست. برای گامای یک مثل تابع همانی هست.
14
Power-Law(Gamma) Transformations
Gamma Correction: Power-law transformations: s=cr or s=c(r+ε) <1 maps a narrow range of dark input values into a wider range of output values, while >1 maps a narrow range of bright input values into a wider range of output values : gamma, gamma correction
15
Power-Law(Gamma) Transformations
(a) a magnetic resonance image(MRI) of an upper thoracic human spine with a fracture dislocation and spinal cord impingement The picture is predominately dark An expansion of gray levels are desirable needs < 1 (b) result after power-law transformation with = 0.6, c=1 (c) transformation with = (best result) با کاهش گاما جزییات بیشتری قابل مشاهده است ولی در نقطه ای که تصویر از آن جا روشن تر میشود ، مخصوصا در پس زمینه تصویر کنتراست شروع به کاهش میکند. (d) transformation with = 0.3 (under acceptable level) Effect of decreasing Gamma: When the is reduced too much, the image begins to reduce contrast to the point where the image started to have very slight “wash-out” look, specially in the background
16
Power-Law(Gamma) Transformations (Effect of decreasing gamma)
تصویری که وجود دارد ظاهری روشن دارد که نیاز به فشردگی سطوح شدت داریم. پس نیاز به گامای بزرگتر از یک داریم a) image has a washed-out appearance, it needs a compression of gray levels needs > 1 (b) result after power-law transformation with = 3.0 (suitable) (c) transformation with = 4.0 (suitable) (d) transformation with = 5.0 (high contrast, the image has areas that are too dark, some detail is lost)
17
Power-Law(Gamma) Transformations (Effect of decreasing gamma)
Another medical image
18
Piecewise-Linear Transformation Functions
Contrast Stretching Contrast slicing Bite-Plane slicing Advantage: The form of piecewise functions can be arbitrarily complex. A Practical Implementation of some important transformations can be formulated only as piecewise functions. Disadvantage: Their specification requires considerably more user input.
19
Contrast Stretching y yb ya x a b L بازه سطوح شدت را افزایش میدهد.
a b L بازه سطوح شدت را افزایش میدهد. کنتراست پایین: روشنایی ضعیف، عدم وچود بازه پویا در حسگر تصویر برداری، تنظیم نادرست لنز در تصویر برداری
20
Contrast stretching Original C. S. THR.
21
Contrast Stretching
22
Clipping y x a b L
23
Gray-level Slicing برجسته کردن بازه خاصی از شدت
2 تا تابع هست. کلا بخش مورد نظر را روشن میکند و بقیه را صفر میکند. در حالت بعدی فقط بخش مورد نظر را روشن میکند و به بقیه دست نمیزند. Highlighting a specific range of gray levels in an image Display a high value of all gray levels in the range of interest and a low value for all other gray levels (a) transformation highlights range [A,B] of gray level and reduces all others to a constant level (b) transformation highlights range [A,B] but preserves all other levels
24
Gray-level Slicing بخش بندی سطح شدت
25
Gray-level Slicing
26
Gray-level Slicing
27
Gray-level Slicing
28
Bit-plane Slicing Highlighting the contribution made to total image appearance by specific bits Suppose each pixel is represented by 8 bits Higher-order bits contain the majority of the visually significant data Useful for analyzing the relative importance played by each bit of the image برجسته کردن با بیتها به جای استفاده از سطوح شدت. 4 صفحه بالا دارای اطلاعات ارزشمندی هستند.
29
Bit-plane Slicing
30
Bit-plane Slicing The (binary) image for bit-plane 7 can be obtained by processing the input image with a thresholding gray-level transformation. Map all levels between 0 and 127 to 0 Map all levels between 129 and 255 to 255
31
Bit-plane Slicing - Fractal Image
32
Bit-plane Slicing - Fractal Image
33
Bit-plane Slicing کاربرد بخش بندی صفحه بیتی
34
Enhancement based on statistical Properties: Local, Global
Histogram Processing Enhancement based on statistical Properties: Local, Global Histogram Definition h(rk)=nk Where rk is the kth gray level and nk is the number of pixels in the image having gray level rk Normalized histogram: P(rk)=nk/n Histogram of an image represents the relative frequency of occurrence of various gray levels in the image So far, we have discussed various forms of f(x) that leads to different enhancement results The natural question is: How to select an appropriate f(x) for an arbitrary image? One systematic solution is based on the histogram information of an image.
35
Histogram Visual Meaning: Dark Bright Low Contrast High Contrast
Histogram Examples Histogram Visual Meaning: Dark Bright Low Contrast High Contrast Dark Image: Components of histogram are concentrated on the low side of the gray scale. Bright Image: Components of histogram are concentrated on the high side of the gray scale Low-contrast: Histogram is narrow and centered toward the middle of the gray scale High-contrast: Histogram covers broad range of the gray scale and the distribution of pixels is not too far from uniform, with very few vertical lines being much higher than the others
36
Histogram Example
37
Histogram Example
38
Histogram Modification
Histogram Stretching Histogram Shrink Histogram Sliding پردازش هیستوگرام
39
Histogram Stretching
40
Histogram Stretching
41
Histogram Stretching
42
Histogram Shrinking
43
Histogram Shrinking
44
Histogram Sliding
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.