7/25/2015Image Processing 1 MATLAB Image Processing Toolbox.

Презентация:



Advertisements
Похожие презентации
7/29/2015Image Processing 1 Image Processing Using Matlab*
Advertisements

WS2-1 WORKSHOP 2 IMPORTING A PRESSURE FIELD PAT328, Workshop 2, September 2004 Copyright 2004 MSC.Software Corporation.
New in CimatronE3 Electrodes. The Electrode Process Electrode Set-up Wizard Burning Areas Extraction Electrodes Creation Blank Creation Extension Faces.
Copyright DASSAULT SYSTEMES 2002 Interactive Drafting V5R8 Update CATIA Training Foils Version 5 Release 8 January 2002 EDU-CAT-E-ID1-UF-V5R8.
S11-1 PAT318, Section 11, March 2005 SECTION 11 ANALYSIS SETUP.
S12-1 NAS122, Section 12, August 2005 Copyright 2005 MSC.Software Corporation SECTION 12 RESIDUAL VECTOR METHOD.
1/13 Chapter 06- Implementing Operators in a class.
Business Statistics 1-1 Chapter Two Describing Data: Frequency Distributions and Graphic Presentation GOALS When you have completed this chapter, you will.
1/27 Chapter 9: Template Functions And Template Classes.
WS10-1 WORKSHOP 10 Tetmeshing Anchor Geometry and Verifying Mesh Quality PAT301, Workshop 10, October 2003.
Workshop 7B-1 NAS101 Workshops Copyright 2001 MSC.Software Corporation WORKSHOP 7B Structure With Spring Support.
WS11-1 WORKSHOP 11 ANCHOR LOADS AND BOUNDARY CONDITIONS USING A FIELD PAT301, Workshop 11, October 2003.
© 2006 Cisco Systems, Inc. All rights reserved. MPLS v MPLS Concepts Introducing MPLS Labels and Label Stacks.
Lecture # Computer Architecture Computer Architecture = ISA + MO ISA stands for instruction set architecture is a logical view of computer system.
WS6-1 WORKSHOP 6 MODAL FREQUENCY RESPONSE ANALYSIS NAS122, Workshop 6, August 2005 Copyright 2005 MSC.Software Corporation.
PAT312, Section 18, December 2006 S18-1 Copyright 2007 MSC.Software Corporation SECTION 18 LOADS & BOUNDARY CONDITIONS.
Sequences Sequences are patterns. Each pattern or number in a sequence is called a term. The number at the start is called the first term. The term-to-term.
Unit II Constructor Cont… Destructor Default constructor.
MSC.Patran Laminate Modeler Solid Element Support December 21, 2004.
WORKSHOP 14 BUCKLING OF A SUBMARINE PRESSURE HULL.
Транксрипт:

7/25/2015Image Processing 1 MATLAB Image Processing Toolbox

7/25/2015 Image Processing2 Introduction Collection of functions (MATLAB files) that supports a wide range of image processing operations Documentation

7/25/2015 Image Processing3 Read an Image Read in an image Validates the graphic format (bmp, hdf, jpeg, pcx, png, tiff, xwd) Store it in an array clear, close all I = imread(pout.tif`); [X, map] = imread(pout.tif);

7/25/2015 Image Processing4 Display an Image imshow(I)

7/25/2015 Image Processing5 Check the Image in Memory whos Name Size Bytes Class ans 291x uint8 array Grand total is elements using bytes uint8[0, 255] uint16[0, 65535] double[0, 1]

7/25/2015 Image Processing6 Histogram Equalization Histogram: distribution of intensities figure, imhist(I) Equalize Image (contrast) I2 = histeq(I); figure, imshow(I2) figure, imhist(I2)

7/25/2015 Image Processing7 Histogram Equalization (cont.)

7/25/2015 Image Processing8 Histogram Equalization (cont.)

7/25/2015 Image Processing9 Write the Image Validates the extension Writes the image to disk imwrite(I2, pout2.png); imwrite(I2, pout2.png, BitDepth, 4);

7/25/2015 Image Processing10 Morphological Opening Remove objects that cannot completely contain a structuring element Estimate background illumination clear, close all I = imread(rice.tif); imshow(I) background = imopen(I, strel(disk, 15)); imshow(background)

7/25/2015 Image Processing11 Morphological Opening (cont.)

7/25/2015 Image Processing12 Subtract Images Create a more uniform background I2 = imsubtract(I, background); figure, imshow(I2)

7/25/2015 Image Processing13 Adjust the Image Contrast stretchlim computes [low hight] to be mapped into [bottom top] I3 = imadjust(I2, stretchlim(I2), [0 1]); figure, imshow(I3)

7/25/2015 Image Processing14 Apply Thresholding to the Image Create a binary thresholded image 1. Compute a threshold to convert the intensity image to binary 2. Perform thresholding creating a logical matrix (binary image) level = graythresh(I3); bw = im2bw(I3, level); figure, imshow(bw)

7/25/2015 Image Processing15 Apply Thresholding to the Image (cont.)

7/25/2015 Image Processing16 Labeling Connected Components Determine the number of objects in the image Accuracy (size of objects, approximated background, connectivity parameter, touching objects) [labeled, numObjects] = bwlabel(bw, 4); numObjects {= 80} max(labeled(:))

7/25/2015 Image Processing17 Select and Display Pixels in a Region Interactive selection grain = imcrop(labeled) Colormap creation function RGB_label = c, shuffle); imshow(RGB_label); rect = [ ]; roi = imcrop(labeled, rect)

7/25/2015 Image Processing18 Object Properties Measure object or region properties graindata = regionprops(labeled, basic) graindata(51).Area{296} graindata(51).BoundingBox{ } graindata(51).Centroid{ } Create a vector which holds just one property for each object allgrains = [graindata.Area]; whos

7/25/2015 Image Processing19 Statistical Properties of Objects max(allgrains) { 695 } Return the component label of a grain size biggrain = find(allgrains == 695) { 68 } Mean grain size mean(allgrains) { 249 } Histogram (#bins) hist(allgrains, 20)

7/25/2015 Image Processing20 Statistical Properties of Objects (cont.)

7/25/2015 Image Processing21 Storage Classes double (64-bit), uint8 (8-bit), and uint16 (16-bit) Converting (rescale or offset) double im2double (automatic rescale and offsetting) RGB2 = im2uint8(RGB1); im2uint16 imapprox (reduce number of colors: indexed images)

7/25/2015 Image Processing22 Image Types Index Data matrix (uint8, uint16, double) Colormap matrix (m x 3 array of double [0 1]) Intensity (black = 0, white = ) Binary (0, 1) B = logical(uint8(round(A))); (logical flag on) B = +A; (logical flag off) RGB (m x n x 3 of truecolor)

7/25/2015 Image Processing23 Converting Image Types dither gray2ind grayslice im2bw ind2gray ind2rgb mat2gray rgb2gray rgb2ind

7/25/2015 Image Processing24 Multiframe Image Arrays Same size, #planes, colormap Store separate images into one multiframe array A = cat(4, A1, A2, A3, A4, A5) Extract frames from a multiframe array FRM3 = MULTI(:, :, :, 3) Display a frame imshow(MULTI(:, :, :, 7))

7/25/2015 Image Processing25 Image Arithmetic imabsdiff imadd imcomplement imdivide imlincomb immultiply imsubtract

7/25/2015 Image Processing26 Adding Images I = imread(rice.tif); J = imread(cameraman.tif); K = imadd(I, J); imshow(K) Brighten an image results saturation RGB = imread(flowers.tif); RGB2 = imadd(RGB, 50); subplot(1, 2, 1); imshow(RGB); subplot(1, 2, 2); imshow(RGB2);

7/25/2015 Image Processing27 Adding Images (cont.)

7/25/2015 Image Processing28 Adding Images (cont.)

7/25/2015 Image Processing29 Subtracting Images Background of a scene rice = imread(rice.tif); background = imopen(rice, strel(disk, 15)); rice2 = imsubtract(rice, background); imshow(rice), figure, imshow(rice2); Negative values imabsdiff

7/25/2015 Image Processing30 Subtracting Images (cont.)

7/25/2015 Image Processing31 Multiplying Images Scaling: multiply by a constant (brightens >1, darkens <1) Preserves relative contrast I = imread(moon.tif); J = immultiply(I, 1.2); imshow(I); figure, imshow(J)

7/25/2015 Image Processing32 Multiplying Images (cont.)

7/25/2015 Image Processing33 Dividing Images (Ratioing) I = imread(rice.tif); background = imopen(I, strel(disk, 15)); Ip = imdivide(I, background); imshow(Ip, []) Linear combination only truncates the final result K = imlincomb(.5, I,.5, I2);

7/25/2015 Image Processing34 Dividing Images (cont.)

7/25/2015 Image Processing35 Coordinate Systems Pixel Coordinates Discrete unit (integer) (r, c) = (1, 1) Spatial Coordinates Continuous unit (x, y) = (0.5, 0.5) 123

7/25/2015 Image Processing36 Non-default Spatial Coordinate System A = magic(5); x = [ ]; y = [ ]; image(A, xData, x, yData, y), axis image, colormap(jet(25))

7/25/2015 Image Processing37 Spatial Transformations Map pixel locations in an input image to new locations in an output image Resizing Rotation Cropping

7/25/2015 Image Processing38 Resizing Images Change the size of an image I = imread(ic.tif); J = imresize(I, 1.25); K = imresize(I, [ ]); figure, imshow(J) figure, imshow(K)

7/25/2015 Image Processing39 Resizing Images (cont.)

7/25/2015 Image Processing40 Rotating Images Rotate an image by an angle in degrees I = imread(ic.tif); J = imrotate(I, 35, bilinear); imshow(I) figure, imshow(J)

7/25/2015 Image Processing41 Rotating Images (cont.)

7/25/2015 Image Processing42 Cropping Images Extract a rectangular portion of an image imshow ic.tif I = imcrop;