Question: Matlab question Do the gradient images look like you expect them too? Why or why not? What is missing from the above question and how

Matlab question

Do the gradient images look like you expect them too? Why or why not?

What is missing from the above question and how would you fix it?

commandwindow;

%imshow(checkerboard(20));

imwrite(checkerboard(20), 'checkerboard.jpg', 'JPEG');

myImage = imread('checkerboard.jpg');

Sx = [1 0 -1; 2 0 -2; 1 0 -1];

Sy = [1 2 1; 0 0 0; -1 -2 -1];

sobelXImage = conv2(double(myImage), Sx, 'same');

sobelYImage = conv2(double(myImage), Sy, 'same');

figure('Name', 'X gradient');

imshow(uint8(sobelXImage));

figure('Name', 'Y gradient');

imshow(uint8(sobelYImage));

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!