1. Engineering
2. Computer Science
3. matlab this should be the output please provide a good...

# Question: matlab this should be the output please provide a good...

###### Question details

Matlab This should be the output:  Please provide a good code this one does not work:

% Rean an image into A

% Convert the image A into grayscale image B
B = rgb2gray(A);

% Normalize image B to C
C = im2double(B);

% Calculate the image matrix D
% Copy image matrix C into matrix D
D = C;
% Raise the upper quarte rows of image C to the power of 0.5
D(1:end/4, 1:end/4) = D(1:end/4, 1:end/4).^0.5;
D(end-end/4:end, end-end/4:end) = D(end-end/4:end, end-end/4:end).^1.5;

%Display the images
subplot(2, 2, 1);
imshow(A);
title('Original Image');
subplot(2, 2, 2);
imshow(B);
title('Grascale Image');
subplot(2, 2, 3);
imshow(C);
title('Normalized Image');
subplot(2, 2, 4);
imshow(D);
title('Processed Grayscale Image');

% Write image D to a file
saveas(gcf, 'D.jpg');

Screenshot of Output: ###### Solution by an expert tutor 