Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is wrong with my case 1 code (bolded)??? MATLAB: str=input('Please enter the image name you wanted to modify: '); I = imread(str); imshow(I) disp('---Image

What is wrong with my case 1 code (bolded)??? MATLAB:

str=input('Please enter the image name you wanted to modify: ');

I = imread(str);

imshow(I)

disp('---Image Modification Menu---')

disp('Please enter the image name you wanted to modify : ');

disp('Please enter a valid choice');

disp(' 1. Find Edges of the Image');

disp(' 2. Blur the Image');

disp(' 3. Sharpen the Image');

n = input('enter your choice : ');

switch(n)

case 1

% sobel and canny filter are applied to find edge of image

BW1 = edge(I,'Sobel');

BW2 = edge(I,'Canny');

imshowpair(BW1,BW2,'montage')

title('Sobel Filter Canny Filter');

case 2

% Gaussian Smoothing Filter is applied to blur image

Iblur1 = imgaussfilt(I,2);

figure;

imshowpair(Iblur1,I,'montage')

title('Blurred Image Original Image');

case 3

b = imsharpen(I);

figure;

imshowpair(b,I,'montage')

title('Sharpened Image Original Image');

otherwise

disp('Wrong choice');

end

disp('---Image Modification Menu---')

disp('Please enter the image name you wanted to modify : ');

disp('Please enter a valid choice');

disp(' 1. Find Edges of the Image');

disp(' 2. Blur the Image');

disp(' 3. Sharpen the Image');

n = input('enter your choice : ');

switch(n)

case 1

% sobel and canny filter are applied to find edge of image

BW1 = edge(I,'Canny');

BW2 = edge(I,'Prewitt');

imshowpair(BW1,BW2,'montage')

title('Sobel Filter Canny Filter');

case 2

% Gaussian Smoothing Filter is applied to blur image

Iblur1 = imgaussfilt(I,2);

figure;

imshowpair(Iblur1,I,'montage')

title('Blurred Image Original Image');

case 3

b = imsharpen(I);

figure;

imshowpair(b,I,'montage')

title('Sharpened Image Original Image');

otherwise

disp('Wrong choice');

endimage text in transcribed

>>untitled2 Please enter the image name you wanted to modify: 'ima Image Modification Menu Please enter the image name you wanted to modify Please enter a valid choice 1. Find Edges of the Image 2 Blur the Image 3. Sharpen the Image enter your choice : 1 Error using edge Expected input number 1, I, to be two-dimensional. Error in edge parse inputs (Line 477) validateattributes (I,'numeric','logical,'real, 'no Error in edge (Line 208) [a,method , thresh,sigma , thinning,H,kx,ky] parse_inputs (varargin:); Error in untitled2 (line 15) BWI edge(1,"canny' ); >>untitled2 Please enter the image name you wanted to modify: 'ima Image Modification Menu Please enter the image name you wanted to modify Please enter a valid choice 1. Find Edges of the Image 2 Blur the Image 3. Sharpen the Image enter your choice : 1 Error using edge Expected input number 1, I, to be two-dimensional. Error in edge parse inputs (Line 477) validateattributes (I,'numeric','logical,'real, 'no Error in edge (Line 208) [a,method , thresh,sigma , thinning,H,kx,ky] parse_inputs (varargin:); Error in untitled2 (line 15) BWI edge(1,"canny' )

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

Does the Treynor ratio use total risk or beta risk?

Answered: 1 week ago