Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab This should be the output: Please provide a good code this one does not work: % Rean an image into A A = imread('lena.jpg');

Matlab

image text in transcribed

This should be the output:

image text in transcribed

image text in transcribed

Please provide a good code this one does not work:

% Rean an image into A A = imread('lena.jpg');

% 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:

image text in transcribed

. [4 points] Normalize image B to C, whose data type is double and whose values fall in the range of [O, 1]. Display image Con figure 3 with the message "Normalized Grayscale Image" as the figure title (Note: Image C should appear the same as the image B.) Raise each pixel in the upper quarter rows of image C to the power of 0.5 and raise each pixel in the lower quarter rows of image C to the power of 1.5. Keep the middle two quarter rows of image C unchanged. Store the result as an image (matrix) D. Display images D on figure 4 with the message "Processed Grayscale Image" as the figure title. Make sure that no loops are used to accomplish the task. On the Matlab console, explain the effects after applying the above two operations Save image D in jpg format to a file called "X_D.jpg" where X should be your first name. Open it using a standard image viewing program to verify that the image is saved properly Matlab Hint: double, L.J imwrite, display, disp,: Run and Run and Figure 3 File Edit View Insert Tools Desktop Window Help Wir Normalized Grayscale Image @yQa he na ighter/whiter than the others while the last quarter rows are darker nce Time Figure 4 File Edit View nset Tools Desktop Windo Help Processed Grayscale Image Figure 1 File EditView Insert Tools Desktop Window Help Original Image Grascale Image Normalized Image Processed Grayscale Image Type here to search 0 ^ ENG 28-01-2019

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

What are the stages of project management? Write it in items.

Answered: 1 week ago

Question

why do consumers often fail to seek out higher yields on deposits ?

Answered: 1 week ago

Question

9. Mohawk Industries Inc.

Answered: 1 week ago

Question

8. Satyam Computer Services Limited

Answered: 1 week ago

Question

2. Explain how the role of training is changing.

Answered: 1 week ago