hw12_main - image figure(3 Display stretched kids.tif image...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
% Main Program % %Input Section kids_image = imread('kids','tif'); linear_image = imread('linear','tif'); gamma_image = imread('gamma15','tif'); %Calculation and Output Section % Part 1 kids_size = size(kids_image); % Determine dimensions of kids.tif image kids_length = kids_size(1)*kids_size(2); % Determine length of reshaped row vector kids_reshape = hw12_reshape(kids_image,1,kids_length); % Call function to reshape image figure(1) % Display original kids.tif image image(kids_image); title('Original kids.tif Image'); colormap(gray(256)); figure(2) % Display histogram of original kids.tif image hist(kids_reshape,0:255) title('Histogram of Original kids.tif Image'); xlabel('grayscale level'); ylabel('frequency'); pmin = min(min(kids_image)); % Determine max and min values of kids.tif image pmax = max(max(kids_image)); kids_stretch = hw12_stretch(kids_image,pmin,pmax); % Call function to stretch
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: image figure(3) % Display stretched kids.tif image image(kids_stretch); title('Stretched kids.tif Image'); colormap(gray(256)); % Part 2 figure(4) % Display original linear.tif image image(linear_image); title('Original linear.tif Image'); colormap(gray(256)); linear_gamma = hw12_gamma(linear_image,1,0.8); % Call function to gamma correct image figure(5) % Display gamma corrected linear.tif image image(linear_gamma); title('Gamma Corrected linear.tif Image'); colormap(gray(256)); % Part 3 figure(6) % Display original gamma15.tif image image(gamma_image); title('Original Gamma15.tif Image'); colormap(gray(256)); gamma_gamma = hw12_gamma(gamma_image,1.5,1); % Call function to gamma correct image figure(7) % Display original gamma15.tif image image(gamma_gamma); title('Corrected gamma15.tif Image'); colormap(gray(256));...
View Full Document

This note was uploaded on 02/12/2012 for the course ENGR 126 taught by Professor Oakes during the Fall '08 term at Purdue.

Page1 / 2

hw12_main - image figure(3 Display stretched kids.tif image...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online