ls HW1.m cs482-9-12-06.txt diary-6-9.txt history.m asl diary-6-7 diary.txt ls asl ASL-1.jpg ASL-5.jpg ASL-9.jpg ASL-F.jpg ASL-K.jpg ASL-O.jpg ASL-U.jpg ASL-2.jpg ASL-6.jpg ASL-A.jpg ASL-G.jpg ASL-L.jpg ASL-P.jpg ASL-V.jpg ASL-3.jpg ASL-7.jpg ASL-C.jpg ASL-H.jpg ASL-M.jpg ASL-Q.jpg ASL-W.jpg ASL-4.jpg ASL-8.jpg ASL-D.jpg ASL-I.jpg ASL-N.jpg ASL-R.jpg ASL-Y.jpg ls asl ASL-1.jpg ASL-5.jpg ASL-9.jpg ASL-F.jpg ASL-K.jpg ASL-O.jpg ASL-U.jpg ASL-2.jpg ASL-6.jpg ASL-A.jpg ASL-G.jpg ASL-L.jpg ASL-P.jpg ASL-V.jpg ASL-3.jpg ASL-7.jpg ASL-C.jpg ASL-H.jpg ASL-M.jpg ASL-Q.jpg ASL-W.jpg ASL-4.jpg ASL-8.jpg ASL-D.jpg ASL-I.jpg ASL-N.jpg ASL-R.jpg ASL-Y.jpg I = imread('asl/ASL-U.jpg'); imshow(I); whos Name Size Bytes Class I 240x320x3 230400 uint8 array Grand total is 230400 elements using 230400 bytes figure, imshow(I(:,:,1)); figure, imshow(I(:,:,3)); figure, imshow(I(:,:,2)); I1 = I; I1(:,:,3) = 0; figure, imshow(I1); < M A T L A B > ??? < M A T L A B > | Error: Missing variable or function. ls HW1.m cs482-9-12-06.txt diary-6-9.txt history.m asl diary-6-7 diary.txt HW1.m cs482-9-12-06.txt diary-6-9.txt history.m ??? HW1.m cs482-9-12-06.txt diary-6-9.txt history.m | Error: Missing MATLAB operator. Ig = rgb2gray(I); I1g = rgb2gray(I1); help subplot SUBPLOT Create axes in tiled positions. H = SUBPLOT(m,n,p), or SUBPLOT(mnp), breaks the Figure window into an m-by-n matrix of small axes, selects the p-th axes for for the current plot, and returns the axis handle. The axes are counted along the top row of the Figure window, then the second row, etc. For example, SUBPLOT(2,1,1), PLOT(income) SUBPLOT(2,1,2), PLOT(outgo) plots income on the top half of the window and outgo on the bottom half. SUBPLOT(m,n,p), if the axis already exists, makes it current. SUBPLOT(m,n,p,'replace'), if the axis already exists, deletes it and creates a new axis. SUBPLOT(m,n,p,'align') places the axes so that the plot boxes are aligned instead of preventing the labels and ticks from overlapping. SUBPLOT(m,n,P), where P is a vector, specifies an axes position that covers all the subplot positions listed in P. SUBPLOT(H), where H is an axis handle, is another way of making an axis current for subsequent plotting commands. SUBPLOT('position',[left bottom width height]) creates an axis at the specified position in normalized coordinates (in in the range from 0.0 to 1.0). SUBPLOT(m,n,p, PROP1, VALUE1, PROP2, VALUE2, ...) sets the specified property-value pairs on the subplot axis. To add the subplot to a specific figure pass the figure handle as the value for the 'Parent' property. If a SUBPLOT specification causes a new axis to overlap an existing axis, the existing axis is deleted - unless the position of the new and existing axis are identical. For example, the statement SUBPLOT(1,2,1) deletes all existing axes overlapping the left side of the Figure window and creates a new axis on that side - unless there is an axes there with a position that exactly matches the position of the new axes (and 'replace' was not specified), in which case all other overlapping axes will be deleted and the matching axes will become the current axes. SUBPLOT(111) is an exception to the rules above, and is not identical in behavior to SUBPLOT(1,1,1). For reasons of backwards compatibility, it is a special case of subplot which does not immediately create an axes, but instead sets up the figure so that the next graphics command executes CLF RESET in the figure (deleting all children of the figure), and creates a new axes in the default position. This syntax does not return a handle, so it is an error to specify a return argument. The delayed CLF RESET is accomplished by setting the figure's NextPlot to 'replace'. Reference page in Help browser doc subplot figure, subplot(2,3,1); imshow(I); SUBPLOT(m,n,p,'align') places the axes so that the plot boxes ??? SUBPLOT(m,n,p,'align') places the axes so that the plot boxes | Error: Missing MATLAB operator. subplot(2,3,2); imshow(Ig); subplot(2,3,3); imshow(I(:,:,1)); subplot(2,3,4); imshow(I1); subplot(2,3,5); imshow(I1g); subplot(2,3,6); imshow(I(:,:,3)); help dir DIR List directory. DIR directory_name lists the files in a directory. Pathnames and wildcards may be used. For example, DIR *.m lists all the M-files in the current directory. D = DIR('directory_name') returns the results in an M-by-1 structure with the fields: name -- filename date -- modification date bytes -- number of bytes allocated to the file isdir -- 1 if name is a directory and 0 if not See also what, cd, type, delete, ls, rmdir, mkdir. Overloaded functions or methods (ones with the same name in other directories) help ftp/dir.m Reference page in Help browser doc dir l = dir('asl/*.jpg'); l l = 28x1 struct array with fields: name date bytes isdir l[1].name ??? l[1].name | Error: Unbalanced or misused parentheses or brackets. l.name[1] ??? l.name[1] | Error: Unbalanced or misused parentheses or brackets. l.name(1) ??? Field reference for multiple structure elements that is followed by more reference blocks is an error. l(1).name ans = ASL-1.jpg s = strcat('asl/',l(10).name) s = asl/ASL-A.jpg s s = asl/ASL-A.jpg I10 = imread(s); imshow(I10) print -djpeg AllFig.jpg !open AllFig.jpg help images Image Processing Toolbox Version 4.2 (R14) 05-May-2004 Image display. colorbar - Display colorbar (MATLAB Toolbox). getimage - Get image data from axes. image - Create and display image object (MATLAB Toolbox). imagesc - Scale data and display as image (MATLAB Toolbox). immovie - Make movie from multiframe image. imshow - Display image in Handle Graphics figure. imview - Display image in the image viewer. montage - Display multiple image frames as rectangular montage. movie - Play recorded movie frames (MATLAB Toolbox). subimage - Display multiple images in single figure. truesize - Adjust display size of image. warp - Display image as texture-mapped surface. Image file I/O. dicominfo - Read metadata from a DICOM message. dicomread - Read a DICOM image. dicomuid - Generate DICOM unique identifier. dicomwrite - Write a DICOM image. dicom-dict.txt - Text file containing DICOM data dictionary. imfinfo - Return information about image file (MATLAB Toolbox). imread - Read image file (MATLAB Toolbox). imwrite - Write image file (MATLAB Toolbox). Image arithmetic. imabsdiff - Compute absolute difference of two images. imadd - Add two images, or add constant to image. imcomplement - Complement image. imdivide - Divide two images, or divide image by constant. imlincomb - Compute linear combination of images. immultiply - Multiply two images, or multiply image by constant. imsubtract - Subtract two images, or subtract constant from image. ippl - Check for presence of IPPL. Geometric transformations. checkerboard - Create checkerboard image. findbounds - Find output bounds for geometric transformation. fliptform - Flip the input and output roles of a TFORM struct. imcrop - Crop image. imresize - Resize image. imrotate - Rotate image. imtransform - Apply geometric transformation to image. makeresampler - Create resampler structure. maketform - Create geometric transformation structure (TFORM). tformarray - Apply geometric transformation to N-D array. tformfwd - Apply forward geometric transformation. tforminv - Apply inverse geometric transformation. Image registration. cpstruct2pairs - Convert CPSTRUCT to valid pairs of control points. cp2tform - Infer geometric transformation from control point pairs. cpcorr - Tune control point locations using cross-correlation. cpselect - Control point selection tool. normxcorr2 - Normalized two-dimensional cross-correlation. Pixel values and statistics. corr2 - Compute 2-D correlation coefficient. imcontour - Create contour plot of image data. imhist - Display histogram of image data. impixel - Determine pixel color values. improfile - Compute pixel-value cross-sections along line segments. mean2 - Compute mean of matrix elements. pixval - Display information about image pixels. regionprops - Measure properties of image regions. std2 - Compute standard deviation of matrix elements. Image analysis. bwboundaries - Trace region boundaries in binary image. bwtraceboundary - Trace object in binary image. edge - Find edges in intensity image. qtdecomp - Perform quadtree decomposition. qtgetblk - Get block values in quadtree decomposition. qtsetblk - Set block values in quadtree decomposition. Image enhancement. adapthisteq - Perform adaptive histogram equalization using CLAHE. decorrstretch - Apply a decorrelation stretch to a multichannel image. histeq - Enhance contrast using histogram equalization. imadjust - Adjust image intensity values or colormap. imnoise - Add noise to an image. medfilt2 - Perform 2-D median filtering. ordfilt2 - Perform 2-D order-statistic filtering. stretchlim - Find limits to contrast stretch an image. uintlut - Computes new array values based on lookup table. wiener2 - Perform 2-D adaptive noise-removal filtering. Linear filtering. convmtx2 - Compute 2-D convolution matrix. fspecial - Create predefined filters. imfilter - Filter 2-D and N-D images. Linear 2-D filter design. freqspace - Determine 2-D frequency response spacing (MATLAB Toolbox). freqz2 - Compute 2-D frequency response. fsamp2 - Design 2-D FIR filter using frequency sampling. ftrans2 - Design 2-D FIR filter using frequency transformation. fwind1 - Design 2-D FIR filter using 1-D window method. fwind2 - Design 2-D FIR filter using 2-D window method. Image deblurring. deconvblind - Deblur image using blind deconvolution. deconvlucy - Deblur image using Lucy-Richardson method. deconvreg - Deblur image using regularized filter. deconvwnr - Deblur image using Wiener filter. edgetaper - Taper edges using point-spread function. otf2psf - Optical transfer function to point-spread function. psf2otf - Point-spread function to optical transfer function. Image transforms. dct2 - 2-D discrete cosine transform. dctmtx - Discrete cosine transform matrix. fan2para - Convert fan-beam projections to parallel-beam. fanbeam - Compute fan-beam transform. fft2 - 2-D fast Fourier transform (MATLAB Toolbox). fftn - N-D fast Fourier transform (MATLAB Toolbox). fftshift - Reverse quadrants of output of FFT (MATLAB Toolbox). idct2 - 2-D inverse discrete cosine transform. ifft2 - 2-D inverse fast Fourier transform (MATLAB Toolbox). ifftn - N-D inverse fast Fourier transform (MATLAB Toolbox). ifanbeam - Compute inverse fan-beam transform. iradon - Compute inverse Radon transform. para2fan - Convert parallel-beam projections to fan-beam. phantom - Generate a head phantom image. radon - Compute Radon transform. Neighborhood and block processing. bestblk - Choose block size for block processing. blkproc - Implement distinct block processing for image. col2im - Rearrange matrix columns into blocks. colfilt - Columnwise neighborhood operations. im2col - Rearrange image blocks into columns. nlfilter - Perform general sliding-neighborhood operations. Morphological operations (intensity and binary images). conndef - Default connectivity. imbothat - Perform bottom-hat filtering. imclearborder - Suppress light structures connected to image border. imclose - Close image. imdilate - Dilate image. imerode - Erode image. imextendedmax - Extended-maxima transform. imextendedmin - Extended-minima transform. imfill - Fill image regions and holes. imhmax - H-maxima transform. imhmin - H-minima transform. imimposemin - Impose minima. imopen - Open image. imreconstruct - Morphological reconstruction. imregionalmax - Regional maxima. imregionalmin - Regional minima. imtophat - Perform tophat filtering. watershed - Watershed transform. Morphological operations (binary images). applylut - Perform neighborhood operations using lookup tables. bwarea - Compute area of objects in binary image. bwareaopen - Binary area open (remove small objects). bwdist - Compute distance transform of binary image. bweuler - Compute Euler number of binary image. bwhitmiss - Binary hit-miss operation. bwlabel - Label connected components in 2-D binary image. bwlabeln - Label connected components in N-D binary image. bwmorph - Perform morphological operations on binary image. bwpack - Pack binary image. bwperim - Determine perimeter of objects in binary image. bwselect - Select objects in binary image. bwulterode - Ultimate erosion. bwunpack - Unpack binary image. makelut - Construct lookup table for use with applylut. Structuring element (STREL) creation and manipulation. getheight - Get strel height. getneighbors - Get offset location and height of strel neighbors getnhood - Get strel neighborhood. getsequence - Get sequence of decomposed strels. isflat - Return true for flat strels. reflect - Reflect strel about its center. strel - Create morphological structuring element. translate - Translate strel. Region-based processing. poly2mask - Convert region-of-interest polygon to mask. roicolor - Select region of interest, based on color. roifill - Smoothly interpolate within arbitrary region. roifilt2 - Filter a region of interest. roipoly - Select polygonal region of interest. Colormap manipulation. brighten - Brighten or darken colormap (MATLAB Toolbox). cmpermute - Rearrange colors in colormap. cmunique - Find unique colormap colors and corresponding image. colormap - Set or get color lookup table (MATLAB Toolbox). imapprox - Approximate indexed image by one with fewer colors. rgbplot - Plot RGB colormap components (MATLAB Toolbox). Color space conversions. applycform - Apply device-independent color space transformation. hsv2rgb - Convert HSV values to RGB color space (MATLAB Toolbox). iccread - Read ICC color profile. lab2double - Convert Lab color values to double. lab2uint16 - Convert Lab color values to uint16. lab2uint8 - Convert Lab color values to uint8. makecform - Create device-independent color space transform structure. ntsc2rgb - Convert NTSC values to RGB color space. rgb2hsv - Convert RGB values to HSV color space (MATLAB Toolbox). rgb2ntsc - Convert RGB values to NTSC color space. rgb2ycbcr - Convert RGB values to YCBCR color space. whitepoint - Returns XYZ values of standard illuminants. xyz2double - Convert XYZ color values to double. xyz2uint16 - Convert XYZ color values to uint16. ycbcr2rgb - Convert YCBCR values to RGB color space. Interactive mouse utility functions. getline - Select polyline with mouse. getpts - Select points with mouse. getrect - Select rectangle with mouse. ICC color profiles. lab8.icm - 8-bit Lab profile. monitor.icm - Typical monitor profile. Sequel Imaging, Inc., used with permission. sRGB.icm - sRGB profile. Hewlett-Packard, used with permission. swopcmyk.icm - CMYK input profile. Eastman Kodak, used with permission. Array operations. circshift - Shift array circularly (MATLAB Toolbox). padarray - Pad array. Image types and type conversions. dither - Convert image using dithering. gray2ind - Convert intensity image to indexed image. grayslice - Create indexed image from intensity image by thresholding. graythresh - Compute global image threshold using Otsu's method. im2bw - Convert image to binary image by thresholding. im2double - Convert image array to double precision. im2java - Convert image to Java image (MATLAB Toolbox). im2java2d - Convert image to Java BufferedImage. im2uint8 - Convert image array to 8-bit unsigned integers. im2uint16 - Convert image array to 16-bit unsigned integers. ind2gray - Convert indexed image to intensity image. ind2rgb - Convert indexed image to RGB image (MATLAB Toolbox). label2rgb - Convert label matrix to RGB image. mat2gray - Convert matrix to intensity image. rgb2gray - Convert RGB image or colormap to grayscale. rgb2ind - Convert RGB image to indexed image. Toolbox preferences. iptgetpref - Get value of Image Processing Toolbox preference. iptsetpref - Set value of Image Processing Toolbox preference. Demos. iptdemos - Index of Image Processing Toolbox demos. help graythresh GRAYTHRESH Compute global image threshold using Otsu's method. LEVEL = GRAYTHRESH(I) computes a global threshold (LEVEL) that can be used to convert an intensity image to a binary image with IM2BW. LEVEL is a normalized intensity value that lies in the range [0, 1]. GRAYTHRESH uses Otsu's method, which chooses the threshold to minimize the intraclass variance of the thresholded black and white pixels. Class Support ------------- The input image I can be of class uint8, uint16, or double and it must be nonsparse. LEVEL is a double scalar. Example ------- I = imread('coins.png'); level = graythresh(I); BW = im2bw(I,level); imview(BW) See also im2bw. Reference page in Help browser doc graythresh whos Name Size Bytes Class I 240x320x3 230400 uint8 array I1 240x320x3 230400 uint8 array I10 240x320x3 230400 uint8 array I1g 240x320 76800 uint8 array Ig 240x320 76800 uint8 array ans 1x9 18 char array l 28x1 8852 struct array s 1x13 26 char array Grand total is 845802 elements using 853696 bytes figure, imhist(Ig) figure, imhist(I(:,:,1)) figure, imhist(I1g) figure, imhist(I(:,:,3)) l0 = graythresh(Ig); l1 = graythresh(I(:,:,1)); l0 l0 = 0.4392 l1 l1 = 0.3608 BW0 = im2bw(Ig,l0); BW1 = im2bw(I(:,:,1),l1); figure, imshow(BW0); help treshold treshold.m not found. Use the Help browser Search tab to search the documentation, or type "help help" for help command options, such as help for methods. close all figure, imshow(BW0); figure, imshow(BW0);figure, imshow(BW1); clear clear clear all diary