COURSE ECE-411 IMAGE PROCESSING. Er. DEEPAK SHARMA Asstt. Prof., ECE department. MMEC, MM University, Mullana.

Similar documents
Background. Computer Vision & Digital Image Processing. Improved Bartlane transmitted image. Example Bartlane transmitted image

MATLAB Image Processing Toolbox

ECC419 IMAGE PROCESSING

EC-433 Digital Image Processing

Practical Image and Video Processing Using MATLAB

IMAGE PROCESSING PAPER PRESENTATION ON IMAGE PROCESSING

Images and Graphics. 4. Images and Graphics - Copyright Denis Hamelin - Ryerson University

Digital Image processing Lab

Implementation of Image Restoration Techniques in MATLAB

What is an image? Bernd Girod: EE368 Digital Image Processing Pixel Operations no. 1. A digital image can be written as a matrix

Image and Multidimensional Signal Processing

Image processing in MATLAB. Linguaggio Programmazione Matlab-Simulink (2017/2018)

Multimedia-Systems: Image & Graphics

ROBOT VISION. Dr.M.Madhavi, MED, MVSREC

Fundamentals of Multimedia

Unit 1 DIGITAL IMAGE FUNDAMENTALS

Image Extraction using Image Mining Technique

CS 548: Computer Vision REVIEW: Digital Image Basics. Spring 2016 Dr. Michael J. Reale

SECTION I - CHAPTER 2 DIGITAL IMAGING PROCESSING CONCEPTS

APPLICATION OF COMPUTER VISION FOR DETERMINATION OF SYMMETRICAL OBJECT POSITION IN THREE DIMENSIONAL SPACE

STUDY NOTES UNIT I IMAGE PERCEPTION AND SAMPLING. Elements of Digital Image Processing Systems. Elements of Visual Perception structure of human eye

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

Introduction. Prof. Lina Karam School of Electrical, Computer, & Energy Engineering Arizona State University

Image Enhancement using Histogram Equalization and Spatial Filtering

LECTURE 02 IMAGE AND GRAPHICS

Digital Imaging Rochester Institute of Technology

DSP First Lab 06: Digital Images: A/D and D/A

Digital Image Processing

ME 6406 MACHINE VISION. Georgia Institute of Technology

Computer Vision. Howie Choset Introduction to Robotics

SYLLABUS CHAPTER - 2 : INTENSITY TRANSFORMATIONS. Some Basic Intensity Transformation Functions, Histogram Processing.

Introduction to Photography

4/9/2015. Simple Graphics and Image Processing. Simple Graphics. Overview of Turtle Graphics (continued) Overview of Turtle Graphics

Digital Image Fundamentals and Image Enhancement in the Spatial Domain

CSE 166: Image Processing. Overview. What is an image? Representing an image. What is image processing? History. Today

4 Images and Graphics

Chapter 2: Digital Image Fundamentals. Digital image processing is based on. Mathematical and probabilistic models Human intuition and analysis

It allows wide range of algorithms to be applied to the input data. It avoids noise and signals distortion problems.

Image Processing Computer Graphics I Lecture 20. Display Color Models Filters Dithering Image Compression

Applying mathematics to digital image processing using a spreadsheet

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

Computer Graphics. Si Lu. Fall er_graphics.htm 10/02/2015

PLazeR. a planar laser rangefinder. Robert Ying (ry2242) Derek Xingzhou He (xh2187) Peiqian Li (pl2521) Minh Trang Nguyen (mnn2108)

AUTOMATED MALARIA PARASITE DETECTION BASED ON IMAGE PROCESSING PROJECT REFERENCE NO.: 38S1511

Bitmap Image Formats

Chapter 3 Graphics and Image Data Representations

Digital Image Processing. Lecture 1 (Introduction) Bu-Ali Sina University Computer Engineering Dep. Fall 2011

15110 Principles of Computing, Carnegie Mellon University

6.098/6.882 Computational Photography 1. Problem Set 1. Assigned: Feb 9, 2006 Due: Feb 23, 2006

Lecture # 01. Introduction

Digital Image Processing Introduction

Course Objectives & Structure

Digital Photogrammetry. Presented by: Dr. Hamid Ebadi

Anna University, Chennai B.E./B.TECH DEGREE EXAMINATION, MAY/JUNE 2013 Seventh Semester

Lecture 1: image display and representation

Acquisition and representation of images

Ch. 3: Image Compression Multimedia Systems

Mech 296: Vision for Robotic Applications. Vision for Robotic Applications

3.1 Graphics/Image age Data Types. 3.2 Popular File Formats

Introduction to DSP ECE-S352 Fall Quarter 2000 Matlab Project 1

BASIC OPERATIONS IN IMAGE PROCESSING USING MATLAB

Number Plate Recognition Using Segmentation

Prof. Feng Liu. Fall /02/2018

An Efficient Color Image Segmentation using Edge Detection and Thresholding Methods

Digital images. Digital Image Processing Fundamentals. Digital images. Varieties of digital images. Dr. Edmund Lam. ELEC4245: Digital Image Processing

Image Processing (EA C443)

CGT 511. Image. Image. Digital Image. 2D intensity light function z=f(x,y) defined over a square 0 x,y 1. the value of z can be:

DIGITAL IMAGE PROCESSING (COM-3371) Week 2 - January 14, 2002

Computer Assisted Image Analysis 1 GW 1, Filip Malmberg Centre for Image Analysis Deptartment of Information Technology Uppsala University

Digital Imaging and Image Editing

A PROPOSED ALGORITHM FOR DIGITAL WATERMARKING

CS 262 Lecture 01: Digital Images and Video. John Magee Some material copyright Jones and Bartlett

CHAPTER 2 - DIGITAL DATA REPRESENTATION AND NUMBERING SYSTEMS

Introduction to Visual Perception & the EM Spectrum

Review. Introduction to Visual Perception & the EM Spectrum. Overview (1):

Glossary Unit 1: Hardware/Software & Storage Media

Digital Image Processing. Lecture # 8 Color Processing

Computer Programming

HISTOGRAM BASED AUTOMATIC IMAGE SEGMENTATION USING WAVELETS FOR IMAGE ANALYSIS

Acquisition and representation of images

Digital Image Processing and Machine Vision Fundamentals

Image processing. Image formation. Brightness images. Pre-digitization image. Subhransu Maji. CMPSCI 670: Computer Vision. September 22, 2016

CHAPTER 8 Digital images and image formats

comp 471 / cart 498c computer graphics: real-time video Monday 11 Sep 06

TDI2131 Digital Image Processing

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates

Automated License Plate Recognition for Toll Booth Application

Sensors and Sensing Cameras and Camera Calibration

Lecture #2. Image acquisition Images in the spatial domain. MATLAB image processing. EECS490: Digital Image Processing

An Improved Bernsen Algorithm Approaches For License Plate Recognition

RESEARCH PAPER FOR ARBITRARY ORIENTED TEAM TEXT DETECTION IN VIDEO IMAGES USING CONNECTED COMPONENT ANALYSIS

World Journal of Engineering Research and Technology WJERT

Exercise questions for Machine vision

Image acquisition. In both cases, the digital sensing element is one of the following: Line array Area array. Single sensor

Introduction to Color Theory

Lossy and Lossless Compression using Various Algorithms

Figures from Embedded System Design: A Unified Hardware/Software Introduction, Frank Vahid and Tony Givargis, New York, John Wiley, 2002

Digitizing Color. Place Value in a Decimal Number. Place Value in a Binary Number. Chapter 11: Light, Sound, Magic: Representing Multimedia Digitally

Last Lecture. Lecture 2, Point Processing GW , & , Ida-Maria Which image is wich channel?

Assistant Lecturer Sama S. Samaan

Transcription:

COURSE ECE-411 IMAGE PROCESSING Er. DEEPAK SHARMA Asstt. Prof., ECE department. MMEC, MM University, Mullana.

Why Image Processing? For Human Perception To make images more beautiful or understandable Automatic Perception of Image We call it Machine Vision, Computer Vision, Machine Perception, Computer Recognition For Storage and Transmission smaller, faster, more effective Image Processing for New Image Generation (New trends) Computer Graphics introduced Image Processing Computer Vision technologies and

The Electromagnetic Spectrum Images based on radiation from the EM spectrum EM : wave stream of mass less particles Each particle contains energy

Example: a cell Image of a cell corrupted by electronic noise. Result after averaging several noisy images (a common technique for noise reduction)

Example: an x-ray An original x-ray image Result possible after contrast and edge enhancement

Example: image deblurring Image of a human face blurred by uniform motion during exposure. Resulting image after application of a deblurring algorithm

Simple Image Model Monochrome image (or simply image) refers to a 2- dimensional light intensity function f(x,y). x and y denote spatial coordinates the value of f(x,y) at (x,y) is proportional to the brightness (or gray level) of the image at that point.

Simple image formation f(x,y) = i(x,y)*r(x,y) 0 < i(x,y) < ; illumination or intensity of incident light 0 < r(x,y) < 1 ; reflectance or reflectivity of object. In real situation L min f(x,y)) L max

Why Digital? Unification of processing Computers is at the center of information processing Digital information is just right form for computer processing Text, Image, Sound, Movie, and other Multimedia are digitized into computer Noise reduction Digital processing reduces noises Guarantee the same quality regardless of time and place Easy storage Since the same form is used for every information, it can be stored in H/D, CD, DVD, Flash memory, etc. Transmission Less Bandwidth

Digital image A digital image is an image f(x,y) that has been discretized both in spatial coordinates and in brightness. Considered as a matrix whose row and column indices represent a point in the image. The corresponding matrix element value represents the gray level at that point. The elements of such an array are referred to as: image elements or picture elements (pixels or pels)

Digital Image Processing The field of digital image processing refers to processing digital images by using computers. Image processing is a branch in which both the input and output of a process are images. The goal of computer vision is to use computers to emulate human vision, including learning, making inferences and taking actions. The area of image analysis is in between image processing and computer vision.

Types of Processes in Image Processing There are 3 types of computerized processes. Low level processes mid level processes and high level processes. Low-level processes involve primitive operations such as image preprocessing to reduce noise, contrast enhancement and image sharpening. Here both the input and output are images. Mid-level processing involves segmentation (partitioning image into regions), description of objects to reduce them to a form so that a computer can process and classification (recognition) of objects. Here inputs are images but outputs are attributes extracted from images.

In high-level processing, we make sense of a collection of recognized objects. The process of acquiring an image of a text, processing it, extracting (segmenting) individual characters, describing characters suitable for computer processing and recognizing those individual characters are in the scope of digital image processing. Making sense of the content of the page (text) is viewed as the domain of image analysis and computer vision.

Fundamental steps in Digital Image Processing Image acquisition Image enhancement Image Restoration Color Image Processing Image Compression Morphological Processing Image Segmentation Representation and description Recognition

Fundamental steps in Digital Image Processing

Steps in an image processing system Image acquisition This stage involves preprocessing, such as scaling. Acquire a digital image using an image sensor In detail, devices that are sensitive to energy(electromagnetic, sound, ) If not digital, an analog-to-digital conversion process is required The nature of the image sensor (and the produced image) are determined by the application In general, CCD(charge-coupled device) or CMOS sensors are widely used Examples : Digital camera, Video camera, Scanner,..

CCD (Charged-Coupled Device) cameras Tiny solid state cells convert light energy into electrical charge. The image plane acts as a digital memory that can be read row by row by a computer.

Steps in an image processing system Image enhancement Here we bring out details that were obscured or highlight some features of interest in an image. (eg) increasing the contrast of an image. Image Restoration Here we talk about how to improve the appearance of an image. Unlike enhancement, which is subjective, this is objective. Color Image Processing Due to Internet, this area is becoming popular. Various color models are worthy to know. Wavelets Representing the images in various degrees of resolution in the basis of wavelets.

Steps in an image processing system Compression It is a technique for reducing the storage required to save an image or bandwidth needed to transmit. Morphological Processing It deals with tools for extracting image components that are useful in the representation and description of shape.

Steps in an image processing system Segmentation Broadly defined: breaking an image into its constituent parts In general, one of the most difficult tasks in image processing Good segmentation simplifies the rest of the problem Poor segmentation make the task impossible Output is usually raw pixel data: may represent region boundaries, points in the region itself, etc. Boundary representation can be useful when the focus is on external shape characteristics (e.g. corners, rounded edges, etc.) Region representation is appropriate when the focus is on internal properties

Steps in an image processing system Representation & description Representation: transforming raw data into a form suitable for computer processing Description (also called feature extraction) deals with extracting features that result in some quantitative information of interest or features which are basic for differentiating one class of objects from another In terms of character recognition, descriptors such as lakes (holes) and bays help differentiate one part of the alphabet from another

Steps in an image processing system Recognition & Interpretation Recognition: The process which assigns a label to an object based on the information provided by its descriptors may be the alphanumeric character A Interpretation: Assigning meaning to an ensemble of recognized objects. 35487-0286 may be a ZIP code

The knowledge base Knowledge about a problem domain is coded into an image processing system in the form of a knowledge database May be simple: detailing areas of an image expected to be of interest May be complex A list of all possible defects of a material in a vision inspection system Guides operation of each processing module Controls interaction between modules Provides feedback through the system

Steps in an image processing system Not all image processing systems would require all steps/processing modules Image enhancement for human visual perception may not go beyond the preprocessing stage A knowledge database may not be required Processing systems which include recognition and interpretation are associated with image analysis systems in which the objective is autonomous (or at least partially automatic)

Components of an Image Processing System

Basic components of a general-purpose system used for digital image processing Image sensors Two elements are needed to acquire digital images. First one is the physical device that is sensitive to energy radiated by the object that we want to image. The second one, called the digitizer, is a device for converting the output of the physical sensing device into digital form. Ex. - in a digital video camera, the sensors produce an electrical output proportional to light intensity.

Basic components of a general-purpose system used for digital image processing Specialized Image Processing Hardware - It consists of digitizer plus hardware that performs other primitive operations such as an arithmetic logic unit (ALU), which performs arithmetic and logical operations on entire image. This type of hardware is also called as front-end subsystem and its characteristic is speed. This unit does things that require fast data throughputs which main computer cannot handle. Computer In an image processing system it is a generalpurpose computer. Software It consists of specialized modules that does specific tasks (eg. matlab)

Basic components of a general-purpose system used for digital image processing Mass storage An image of 1024 X 1024 size, storing the intensity of each pixel in 8 bits, requires one megabyte of storage. For short-time storage, we can use computer memory. Another method is to use a specialized board called frame buffer, that store one or more images and can be accessed rapidly. They enable us to instantaneously zoom, scroll (vertical shift) and pan (horizontal shift). For on-line storage magnetic disks or optical-media are used. The archival storage needs massive capacity but are accessed infrequently. Image Displays These are mainly color TV monitors. Hardcopy These devices include laser printers, film cameras, inkjet units, etc.

Sampling & Quantization Image sampling Digitization of spatial coordinates (x,y) Quantization Amplitude digitization The quality of a digital image is determined to a large degree by the number of samples and discrete gray levels used in sampling and quantization

Sampling & Quantization

The intensity variation sampled at regular intervals along the scan line 300 250 200 150 100 50 0 10 20 30 40 50 60 70 80 90 100

Four level intensity quantization of sampled scan line 260 240 220 200 180 160 140 120 100 80 60 0 10 20 30 40 50 60 70 80 90 100

Formulation of Digital Image

Image Resolution Spatial Resolution (x,y) Spatial resolution is the smallest discernible detail in an image A line pair : a line and its adjacent space A widely used definition of resolution is the smallest number of discernible line pairs per unit distance. Ex: 100 line pairs/mm But, unit distance or unit area is omitted in most cases

Spatial Resolution

Image Resolution(Cont..) Gray-level Resolution Gray-level resolution is the smallest discernible change in gray level (but, highly subjective!) Due to hardware considerations, we only consider quantization level Usually an integer power of 2. The most common level is 2 8 =256 However, we can find some systems that can digitize the gray levels of an image with 10 to 12 bits of accuracy.

Gray-level Resolution

Storage For MxN image with L(=2k) discrete gray level The number, b, of bits required to store the image is b = M*N*k bits Ex1: 1024x1024x8bit = 1Mbytes Common image file formats GIF (Graphic Interchange Format) - PNG (Portable Network Graphics) JPEG (Joint Photographic Experts Group) TIFF (Tagged Image File Format) PGM (Portable Gray Map) FITS (Flexible Image Transport System)

Overview of MATLAB Data Types Data Types Logical (0 or 1) Char Numeric Function handling Structure Cell or Array Integer Fraction Signed Unsigned Single Double

Overview of MATLAB Data Types Data types in MATLAB Double (64-bit double-precision floating point) Single (32-bit single-precision floating point) Int32 (32-bit signed integer) Int16 (16-bit signed integer) Int8 (8-bit signed integer) Uint32 (32-bit unsigned integer) Uint16 (16-bit unsigned integer) Uint8 (8-bit unsigned integer)

Image types x(m,n) = 0 or 1: binary image x(m,n) = 0, 1, 2, P-1: grayscale image P typically something like 256, 512 or some power of 2. 256 is really the most common 0 = black, P = white x(m,n) = [0 to P-1, 0 to P-1, 0 to P-1] Red, green, blue color image Like three grayscale images x(m,n) = index into color map. Color map = three column table with all possible colors Image index says which row in that table gives RBG valuesfor that pixel So long as table is known, very easy to store indices

Image Type

Difference between Indexed Image and RGB Image Indexed Image RGB Image

Important MATLAB commands imread: Read an image figure: creates a figure on the screen. imshow(g): which displays the matrix g as an image. pixval : turns on the pixel values in our figure. impixel(i,j): the command returns the value of the pixel (i,j) iminfo: Information about the image.

Converting between Data classes and Image types Converting between data classes Converting between Image classes to data classes Converting between Image classes Note : When converting between data classes, it is important to keep in mind the value range for each data classes should be in range.

Converting between data classes General syntax for converting data classes A = given data class B = data class in which we want to convert A B = data_class(a) Ex : A in uint8 and we want to convert in to double, then B = double(a)

Converting between data classes Ex 1:double to unsigned integer of 8 bit A = 34.6500 >> B =uint8(a) B = 35

Converting between data classes Ex 2 : Double to unsigned integer of 8 bit A = 265.7800 >> B = uint8(a) B = 255 >> C = -2.76 C = -2.7600 >> D = uint8(c) D = 0 Note : Here range of unsigned integer of 8 bits is [0 255]

Converting between data classes Rule for conversion Convert to 0 all the values are less than 0. Convert to 255 all the values are greater than 255 Convert numbers between 0-255 to corresponding integer values. E.g.: 5.8 convert into 6

Converting between Image classes to data classes Conversion should perform necessary scaling for the toolbox to recognize the data as valid image data. Ex: im2uint8 Function set all the value less than 0 to 0 And set 1 all the value those are greater than 1 Now image range is in [0 1] Multiplies 255 to all values and round off to integer. Now range is in [0 255]

Converting between Image classes to data classes Ex 3: image of class double to unsigned integer 8 f = 1.4897 0.6715 1.6302 1.4090-1.2075 0.4889 1.4172 0.7172 1.0347 >> g=im2uint8(f) g = 255 171 255 255 0 125 255 183 255

Ex 4: unsigned integer8 to double >> h = uint8(h) h = 26 67 12 212 156 178 23 45 67 >> g = im2double(h) g = 0.1020 0.2627 0.0471 0.8314 0.6118 0.6980 0.0902 0.1765 0.2627

Ex 4: Function im2double convert input image to double format in range [0 1]. Divide all values by 255 (in case of uint8, if uint16 than divide by 65535) Range of image in double format must be [0 1] Function mat2gray convert any matrix to gray image of double data class.

Ex 5 : any matrix to image h = 26 67 12 212 156 178 23 45 67 >> g = mat2gray(h) g = 0.0700 0.2750 0 1.0000 0.7200 0.8300 0.0550 0.1650 0.2750

Ex 6 : any matrix to binary image using threshold 0.6 h = 26 67 12 212 156 178 23 45 67 >> g = mat2gray(h) g = 0.0700 0.2750 0 1.0000 0.7200 0.8300 0.0550 0.1650 0.2750 >> g=im2bw(h,0.6) g = 0 0 0 1 1 1 0 0 0

Ex 6: Function im2bw(f,t) convert any image into binary image with threshold T. All the values less than T are set to 0 All the values greater than T are set to 1 First all values are converted into double and than threshold is applied.

Some important function function convert input into Valid input Image data class im2uint8 uint8 Logical,uint8,uint16 and double im2uint16 uint16 Logical,uint8,uint16 and double mat2gray double (in range [0,1]) Logical,uint8,uint16 and double im2double double Logical,uint8,uint16 and double im2bw logical uint8,uint16 and double

Converting between Image classes Important function gray2ind - intensity image to index image ind2gray - indexed image to intensity image rgb2gray - RGB image to grayscale rgb2ind - RGB image to indexed image

Ex 7: rgb image to gray >> f = imread('lenna.png'); >> g = rgb2gray(f); >> subplot(1,2,1);imshow(f); >>subplot(1,2,2);imshow(g);

Array Indexing MATLAB support many powerful indexing scheme that simplifying array manipulation and improve the efficiency of program. For image processing toolbox Vector indexing Matrix indexing Images are represented in matrix.

Vector Indexing Array of dimension 1xn : row vector Array of dimension nx1 : column vector First element will start from 1 not from 0 (zero) Ex: consider following vector v = [3 8 2 7 5 9 1 4] Different commands for vector indexing 1. v(3) = [3 8 2 7 5 9 1 4] = 2 % to access 3 rd element 2. V = produce column vector of v Note : transpose operator (. )

Vector Indexing(cont.) 3. v(1:3) produce element from index 1 to 3 v(1:3) = [3 8 2 7 5 9 1 4] = 3 8 2 4. v(3:5) = [3 8 2 7 5 9 1 4] = 2 7 5 5. v(end) = [3 8 2 7 5 9 1 4] = 4 % to access last element of array 6. v(5:end) = [3 8 2 7 5 9 1 4] = 5 9 1 4 % to access 5 th to last element 7. v(: ) = produce column matrix 8. V(1:2:end) = [3 8 2 7 5 9 1 4] = 3 2 5 1 9. V([1 4 7]) = [3 8 2 7 5 9 1 4] = 3 7 1 Note : index 1:2:end means start from 1 count up by 2 and end with last element. Steps can be negative, Ex.: V(end:-2:1) = [3 8 2 7 5 9 1 4] = 3 2 5 1 Start with last element count down by 2 and end with first element

Matrix indexing Matrix can be written in MATLAB >> A= [1 2 3; 4 5 6; 7 8 9] A = 1 2 3 4 5 6 7 8 9 >> size(a) ; % to find dimention of matrix 3 3

Matrix indexing(cont..) Examples for matrix indexing 1. To extract element of 3 rd row,2 column A = 1 2 3 4 5 6 7 8 9 A(3,2) = 8 Note : general format is A(row, column)

2. To extract all element from 2 nd row A(2,:) = 4 5 6 3. To extract all element from 3 rd column A(:,3) = 3 6 9 4. to fetch top 2 row A(1:2,1:3) = 1 2 3 4 5 6 Same for to fetch last 2 column A(1:3, 2:3)