Fundamentals of Image Processing Digital Image Representation

Slides:



Advertisements
Similar presentations
Matlab Intro Simple introduction to some basic Matlab syntax. Declaration of a variable [ ] Matrices or vectors Some special (useful) syntax. Control statements.
Advertisements

1 A L L A H. Command-Window Workspace & Directory Command- History The Matlab Command window - Finding your way around.
Image Display MATLAB functions for displaying image Bit Planes
The Binary Numbering Systems
Image Processing in Matlab An Introductory Approach by Sabih D. Khan
ES 314 Lecture 2 Sep 1 Summary of lecture 1: course overview intro to matlab sections of Chapters 2 and 3.
Bit Depth and Spatial Resolution SIMG-201 Survey of Imaging Science © 2002 CIS/RIT.
Connecting with Computer Science, 2e
Lecture 2 MATLAB fundamentals Variables, Naming Rules, Arrays (numbers, scalars, vectors, matrices), Arithmetical Operations, Defining and manipulating.
Introduction to Array The fundamental unit of data in any MATLAB program is the array. 1. An array is a collection of data values organized into rows and.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Data Types Data types: Fundamental data-type in Matlab is array or Matrix. It also consists of integers, doubles, character strings, structures and cells.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
Digital Image Fundamentals II 1.Image modeling and representations 2.Pixels and Pixel relations 3.Arithmetic operations of images 4.Image geometry operation.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Matlab Programming for Engineers Dr. Bashir NOURI Introduction to Matlab Matlab Basics Branching Statements Loops User Defined Functions Additional Data.
Image Processing:Fundementals Lecture: Introduction –An image is digitized to convert it to a form which can be stored in a computer's memory or.
CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.
© 2004 R. C. Gonzalez, R. E. Woods, and S. L. Eddins Digital Image Processing Using MATLAB ® Chapter 2 Fundamentals Chapter.
3. Image Sampling & Quantisation 3.1 Basic Concepts To create a digital image, we need to convert continuous sensed data into digital form. This involves.
What Matlab can do for me? Matlab stands for MATrix LABoratory Matlab is a software package for high-performance numerical computation and visualization.
Presented By: ROLL No IMTIAZ HUSSAIN048 M.EHSAN ULLAH012 MUHAMMAD IDREES027 HAFIZ ABU BAKKAR096(06)
Digital Image Processing Lecture4: Fundamentals. Digital Image Representation An image can be defined as a two- dimensional function, f(x,y), where x.
1 COMS 161 Introduction to Computing Title: The Digital Domain Date: September 6, 2004 Lecture Number: 6.
A string is an array of characters Strings have many uses in MATLAB Display text output Specify formatting for plots Input arguments for some functions.
Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java.
Digital Image Processing Lecture 6: Introduction to M- function Programming.
Digital Image Processing Introduction to M-function Programming.
CMPS1371 Introduction to Computing for Engineers IMAGES.
INTRODUCTION TO MATLAB DAVID COOPER SUMMER Course Layout SundayMondayTuesdayWednesdayThursdayFridaySaturday 67 Intro 89 Scripts 1011 Work
Digital Image Processing Introduction to MATLAB. Background on MATLAB (Definition) MATLAB is a high-performance language for technical computing. The.
Introduction to MATLAB 1.Basic functions 2.Vectors, matrices, and arithmetic 3.Flow Constructs (Loops, If, etc) 4.Create M-files 5.Plotting.
1 Lecture 3 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Digital Image Processing. Converting between Data Classes The general syntax is B = data_class_name (A) Where data_class_name is one of the names defined.
Digital logic COMP214  Lecture 2 Dr. Sarah M.Eljack Chapter 1 1.
Computer Application in Engineering Design
(Project) by:- ROHAN HIMANSHU ANUP 70282
Image Processing 2012 Spring IELAB
Lec 3: Data Representation
The images used here are provided by the authors.
Binary Representation in Audio and Images
Image Processing Digital image Fundamentals. Introduction to the course Grading – Project: 30% – Midterm Exam: 30% – Final Exam : 40% – Total: 100% –
Lecture: MATLAB Chapter 1 Introduction
Other Kinds of Arrays Chapter 11
Other Kinds of Arrays Chapter 11
2) Platform independent 3) Predefined functions
JavaScript: Functions.
MATLAB: Structures and File I/O
CS 2770: Computer Vision Linear Algebra and Matlab
CS 1674: Intro to Computer Vision Linear Algebra Review
T490 (IP): Tutorial 2 Chapter 2: Digital Image Fundamentals
Digital Image Processing using MATLAB
Ch2: Data Representation
Use of Mathematics using Technology (Maltlab)
CSE107 Matlab Introduction
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Communication and Coding Theory Lab(CS491)
The images used here are provided by the authors.
CSE 307 Basics of Image Processing
Multimedia System Image
Spreadsheets Objective 6.02
MATLAB stands for MATrix LABoratory.
Chapter 2: Digital Image Fundamentals
Matlab Basics.
Spreadsheets Objective 6.02
Math review - scalars, vectors, and matrices
Presentation transcript:

Fundamentals of Image Processing Digital Image Representation Chapter 2 Fundamentals of Image Processing Digital Image Representation An image continuous with respect to the x- and y-coordinates, and also in amplitude. Converting such an image to digital form requires that the coordinates, as well as the amplitude, be digitized. Digitizing coordinates values is called sampling. Digitizing amplitude values is called quantization. Thus, when x, y, and the amplitude values of f are all finite, discrete quantities, we call the image a digital image. ---- © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Coordinate conventions Chapter 2 Fundamentals of Image Processing Coordinate conventions The result of sampling and quantization is a matrix of real numbers. Assume that an image f(x,y) is sampled so that the resulting image has M rows and N columns. We say that the image is of size M x N. The image origin is defined to be at (x, y)=(0, 0). The next coordinate value along the first row of the image are (x, y)= (0, 1). Note that x ranges from 0 to M-1, and y ranges from 0 to N-1 in integer increments © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Coordinate conventions Chapter 2 Fundamentals of Image Processing Coordinate conventions Image processing reference Image processing toolbox © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Images as Matrices Each element of the image array is called an image element, picture element, pixel or pel. The image can be represent for a digitized image function: © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Images as Matrices A digital image can be represented naturally as a MATLAB matrix: Where f(1,1) = f (0,0) Note that the 1xN matrix is called a row vector, whereas the Mx1 matrix is called a column vector. And a 1x1 matrix is called a scalar. © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Reading, Writing and Displaying images Followings are the image/graphics formats supported by MATLAB image processing reading and writing functions © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Reading images Images are read into MATLAB environment using function imread. imread(‘filename) Here, filename is a string containing the complete name of the image file. For ex: >> f = imread(‘moon.tif’); >>f1 = imread(‘c:\my doc\xyz.jpg’); The above stmt reads the image moon.tif into image array f. Function size( ) gives the row & column dimensions of an image >> size(f) ans= 1024 1024 © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Displaying images Images are displayed on the MATLAB desktop using function imshow( ) , which has the basic syntax: imshow(f, G) Where f is an image array, and G is the number of intensity level used to display it. If G is omitted, it defaults to 256 levels. >> imshow(f); And one more function can use to display the images on MATLAB desktop >> imview(f); © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Writing Images Images are written into disk using function imwrite, which has the following syntax: >> imwrite(f, ‘filename’); The string contained in the filename must include a recognized file format extension. Alternatively the desired format can be specified explicitly with a third input argument. For example the following command writes f to a TIFF file named xyz. >> imwrite(f, ‘xyz’, ‘tif’); or Alternatively >> imwrite(f, ‘xyz.tif’); © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Data Classes In MATLAB and IPT, following data classes are supported for representing a pixel value. © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Image Types MATLAB and IPT supports four type of images. Intensity images Binary Images Indexed images RGB images © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Intensity Images An intensity image is a data matrix whose value have been scaled to represent intensities. When the element of an intensity image are of class unit8, or class unit16, they have integer value in the range of [0, 255] and [0, 65535] respectively. If the image is of class double, the values are of floating point numbers. Values of scaled, class double intensity images are in range [0,1] by conventions. © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Binary Images Binary images having very specific meaning in MATLAB. A binary image is a logical array of 0s and 1s. Thus an arrays of 0s and 1s whose values are of data class, say, unit8, is not considered a binary image in MATLAB. Thus, if A is a numeric array consisting of 0s and 1s, we create a logical array B using the statement. B= logical(A); © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Indexed Images An indexed image consists of a data matrix, X, and a colormap matrix, map. map is an m-by-3 array of class double containing floating-point values in the range [0, 1]. Each row of map specifies the red, green, and blue components of a single color. An indexed image uses "direct mapping" of pixel values to colormap values. The color of each image pixel is determined by using the corresponding value of X as an index into map. The value 1 points to the first row in map, the value 2 points to the second row, and so on. You can display an indexed image with the statements © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing RGB Images An RGB image, sometimes referred to as a "truecolor" image, is stored in MATLAB as an m-by-n-by-3 data array that defines red, green, and blue color components for each individual pixel. RGB images do not use a palette. The color of each pixel is determined by the combination of the red, green, and blue intensities stored in each color plane at the pixel's location. Graphics file formats store RGB images as 24-bit images, where the red, green, and blue components are 8 bits each. This yields a potential of 16 million colors. The precision with which a real-life image can be replicated has led to the nickname "truecolor image." © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Conversion between data classes to image types. The toolbox provide specific functions that perform the scaling necessary to convert between image classes and types. © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Conversion between data classes to image types. Few more Image conversions may possible: 1) rgb2gray 2) im2bw 3) rgb2ind 4) ind2gray 5) ind2rgb © Dept. of Computer Science, Swami Vivekanand Mahavidyalay, Udgir (Mah)

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing M-File Element Description Function definition line functions only Defines the function name, and the number and order of input and output arguments H1 line A one line summary description of the program, displayed when you request help on an entire directory, or when you use lookfor Help text A more detailed description of the program, displayed together with the H1 line when you request help on a specific function Function or script body Program code that performs the actual computations and assigns values to any output arguments Comments Text in the body of the program that explains the internal workings of the program

Fundamentals of Image Processing Chapter 2 Fundamentals of Image Processing Basic Parts of an M-File This simple function shows the basic parts of an M-file. Note that any line that begins with % is not executable: function f = fact(n) Function definition line % Compute a factorial value. H1 line % FACT(N) returns the factorial of N, Help text % usually denoted by N! % Put simply, FACT(N) is PROD(1:N). Comment f = prod(1:n); Function body

Arithmetic Operators The arithmetic operators have M-file function equivalents, as shown: Binary addition A+B plus(A,B) Unary plus +A uplus(A) Binary subtraction A-B minus(A,B) Unary minus -A uminus(A) Matrix multiplication A*B mtimes(A,B) Arraywise multiplication A.*B times(A,B) Matrix right division A/B mrdivide(A,B) Arraywise right division A./B rdivide(A,B) Matrix left division A\B mldivide(A,B) Arraywise left division A.\B ldivide(A,B) Matrix power A^B mpower(A,B) Arraywise power A.^B power(A,B) Complex transpose A‘ ctranspose(A) Matrix transpose A.‘ transpose(A)

Image Arithmetic Functions The following table lists the image arithmetic functions. For more complete descriptions, see their reference pages. Function Description imabsdiff Absolute difference of two images imadd Add two images imcomplement Complement an image imdivide Divide two images imlincomb Compute linear combination of two images immultiply Multiply two images imsubtract Subtract two images