SlideServe
Menu
Préférences
© SlideServe · v2026

Matlab Lecture 1

clarke avatar
11 diapositives · 329 Views · Jul 17, 2014

Matlab Lecture 1. Basic Concepts of Digital Image Processing. Image processing Basic Concept. IP Basic Concepts

Matlab Lecture 1 - slide 1
01 / 11Matlab Lecture 1
1 / 17

Télécharger la présentation

Matlab Lecture 1
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Matlab Lecture 1 Basic Concepts of Digital Image Processing

  2. Image processing Basic Concept • IP Basic Concepts • In this lecture we will introduce some basic image processing concepts, including reading and showing image, performing some image enhancement operations on images, and getting information about an image. • Step 1: Read and Display an Image • Step 2: Check How the Image Appears in the Workspace • Step 3: Image Sampling (Resizing Image) • Step 4: Image Quantization (Gray Level Reduction) • Step 5: Converting RGB image into grayscale intensity image.

  3. Step 1: Read and Display anImage • To Clear Matlab workspace, variables, and figure windows. >> close all • To read an image, use the imread command. • In the example below reads one of the sample images included with IPT, pout.tif, and stores it in an array named I. Example : >> I = imread('pout.tif'); • To display the image, Use the imshow command >> imshow(I)

  4. Step 2: Check How the Image Appearsin the Workspace • The Workspace browser displays information about all the variables you create during a MATLAB session. The imread function returned the image data in the variable I, which is a 291-by-240 element array of uint8 data. MATLAB can store images as uint8, uint16, or double arrays. • 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

  5. Step3: Image SamplingMatlab: imresize • Resize an image • To change the size of an image, use the imresize function. • Using imresize, you can specify the size of the output image, specify the interpolation method used, and specify the filter to use to prevent aliasing. • Resize Syntax: • B = imresize(A,m) • B = imresize(A,m,method) • B = imresize(A,[mrowsncols],method) • B = imresize(...,method,n) • B = imresize(...,method,h)

  6. Description of imresize • B = imresize(A,m) returns an image B that is m times the size of A, using nearest-neighbor interpolation. • B = imresize(A,m,method) returns an image that is m times the size of A using the interpolation method specified by method. • B = imresize(A,[mrowsncols],method) returns an image of the size specified by [mrowsncols]. When the specified output size is smaller than the size of the input image, and method is 'bilinear' or 'bicubic', applies lowpass aliasing.

  7. Example: Sampling (example of resize)

  8. Step 4: Image Quantization (Gray Level Reduction) • The quantization used to reduce the number of gray levels. • Reducing the number of gray levels using the floor function. • Floor function is used in the following sytax: • X = floor(y/2)*2; • It is used to reduce the gray levels in an image. • You can divide many times according to the given gray level to see how the image is resulting from reducing the gray levels as in the following figure:

  9. Image Quantization example

  10. Converting Image Types

  11. Step 5: Converting RGB image into grayscale intensity image. • rgb2gray • Converts RGB image to grayscale. • Syntax • I = rgb2gray(RGB) • Description • I = rgb2gray(RGB) converts the truecolor image RGB to the grayscale intensity image I.