by shahid farid - diunitofarid/teaching/dip/lecture - 1.pdf · text book: digital image processing,...
TRANSCRIPT
by
Shahid Farid
Session – 1
� Course introduction
� What is image and its attributes?
� Image types◦ Monochrome images
◦ Grayscale images
◦ Color images
� Color lookup table
� Image Histogram
2© Shahid Farid, PUCIT
Course introduction
� The aim of this course is to ◦ Introduce the basic theory of digital processing of
images.
◦ Expose students to exciting applications of image processing.
◦ To develop experience in coding image processing algorithms.
© Shahid Farid, PUCIT 3
� Text book: Digital Image Processing, 3Digital Image Processing, 3Digital Image Processing, 3Digital Image Processing, 3rdrdrdrd Ed. Ed. Ed. Ed. (DIP/3e) b(DIP/3e) b(DIP/3e) b(DIP/3e) by Gonzalez and Woods
� Reference books:◦ Digital Image Processing, Kenneth R. Castleman, Prentice
Hall, 1996
◦ Digital Image Processing and Applications, I. Pitas, John Wiley, 2000
◦ Digital Image Processing/3E, William K. Pratt, John Wiley, 2001
� Plus some handouts and tools
© Shahid Farid, PUCIT 4
� Introductory digital image processing class
� Pre-requisites◦ Linear Algebra
◦ Signals & Systems
© Shahid Farid, PUCIT 5
� Homeworks:◦ Both written as well as programming assignments
� Programming Environment◦ MATLAB or C/C++
� Lectures 32 of 90 minutes each
� – Midterm
� – Final
� No grade for attendance
� Short Quizzes
� Projects (Research and Development)
© Shahid Farid, PUCIT 6
� Assignments are on individual-submission basis◦ Can discuss with your class fellows, subject to the
following conditions:
� Discussion participants should be acknowledged on the first page of submission
� Solution should be written up individually, without ‘coping’ from another solution or referring to someone else’s work
◦ Help from books, websites should be referenced.
� Cheating is not an honorable thing to do!
� Of course, any suspected cases of cheating or plagiarism will be sent to the DC
© Shahid Farid, PUCIT 7
� There is no clear boundary between Image Processing and Computer Vision
� However, CV deals with more ‘higher’ level processing
© Shahid Farid, PUCIT 8
� To facilitate storage and transmission◦ Compression, quality
� Prepare images for display or printing◦ e.g. half-toning
� Enhancement and restoration◦ Noise removal, quality, sharpness
� Extract information from images◦ Image understanding
◦ Comparison of images to find changes
© Shahid Farid, PUCIT 9
� Image Enhancement
© Shahid Farid, PUCIT 10
� Hubble Space Telescope suffered from spherical aberration when it was launched. However, its images were digitally corrected. Later, the telescope was repaired optically by astronauts
© Shahid Farid, PUCIT 11
� Another example from HST
© Shahid Farid, PUCIT 12
� Color Image Restoration
© Shahid Farid, PUCIT 13
� Noise Removal
© Shahid Farid, PUCIT 14
© Shahid Farid, PUCIT 15
© Shahid Farid, PUCIT 16
© Shahid Farid, PUCIT 17
© Shahid Farid, PUCIT 18
© Shahid Farid, PUCIT 19
� Morphing
© Shahid Farid, PUCIT 20
� Digital Image is an electronic snapshots taken of a scene or scanned from documents, such as photographs, manuscripts, printed texts, and artwork.
� The digital image is sampled and mapped as a grid of dots or picture elements (pixels).
21© Shahid Farid, PUCIT
� Image can be defined as a 2-D function f(x,y), where x and y are spatial coordinates and the amplitude of f at any pair of coordinates (x,y) is called the intensity of the image at that point◦ When the image is gray scale, intensity values
represent the range of shades from black to white.
◦ For a color image the intensity values are represented as a combination of R, G, B
22© Shahid Farid, PUCIT
� Resolution refers to the number of pixels in an image
� Resolution is sometimes identified by ◦ The width and height of the image as well as ◦ The total number of pixels in the image
� For example, an image that is 2048 pixels wide and 1536 pixels high (2048 � 1536) contains 3,145,728 pixels (or 3.1 Megapixels).
� You could call it a 2048 � 1536 or a 3.1 Megapixel image.
23© Shahid Farid, PUCIT
� ResolutionResolutionResolutionResolution is the number of pixels in a linear inch (i.e. pixels per inch or ppi). The more pixels per inch (ppippippippi), the higher your image resolution will be.
24© Shahid Farid, PUCIT
� ResolutionResolutionResolutionResolution of an image display device or printing device is different from image resolution.
� The resolution of such devices is described in dots per inch (dpi).
25© Shahid Farid, PUCIT
� If your monitor is set to 800 � 600 and
� You open up an image that is 640 � 480,
� It will only fill up a part of your screen.
� What if you open up an image that is 2048 �1536?
26© Shahid Farid, PUCIT
� What if you open up an image that is 2048 �1536?
� You will find yourself moving the slider bar around to see all the different parts of the image. (see 2560X1600 image)
27© Shahid Farid, PUCIT
� You have a 640 � 480 image and
� You want to print it at 200 dpi (dots or pixels per inch).
� What will be the size of the printed image?
28© Shahid Farid, PUCIT
� What will be the size of the printed image?
� 640 / 200 = 3.2 and
� 480 / 200 = 2.4
� So, the size of the printed image is 3.2" � 2.4”
29© Shahid Farid, PUCIT
30© Shahid Farid, PUCIT
300 PPI / 600 x 600 pixel dimension
2 inches
72 PPI / 144 x 144 pixel dimension
30 PPI / 60 x 60 pixel dimension
© Shahid Farid, PUCIT 31
� The number of bits used to define a pixel.
� The greater the bit depth, the greater the number of tones (grayscale or color) that can be represented.
� For example, an image with a bit depth of 1 has pixels with two possible values: black and white.
� An image with a bit depth of 8 has 28, or 256, possible values.
© Shahid Farid, PUCIT 32
� Simplest type of image
� Each pixel consist of only 0/1information
� Called 1-bit monochrome (since no color) image
� Suitable for simple graphics & text
� How much storage is required for a monochrome image of resolution 640 � 480?
© Shahid Farid, PUCIT 33
© Shahid Farid, PUCIT 34
� Each pixel is represented by a single byte.
� Gray levels between 0 to 255 (black to white).
� How much storage is required for a grayscale image of resolution 640 � 480?
© Shahid Farid, PUCIT 35
© Shahid Farid, PUCIT 36
256 gray levels (8bits/pixel) 32 gray levels (5 bits/pixel) 16 gray levels (4 bits/pixel)
8 gray levels (3 bits/pixel) 4 gray levels (2 bits/pixel) 2 gray levels (1 bit/pixel)37
� 24- bit color image◦ Each pixel is represented by 3 bytes, RGB◦ Each R, G, B are in the range 0-255 ◦ 256 x 256 x 256 possible colors ◦ If space is a concern, reasonably accurate color
image can be obtained by quantizing the color information.
� What is the size (in kB) of a 24-bit, 640 � 480color image?
© Shahid Farid, PUCIT 38
� 8- bit color image◦ Carefully chosen 256 colors represent the image
◦ stores only the index of the color, the file header will contain the mapping information.◦ The mapping is performed using the color
lookup table (LUT).
� What is the size (in kB) of a 8-bit, 640 � 480color image?
© Shahid Farid, PUCIT 39
© Shahid Farid, PUCIT 40
� Image histogramImage histogramImage histogramImage histogram is a type of histogram which acts as a graphical representation of the tonal distribution in a digital image.
� It plots the number of pixels for each tonal value.
� By looking at the histogram for a specific image a viewer will be able to judge the entire tonal distribution at a glance.
© Shahid Farid, PUCIT 41
Histogram of Lena’s grayscale image
© Shahid Farid, PUCIT 42
Histogram of Lena’s colored image
© Shahid Farid, PUCIT 43
� Text book and recommended reference books
� http://www.microscope-microscope.org/imaging/image-resolution.htm
� http://www.espressographics.com/text/imagesize.html
� http://fourier.eng.hmc.edu/e161/lectures/image_display_a.gif
44© Shahid Farid, PUCIT