matlab and image processing workshop-skerg

26
Introduction to MATLAB and Image Processing By :Sulaf alMagooshi www.theSulaf.me

Upload: sulaf-almagooshi

Post on 15-Jan-2015

1.877 views

Category:

Education


11 download

DESCRIPTION

a workshop i performed for SKERG at KSU, 29th Oct.

TRANSCRIPT

Page 1: Matlab and Image Processing Workshop-SKERG

Introduction to MATLAB and Image

Processing

By :Sulaf alMagooshiwww.theSulaf.me

Page 2: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 2

Purpose and Objectives

• Learn about Image Processing.• Discover MATLAB environment. • Learn about MATLAB features.• Discover Image processing toolbox at

MATLAB.• Develop a beginner level MATLAB

application.

Page 3: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 3

Outline

• What is Image Processing?• MATLAB tour.• Image Processing in MATLAB.• Develop Image Processing Application.• Summary.

Page 4: Matlab and Image Processing Workshop-SKERG

What Is Image Processing?

Page 5: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 5

Computer imaging can be separate into two primary categories:

1. Computer Vision. 2. Image Processing.

What Is Image Processing?

Page 6: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 6

The major topics within the field of image processing include:

1. Image restoration.2. Image enhancement.3. Image compression.

Image Processing topics

Page 7: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 7

Image restoration

Page 8: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 8

Image enhancement

Page 9: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 9

Image compression

Page 10: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 10

Image Analysis Process

The image analysis process can be broken down into three primary stages:

1.Preprocessing. 2.Data Reduction. 3. Features Analysis.

Page 11: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 11

Applications of Image Processing

1.Midicine . 2.Security. 3. Astronomy.

Page 12: Matlab and Image Processing Workshop-SKERG

MATLAB Tour

Page 13: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 13

MATLAB Tour

Page 14: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 14

MATLAB Tour - some tricks !

• To know if you already used a variable name• Use “ which”.

• To clear Command Window • Use “clc”

• To know your variables• Use “ who”

• To know your variable's info• Use “ whos”

• To know your files• Use “ what”

Page 15: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 15

MATLAB Tour

If you needed Help:

Type help in Command window

Page 16: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 16

MATLAB Tour

Page 17: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 17

MATLAB TourM-files

• To store the code and execute later.

• The file name will become a function, when we call it it will execute the file.

• To open a new m-file , In the Command window , type edit

Page 18: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 18

MATLAB TourEditor

Or..

Page 19: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 19

MATLAB TourGUI

• MATLAB offers ‘ GUIDE’ tool to design graphic interface.

• In the Command window , type guide

Page 20: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 20

MATLAB TourGUI

GUIDE tool

Page 21: Matlab and Image Processing Workshop-SKERG

Image Processing in MATLAB.

Page 22: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 22

Image Processing : Basic functions

Function Description

Imread to read an image into Matlab.

imshow To show image in a figure.

Figure To create an independent figure.

size(x) To know the min and max for an object.

imwrite(image, 'filename.type')

To save the image.

rgb2gray To convert a colored image to gray one.

Page 23: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 23

Image Processing : Basic functions

Function Description

imhist(x) Create a histogram.

BW = im2bw(x) Convert to Binary image.

J = imnoise(a,'salt & pepper',d);

Add noise of type “ salt and pepper”.

IM2 = imcomplement(IM) computes the complement of the image IM.

SE = strel('square', 5); Create a structure.

IM2 = imdilate(a,SE); To dilates an image.

IM2= imerode(a,SE); To erode an image.

Page 24: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 24

MATLAB Image Processing toolbox

imtool(f)

Page 25: Matlab and Image Processing Workshop-SKERG

Activity :Develop Image

Processing Application

Page 26: Matlab and Image Processing Workshop-SKERG

Sulaf Almagooshi, 2013 26

@theSulaf [email protected]

www.theSulaf.me

Connect!