matlab and image processing workshop-skerg

Post on 15-Jan-2015

1.877 Views

Category:

Education

11 Downloads

Preview:

Click to see full reader

DESCRIPTION

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

TRANSCRIPT

Introduction to MATLAB and Image

Processing

By :Sulaf alMagooshiwww.theSulaf.me

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.

Sulaf Almagooshi, 2013 3

Outline

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

What Is Image Processing?

Sulaf Almagooshi, 2013 5

Computer imaging can be separate into two primary categories:

1. Computer Vision. 2. Image Processing.

What Is Image Processing?

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

Sulaf Almagooshi, 2013 7

Image restoration

Sulaf Almagooshi, 2013 8

Image enhancement

Sulaf Almagooshi, 2013 9

Image compression

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.

Sulaf Almagooshi, 2013 11

Applications of Image Processing

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

MATLAB Tour

Sulaf Almagooshi, 2013 13

MATLAB Tour

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”

Sulaf Almagooshi, 2013 15

MATLAB Tour

If you needed Help:

Type help in Command window

Sulaf Almagooshi, 2013 16

MATLAB Tour

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

Sulaf Almagooshi, 2013 18

MATLAB TourEditor

Or..

Sulaf Almagooshi, 2013 19

MATLAB TourGUI

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

• In the Command window , type guide

Sulaf Almagooshi, 2013 20

MATLAB TourGUI

GUIDE tool

Image Processing in MATLAB.

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.

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.

Sulaf Almagooshi, 2013 24

MATLAB Image Processing toolbox

imtool(f)

Activity :Develop Image

Processing Application

Sulaf Almagooshi, 2013 26

@theSulaf theSulaf@gmail.com

www.theSulaf.me

Connect!

top related