MATLAB® Image Processing Toolbox

Slides:



Advertisements
Similar presentations
1 A L L A H. Command-Window Workspace & Directory Command- History The Matlab Command window - Finding your way around.
Advertisements

Laboratory of Image Processing Pier Luigi Mazzeo
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 4 – Digital Image Representation Klara Nahrstedt Spring 2009.
November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Image Data Representations and Standards
Computational Biology, Part 23 Biological Imaging II Robert F. Murphy Copyright  1996, 1999, All rights reserved.
Image Processing Lecture 4
MATLAB Image Processing Toolbox. Introduction  Collection of functions (MATLAB files) that supports a wide range of image processing operations  Documentation.
Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
July 27, 2002 Image Processing for K.R. Precision1 Image Processing Training Lecture 1 by Suthep Madarasmi, Ph.D. Assistant Professor Department of Computer.
Digital Image Processing
Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
School of Computing Science Simon Fraser University
Processing Digital Images. Filtering Analysis –Recognition Transmission.
Digital Audio, Image and Video Hao Jiang Computer Science Department Sept. 6, 2007.
Images.
Computational Tools for Image Processing Lecture 1, Jan 22nd, 2007 Part 2 (8:10-9:20pm) by Lexing Xie EE4830 Digital Image Processing
Digital Image Processing 3rd Edition
1 Prepared by: Precise Object Tracking under Deformation Eng. Mohamed Hassan, EAEA Supervised by: Prof. Dr. Hussien Konber, Al Azhar University Prof. Dr.
Introduction to Image Processing Grass Sky Tree ? ? Review.
Page 18/30/2015 CSE 40373/60373: Multimedia Systems 4.2 Color Models in Images  Colors models and spaces used for stored, displayed, and printed images.
Chapter 2. Image Analysis. Image Analysis Domains Frequency Domain Spatial Domain.
Sundermeyer MAR 550 Spring Laboratory in Oceanography: Data and Methods MAR550, Spring 2013 Miles A. Sundermeyer Image Processing/Analysis.
: Chapter 12: Image Compression 1 Montri Karnjanadecha ac.th/~montri Image Processing.
Simple Image Processing Speaker : Lin Hsiu-Ting Date : 2005 / 04 / 27.
Image and Video Processing in MATLAB Partly based on slides by Dmitri Roduy.
Gulsah Tumuklu Ozyer MATLAB IMAGE PROCESSING TOOLBOX.
Digital Cameras And Digital Information. How a Camera works Light passes through the lens Shutter opens for an instant Film is exposed to light Film is.
1 Imaging Techniques for Flow and Motion Measurement Lecture 2 Lichuan Gui University of Mississippi 2011 Digital Image & Image Processing.
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.
AdeptSight Image Processing Tools Lee Haney January 21, 2010.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
Presented By: ROLL No IMTIAZ HUSSAIN048 M.EHSAN ULLAH012 MUHAMMAD IDREES027 HAFIZ ABU BAKKAR096(06)
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well.
Digital Image Processing Lecture4: Fundamentals. Digital Image Representation An image can be defined as a two- dimensional function, f(x,y), where x.
Course 2 Image Filtering. Image filtering is often required prior any other vision processes to remove image noise, overcome image corruption and change.
11/29/ Image Processing. 11/29/ Systems and Software Image file formats Image processing applications.
Digital Image Processing
Digital Image Processing Introduction to MATLAB. Background on MATLAB (Definition) MATLAB is a high-performance language for technical computing. The.
Image File Formats By Dr. Rajeev Srivastava 1. Image File Formats Header and Image data. A typical image file format contains two fields namely Dr. Rajeev.
Lecture 27: Image Processing
CDS 301 Fall, 2008 Image Visualization Chap. 9 November 11, 2008 Jie Zhang Copyright ©
Ec2029 digital image processing
Machine Vision ENT 273 Hema C.R. Binary Image Processing Lecture 3.
Introduction to Digital Image Analysis Kurt Thorn NIC.
Masaki Hayashi 2015, Autumn Visualization with 3D CG Digital 2D Image Basic.
8th Lecture – Intro to Bitmap or Raster Images
Chapter 10 Digital Signal and Image Processing
Computer Application in Engineering Design
(Project) by:- ROHAN HIMANSHU ANUP 70282
- photometric aspects of image formation gray level images
MATLAB Distributed, and Other Toolboxes
Chapter 3 Graphics and Image Data Representations
Image enhancement algorithms & techniques Point-wise operations
Images, Display, Perception
Digital 2D Image Basic Masaki Hayashi
IIS for Image Processing
Introduction to Computer Graphics
Chapter 8, Exploring the Digital Domain
Digital Image Fundamentals
Digital Image Processing using MATLAB
6th Lecture – Rectangles and Regions, and intro to Bitmap Images
Image Processing, Lecture #8
Image Processing, Lecture #8
CSE 307 Basics of Image Processing
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
Fundamentals of Image Processing Digital Image Representation
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
Review and Importance CS 111.
Presentation transcript:

MATLAB® Image Processing Toolbox Rahman Tashakkori, Appalachian Sue Lea, UNCG "A Consortium to Promote Computational Science and High Performance Computing" Workshop – July 26-28, 2004

Image Processing Toolbox The Image Processing Toolbox is a collection of functions that support a wide range of image processing operations, including: Spatial image transformations Morphological operations Neighborhood and block operations Linear filtering and filter design Transforms Image analysis and enhancement Image registration Deblurring Region of interest operations

Reading and displaying images The MATLAB imread allows reading images in several different formats: I = imread(‘filename.ext'); Where the “.ext” refers to the extension for possible formats. Here is the list: bmp, cur, gif, hdf, ico, jpg, jpeg, pbm, pcx, pgm, png, pnm, ppm, ras, tif, tiff, and xwd To display an image we will use imshow(I) The imview function displays an image in a separate Java-based window called the Image Viewer, which provides access to additional tools that aid in navigating around an image, especially large images, and enable the inspection of pixels in an image. More information on supported formats: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/imread.html#713744

Image Types The Image Processing Toolbox supports four basic types of images: Indexed images Intensity images Binary images RGB images Reading and Writing Image Data         Reading a Graphics Image         Writing a Graphics Image         Querying a Graphics File         Converting Image Storage Classes         Converting Graphics File Formats         Reading and Writing DICOM Files

Example: I = imread('pout.tif'); Imshow(I); Produces:

Reading and displaying images You can also get information about variables in the workspace by calling the whos command. whos Name Size Bytes Class I 291x240 69840 uint8 array Grand total is 69840 elements using 69840 bytes To write an image to a disk file, use the imwrite function. If you include the filename extension '.png', the imwrite function writes the image to a file in Portable Network Graphics (PNG) format, but you can specify other formats. imwrite (I2, 'pout2.png'); imwrite(A,filename,fmt) imwrite(X,map,filename,fmt) imwrite(...,filename) imwrite(...,Param1,Val1,Param2,Val2...)

Coordinate Systems         Pixel Coordinates         Spatial Coordinates

Storage Classes By default, MATLAB stores most data in arrays of class double. The data in these arrays is stored as double-precision (64-bit) floating-point numbers. All MATLAB functions work with these arrays. For image processing, however, this data representation is not always ideal. The number of pixels in an image can be very large; for example, a 1000-by-1000 image has a million pixels. Since each pixel is represented by at least one array element, this image would require about 8 megabytes of memory. To reduce memory requirements, MATLAB supports storing image data in arrays as 8-bit or 16-bit unsigned integers, class uint8 and uint16. These arrays require one eighth or one fourth as much memory as double arrays.

Histogram Equalization As you can see, pout.tif is a somewhat low contrast image. To see the distribution of intensities in pout.tif, we can create a histogram by calling the imhist function imadjdemo

Create a Binary Version of the Image Create a binary version of the image by using thresholding. The function graythresh automatically computes an appropriate threshold to use to convert the intensity image to binary. The im2bw function performs the conversion. level = graythresh(I); bw = im2bw(I,level); imshow(bw)

Determine the Number of Objects in the Image After converting the image to a binary image, we can use the bwlabel function to determine the number of objects in the image. The bwlabel function labels all the components in the binary image bw and returns the number of components it finds in the image in the output value, numObjects. [labeled,numObjects] = bwlabel(bw,4); numObjects ans = 101 The accuracy of the results depends on a number of factors, including The size of the objects Whether or not any objects are touching (in which case they might be labeled as one object) The accuracy of the approximated background The connectivity selected. The parameter 4, passed to the bwlabel function, means that pixels must touch along an edge to be considered connected. In our case: [labeled,numObjects] = bwlabel(bw,4); produces 48

% Image Processing Toolbox --- demos and sample images % dctdemo - 2-D DCT image compression demo. % edgedemo - Edge detection demo. % firdemo - 2-D FIR filtering and filter design demo. % imadjdemo - Intensity adjustment and histogram equalization demo. % landsatdemo - Landsat color composite demo. % nrfiltdemo - Noise reduction filtering demo. % qtdemo - Quadtree decomposition demo. % roidemo - Region-of-interest processing demo. % Extended-examples. % ipexindex - Index of extended examples. % ipexsegmicro - Segmentation to detect microstructures. % ipexsegcell - Segmentation to detect cells. % ipexsegwatershed - Watershed segmentation. % ipexgranulometry - Granulometry of stars. % ipexdeconvwnr - Wiener deblurring. % ipexdeconvreg - Regularized deblurring. % ipexdeconvlucy - Lucy-Richardson deblurring. % ipexdeconvblind - Blind deblurring. % ipextform - Image transform gallery. % ipexshear - Image padding and shearing. % ipexmri - 3-D MRI slices. % ipexconformal - Conformal mapping. % ipexnormxcorr2 - Normalized cross-correlation. % ipexrotate - Rotation and scale recovery. % ipexregaerial - Aerial photo registration.

% Image Processing Toolbox --- demos and sample images % Extended-example helper M-files. % ipex001 - Used by image padding and shearing example. % ipex002 - Used by image padding and shearing example. % ipex003 - Used by MRI slicing example. % ipex004 - Used by conformal mapping example. % ipex005 - Used by conformal mapping example. % ipex006 - Used by conformal mapping example.

Terminology Interpolation Interpolation Methods Image Types Spatial Transformations     Terminology     Interpolation         Interpolation Methods         Image Types

Other Spatial Transformations    Image Resizing         Specifying the Size of the Output Image         Specifying the Interpolation Method         Using Filters to Prevent Aliasing     Image Rotation         Specifying the Interpolation Method         Specifying the Size of the Output Image     Image Cropping     Performing General Spatial Transformations         Specifying the Transformation Type         Performing the Transformation         Advanced Spatial Transformation Techniques

Image Registration     Terminology     Registering an Image         Point Mapping         Example: Registering to a Digital Orthophoto     Types of Supported Transformations     Selecting Control Points         Using the Control Point Selection Tool         Starting the Control Point Selection Tool         Viewing the Images         Specifying Matching Control Point Pairs         Saving Control Points

Linear Filtering and Filter Design    Terminology     Linear Filtering         Convolution         Correlation         Filtering Using imfilter         Using Predefined Filter Types     Filter Design         FIR Filters         Frequency Transformation Method         Frequency Sampling Method         Windowing Method         Creating the Desired Frequency Response Matrix         Computing the Frequency Response of a Filter

Transforms     Terminology     Fourier Transform         Definition of Fourier Transform         Discrete Fourier Transform         Applications of the Fourier Transform     Discrete Cosine Transform         The DCT Transform Matrix         DCT and Image Compression     Radon Transform         Plotting the Radon Transform         Viewing the Radon Transform as an Image         Using the Radon Transform to Detect Lines         Inverse Radon Transform         Example: Reconstructing an Image from Parallel Projection Data     Fan-Beam Projection Data         Computing Fan-Beam Projection Data         Reconstructing an Image from Fan-Beam Projection Data         Working with Fan-Beam Projection Data

Morphological Operations    Terminology     Dilation and Erosion         Understanding Dilation and Erosion         Structuring Elements         Dilating an Image         Eroding an Image         Combining Dilation and Erosion         Dilation- and Erosion-Based Functions     Morphological Reconstruction         Marker and Mask         Pixel Connectivity         Flood-Fill Operations         Finding Peaks and Valleys     Distance Transform     Objects, Regions, and Feature Measurement         Connected-Component Labeling         Selecting Objects in a Binary Image         Finding the Area of the Foreground of a Binary Image         Finding the Euler Number of a Binary Image     Lookup Table Operations

Analyzing and Enhancing Images     Terminology     Pixel Values and Statistics         Pixel Selection         Intensity Profile         Image Contours         Image Histogram         Summary Statistics         Region Property Measurement     Image Analysis         Edge Detection         Boundary Tracing         Quadtree Decomposition     Intensity Adjustment         Adjusting Intensity Values to a Specified Range         Histogram Equalization         Contrast-Limited Adaptive Histogram Equalization         Decorrelation Stretching     Noise Removal         Using Linear Filtering         Using Median Filtering         Using Adaptive Filtering

Region-Based Processing     Terminology     Specifying a Region of Interest         Selecting a Polygon         Other Selection Methods     Filtering a Region         Example: Filtering a Region in an Image         Specifying the Filtering Operation     Filling a Region

Image Debluring     Terminology     Understanding Deblurring         Causes of Blurring         Deblurring Model     Using the Deblurring Functions         Deblurring with the Wiener Filter         Deblurring with a Regularized Filter         Deblurring with the Lucy-Richardson Algorithm         Deblurring with the Blind Deconvolution Algorithm         Creating Your Own Deblurring Functions     Avoiding Ringing in Deblurred Images

Color     Terminology     Working with Different Screen Bit Depths         Determining Screen Bit Depth         Choosing a Screen Bit Depth     Reducing the Number of Colors in an Image         Using rgb2ind         Reducing Colors in an Indexed Image         Dithering     Converting Color Data Between Color Spaces         Converting Between Device-Independent Color Spaces         Performing Profile-Based Conversions         Converting Between Device-Dependent Color Spaces

Wavelet Analysis – Wavelet Toolbox Wavelet analysis has become very popular in image processing. The main idea is to break an image into sub-bands in different frequency and time domain. MATLAB provides an excellent toolbox for performing wavelet analysis on both one- and two-dimensional data. Demo:

.m files – Example Hotelling Transform Allows us to create a .m file that contains all the commands we wish to run at once. Then by typing the file name, we can run those commands. Let’s look at one example. C:\course\ImgProcessing\hotelling