Skip to main content

12.15) Image Visualization (cont'd)


[matlab]
% Display image with scaling
imagesc(A)
% Switch to grey scale colour map
colormap gray(256)
% Export the image as a jpeg file
imwrite(A, gray(256), 'output.jpg', 'quality', 100)
[/matlab]


[matlab]
% We can take a section of the image
section=A(175:500,350:700)
[/matlab]


[matlab]
% We can generate a histogram of pixel intensity
imhist(A)
[/matlab]