SlideServe
Menu
Préférences
© SlideServe · v2026

Matlab Lecture 2

shlomo avatar
12 diapositives · 379 Views · Jul 29, 2014

Matlab Lecture 2. Image Enhancement in the Spatial Domain (MATLAB). Main intensity transformation function. Photographic negative ( imcomplement ). Log transformation ( c*log(1+double(f)) ). Power-Law (gamma) transformation ( imadjust ). In Matlab : Function imadjust.

Matlab Lecture 2 - slide 1
01 / 12Matlab Lecture 2
1 / 17

Télécharger la présentation

Matlab Lecture 2
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 2 Image Enhancement in the Spatial Domain (MATLAB)

  2. Main intensity transformation function • Photographic negative (imcomplement). • Log transformation ( c*log(1+double(f)) ). • Power-Law (gamma) transformation (imadjust).

  3. In Matlab: Function imadjust • Adjust image intensity values or colormap • Syntax : (in gray images) J = imadjust(I) maps the values in intensity image I to new values in J. This increases the contrast of the output image J. • J = imadjust(I,[low_inhigh_in],[low_outhigh_out]) maps the values in intensity image I to new values in J such that values between low_in and high_in map to values between low_out and high_out.

  4. Function Imadjust • J = imadjust(...,gamma) • maps the values in intensity image I to new values in J, where gamma specifies the shape of the curve describing the relationship between the values in I and J.

  5. Function imadjust (cont.) • If gamma is less than 1, the mapping is weighted toward higher (brighter) output values. • If gamma is greater than 1, the mapping is weighted toward lower (darker) output values. • If you omit the argument, gamma defaults to 1 (linear mapping).

  6. Image Adjust Examples (matlab code) • Adjust a low-contrast grayscale image. I = imread('pout.tif'); J = imadjust(I); figure, imshow(I), figure, imshow(J)

  7. Image Adjust Examples • Adjust the grayscale image, specifying the contrast limits. K1 = imadjust(I,[0.3 0.7],[.2 .6]); figure, imshow(K1)

  8. Image Adjust Examples Adjust the gamma L1 = imadjust(I,[], [ ],2); figure, imshow(L1) L2 = imadjust(I,[], [ ],.3); figure, imshow(L2)

  9. Negative image Obtaining a negative image I = imread('pout.tif'); K1 =imadjust(I, [0 1] , [1 0]); K2 = imcomplement(I); imshow(I), figure, imshow(K1), figure, imshow(K2)

  10. stretchlim Example Contrast Stretching: • LOW_HIGH = stretchlim(I): returns LOW_HIGH, a two-element vector of pixel values that specify lower and upper limits that can be used for contrast stretching image I • I = imread('pout.tif'); • J = imadjust(I, stretchlim(I), []); • imshow(I), figure, imshow(J)

  11. Logarithmic • Logarithmic: g=c*log(1+double(f)) • I = imread('pout.tif'); • g=c*log(1+double(I)) • gs=im2uint8(mat2gray(g));

  12. In Matlab: im2bw • Convert an image to a binary image, based on threshold • BW = Im2bw(I, level) : The output image BW replaces all pixels in the input image with luminance greater than level with the value 1 (white) and replaces all other pixels with the value 0 (black) • I: is the grayscale image • level : in the range [0,1] • Example: • I = imread('pout.tif'); • I2 = im2bw(I, 0.5); • imshow(I2)