Matlab will be used for the Labs. Image Processing Toolbox (IPT) will be advantageous for us. The documentation [pdf] of IPT toolbox. functions we will use are included to a standard Matlab package.
Matlab hints
help function_name | Simple help in command line. |
helpwin function_name | The window with text help. |
doc | Documentation in HTML format. Not available for IPT functions |
help images | Listing of IPT functions with short descriptions. |
Image manipulation functions
Domain | Possible functions |
---|---|
I/O operations | imread, imwrite, print |
Displaying | figure, imshow, image, imagesc, axis, colormap ... |
Numerical format conversions | im2double, im2uint8, double, uint8 |
True color format conversion | rgb2hsv, hsv2rgb |
Brightness manipulation | brighten, histeq, imhist |
Frequency domain | fft2, ifft2, fftshift |
Spatial domain | conv2, medfilt2, fspecial ... |
Write the following line to the Matlab prompt: >> a=1:2:20 What is a', a(:), a(1:2:end), a(end:-1:1) ? Create a simple image IM: >> a=1:16 >> IM=a'*a-1; Display its dimensions (in pixels): >> size(IM) Try to display the image by several manners: >> figure; imagesc(IM); >> axis equal >> colormap gray >> figure; imshow(IM,[]); Look at the histogram of brightness levels in this image: >> h=hist(IM(:),256); >> figure;plot(h); What does IM(:) mean ? Display the maximum and minimum brightness values of the image: >> min(IM(:)) >> max(IM(:)) Compute the cumulative histogram of brightness levels, and display it: >> cumh=cumsum(h); >> plot(cumh);