Session 1 by Shahid Farid
Course introduction What is image and its attributes? Image types Monochrome images Grayscale images Course introduction Color images Color lookup table Image Histogram Shahid Farid, PUCIT 2
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, 3 rd Ed. (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 UMC 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
Describing DIP as IMAGE IN -> IMAGE OUT is simplistic What about computing the average gray-level of a picture? Inference about the structure of the world is mostly the domain of Computer Vision Shahid Farid, PUCIT 9
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 10
Image Enhancement Shahid Farid, PUCIT 11
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 12
Another example from HST Shahid Farid, PUCIT 13
Color Image Restoration Shahid Farid, PUCIT 14
Noise Removal Shahid Farid, PUCIT 15
Shahid Farid, PUCIT 16
Shahid Farid, PUCIT 17
Shahid Farid, PUCIT 18
Shahid Farid, PUCIT 19
Shahid Farid, PUCIT 20
Morphing Shahid Farid, PUCIT 21
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). Shahid Farid, PUCIT 22
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 Shahid Farid, PUCIT 23
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. Shahid Farid, PUCIT 24
Resolution is the number of pixels in a linear inch (i.e. pixels per inch or ppi). The more pixels per inch (ppi), the higher your image resolution will be. Shahid Farid, PUCIT 25
Resolution 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). Shahid Farid, PUCIT 26
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? Shahid Farid, PUCIT 27
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) Shahid Farid, PUCIT 28
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? Shahid Farid, PUCIT 29
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 Shahid Farid, PUCIT 30
2 inches 300 PPI / 600 x 600 pixel dimension 72 PPI / 144 x 144 pixel dimension 30 PPI / 60 x 60 pixel dimension Shahid Farid, PUCIT 31
Shahid Farid, PUCIT 32
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 2 8, or 256, possible values. Shahid Farid, PUCIT 33
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 34
Shahid Farid, PUCIT 35
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 36
Shahid Farid, PUCIT 37
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) 38
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 480 color image? Shahid Farid, PUCIT 39
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 480 color image? Shahid Farid, PUCIT 40
Shahid Farid, PUCIT 41
Image 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 42
Histogram of Lena s grayscale image Shahid Farid, PUCIT 43
Histogram of Lena s colored image Shahid Farid, PUCIT 44
Text book and recommended reference books http://www.microscopemicroscope.org/imaging/imageresolution.htm http://www.espressographics.com/text/imag esize.html http://fourier.eng.hmc.edu/e161/lectures/im age_display_a.gif Shahid Farid, PUCIT 45
Session - 1 By: Dr. Shahid Farid Assistant Professor, PUCIT E-mail: shahid@pucit.edu.pk