Image Processing Ch3: Intensity Transformation and spatial filters

Slides:



Advertisements
Similar presentations
Types of Image Enhancements in spatial domain
Advertisements

Digital Image Processing
Image Processing Ch3: Intensity Transformation and spatial filters
Image Processing Lecture 4
CS & CS Multimedia Processing Lecture 2. Intensity Transformation and Spatial Filtering Spring 2009.
Chapter 3 Image Enhancement in the Spatial Domain.
Chapter - 2 IMAGE ENHANCEMENT
Intensity Transformations (Chapter 3)
Digital Image Processing
Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(rk)=nk, where: rk is the kth gray level nk.
Course Website: Digital Image Processing Image Enhancement (Histogram Processing)
ECE 472/572 - Digital Image Processing
Image Enhancement in the Spatial Domain
Intensity Transformations
SCCS 4761 Point Processing Basic Image Processing Operations Arithmetic Operations Histograms.
BYST Eh-1 DIP - WS2002: Enhancement in the Spatial Domain Digital Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department Image Enhancement.
Image Enhancement by Modifying Gray Scale of Individual Pixels
انجمن دانشجویان ایران – مرجع دانلود کتاب ، نمونه سوال و جزوات درسی دانلود جزوات کارشناسی ارشد نرم افزار علوم تحقیقات البرز دانشگاه آزاد کرج Karaj.unicloob.ir.
Lecture 4 Digital Image Enhancement
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Image Processing
Chapter 3: Image Enhancement in the Spatial Domain
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Image Enhancement To process an image so that the result is more suitable than the original image for a specific application. Spatial domain methods and.
Digital Image Processing
Lecture 2. Intensity Transformation and Spatial Filtering
Chapter 3 Image Enhancement in the Spatial Domain.
Lecture 4 Digital Image Enhancement
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
University of Ioannina - Department of Computer Science Intensity Transformations (Point Processing) Christophoros Nikou Digital Image.
CS654: Digital Image Analysis Lecture 17: Image Enhancement.
Chapter 3 Image Enhancement in the Spatial Domain.
Digital Image Processing Contrast Enhancement: Part I
DIGITAL IMAGE PROCESSING
Digital Image Processing Lecture 4: Image Enhancement: Point Processing Prof. Charlene Tsai.
CIS 601 Image ENHANCEMENT in the SPATIAL DOMAIN Dr. Rolf Lakaemper.
EE663 Image Processing Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Intensity Transformations or Translation in Spatial Domain.
Digital Image Processing Lecture 3: Image Display & Enhancement March 2, 2005 Prof. Charlene Tsai.
Ch1: Introduction Prepared by: Tahani Khatib AOU
CIS 601 – 04 Image ENHANCEMENT in the SPATIAL DOMAIN Longin Jan Latecki Based on Slides by Dr. Rolf Lakaemper.
Ch2: Digital image Fundamentals Prepared by: Hanan Hardan
Image Processing Ch2: Digital image Fundamentals Prepared by: Tahani Khatib.
Prepared by: Hanan Hardan
Prepared by: Hanan Hardan
Digital Image Processing Part 2 Contrast processing.
Digital Image Processing
Image Enhancement in Spatial Domain Presented by : - Mr. Trushar Shah. ME/MC Department, U.V.Patel College of Engineering, Kherva.
Lecture Reading  3.1 Background  3.2 Some Basic Gray Level Transformations Some Basic Gray Level Transformations  Image Negatives  Log.
Lecture 02 Point Based Image Processing Lecture 02 Point Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing January 13, 2004 Prof. Charlene Tsai.
EE 7730 Image Enhancement. Bahadir K. Gunturk2 Image Enhancement The objective of image enhancement is to process an image so that the result is more.
Digital Image Processing Image Enhancement in Spatial Domain
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 3 Image Enhancement in the Spatial Domain Chapter.
IMAGE ENHANCEMENT TECHNIQUES
Histogram Equalization
Intensity Transformations and Spatial Filtering
CIS 601 – 03 Image ENHANCEMENT SPATIAL DOMAIN Longin Jan Latecki
Digital Image Processing
Fundamentals of Image Processing A Seminar on By Alok K. Watve
Image Enhancement in the
Digital Image Processing
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Digital Image Processing
Image Processing Ch3: Intensity Transformation and spatial filters
CIS 4350 Image ENHANCEMENT SPATIAL DOMAIN
Digital Image Processing
Intensity Transform Contrast Stretching Y ← u0+γ*(Y-u)/s
The spatial domain processes discussed in this chapter are denoted by the expression
Presentation transcript:

Image Processing Ch3: Intensity Transformation and spatial filters Part 2 Prepared by: Tahani Khatib

Ch3, lesson3: piecewise Linear transformation functions. piecewise Linear transformation functions. 2. Intensity-Level Slicing (gray level slicing) Highlighting a specific range of intensities in an image. Approach 1 Approach 2 display in one value(e.g white) all the values in the range of interest , and in another (e.g black) all other intensities Brightens or darkens the desired range of intensities but leaves all other intensity levels in the image unchanged

Ch3, lesson3: piecewise Linear transformation functions. piecewise Linear transformation functions. 2. Intensity-Level Slicing (gray level slicing) example: approach 1 example: apply intensity level slicing in Matlab to read cameraman image , then If the pixel intensity in the old image is between (100  150) convert it in the new image into 255 (white). Otherwise convert it to 0 (black). Solution: x=imread('cameraman.tif'); y=x; [w h]=size(x); for i=1:w for j=1:h if x(i,j)>=100 && x(i,j)<=200 y(i,j)=255; else y(i,j)=0; end figure, imshow(x); figure, imshow(y);

Ch3, lesson3: piecewise Linear transformation functions. piecewise Linear transformation functions. 2. Intensity-Level Slicing (gray level slicing) – example: approach 1 example: apply intensity level slicing in Matlab to read cameraman image , then If the pixel intensity in the old image is between (100  150) convert it in the new image into 255 (white). Otherwise convert it to 0 (black).

Ch3, lesson3: piecewise Linear transformation functions. piecewise Linear transformation functions. 2. Intensity-Level Slicing (gray level slicing) example: approach 2 example: apply intensity level slicing in Matlab to read cameraman image , then If the pixel intensity in the old image is between (100  150) convert it in the new image into 255 (white). Otherwise it leaves it the same. Solution: x=imread('cameraman.tif'); y=x; [w h]=size(x); for i=1:w for j=1:h if x(i,j)>=100 && x(i,j)<=200 y(i,j)=255; else y(i,j)=x(i,j); end figure, imshow(x); figure, imshow(y);

Ch3, lesson3: piecewise Linear transformation functions. piecewise Linear transformation functions. 2. Intensity-Level Slicing (gray level slicing) example: approach 2 example: apply intensity level slicing in Matlab to read cameraman image , then If the pixel intensity in the old image is between (100  150) convert it in the new image into 255 (white). Otherwise it leaves it the same.

Ch3, lesson3: piecewise Linear transformation functions. piecewise Linear transformation functions. 2. Intensity-Level Slicing (gray level slicing) Homework example: apply intensity level slicing (approch2) in Matlab to read moon image , then If the pixel intensity in the old image is between (0  20) convert it in the new image into 130.

Ch3, lesson3: piecewise Linear transformation functions. piecewise Linear transformation functions. 3. Bit-Plane Slicing Remember that pixels are digital numbers composed of bits. 8-bit Image composed of 8 1-bit planes

Ch3, lesson3: piecewise Linear transformation functions. 3. Bit-Plane Slicing 9

3. Bit-Plane Slicing (example) Ch3, lesson3: piecewise Linear transformation functions. 3. Bit-Plane Slicing (example) 100 We have to use bit get and bit set to extract 8 images; 0 1 1 0 0 1 0 0 Image of bit1: 00000000 Image of bit2: 00000000 Image of bit3: 00000100 Image of bit4: 00000000 4 Image of bit6: 00100000 Image of bit8: 00000000 Image of bit5: 00000000 Image of bit7: 01000000 32 64 10

3. Bit-Plane Slicing- programmed Ch3, lesson3: piecewise Linear transformation functions. 3. Bit-Plane Slicing- programmed example: apply bit-plane slicing in Matlab to read cameraman image , then extract the image of bit 6. Solution: x=imread('cameraman.tif'); y=x*0; [w h]=size(x); for i=1:w for j=1:h b=bitget(x(i,j),6); y(i,j)=bitset(y(i,j),6,b); end figure, imshow(x); figure, imshow(y);

Histogram? Histogram of a digital image h(rk) = nk Where: Preview.. histogram Histogram? Histogram of a digital image h(rk) = nk Where: rk : kth gray level nk : # of pixels with having gray level rk We manipulate Histogram for image enhancement. Histogram data is useful in many applications like image compression and segmentaion.

Histogram of the image: Ch3, lesson 4: histogram Histogram of the image: histogram هو تمثيل لعدد البكسل في كل قيمة لونية من درجات gray levels h(rk) = nk Where: rk : kth gray level nk : # of pixels with having gray level rk

Histogram of the image: Ch3, lesson 4: histogram Histogram of the image: For example: we have 600 pixels having the intensity value ≈ 160

Histogram of the image: Ch3, lesson 4: histogram Histogram of the image: 15

Histogram equalization of the image: Ch3, lesson 5: histogram equalization Histogram equalization of the image: We have this image in matlab called pout.tif, when we plot its histogram it is showed like this: Notice that the pixels intensity values are concentrated on the middle (low contrast) 16

Histogram equalization of the image: Ch3, lesson 5: histogram equalization Histogram equalization of the image: histogram equalization : is the process of adjusting intensity values of pixels. Im matlab : we use histeq function Histogram produces pixels having values that are distributed throughout the range 17

Histogram equalization of the image: Ch3, lesson 5: histogram equalization Histogram equalization of the image: Notice that histogram equalization does not always produce a good result 18

Equalization (mathematically) Ch3, lesson 5: histogram equalization Equalization (mathematically) g(x) = (L/n). T(X) -1 Where, G(X) : the new image after equalization L: No of gray levels 2n n: No of pixels T(x): cumulative sum of each gray level

Equalization (mathematically) Ch3, lesson 5: histogram equalization Equalization (mathematically) G(x) T(X)مجموع تراكمي للبكسل X عدد البكسل لكل Graylevel L graylevels 1 4 3 9 5 2 15 6 21 27 29 7 32 Assume that we have (3bits per pixels) or 8 levels of grayscale, and we want to equalize the following image example. G(x)=(L/n). T(X) -1 =(8/32). T(x) -1 8 عدد ال graylevel No of pixels عدد البكسلات الكلي