Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Often in image processing you want to find the edges of objects inthe scene and

ID: 3610784 • Letter: O

Question

Often in image processing you want to find the edges of objects inthe scene and get rid of
everything else.
You will do the same by writing a script called find_edges.m
a. Create a new matrix of zeros called shifted of the same size asmy_gray (this takes two lines)
b. Make this new matrix of type uint8 instead of double by typingshifted = uint8(shifted).
c. Copy the values in my_gray into shifted so that the value atmygray(2,2,) is now at shifted(1,1)
your copy command must apply this shift to all applicable pixels.(this takes one line)
d. Subtract shifted FROM my_gray and call the result my_edges.(this takes one line)
e. Look at the image using imshow and save as a .png file and callit my_edges.

Explanation / Answer

siz_shifted =size(my_matlab_gray); shifted = zeros(siz_shifted(1), siz_shifted(2)); shifted = uint8(shifted); shifted(1:siz_shifted(1)-1,1:siz_shifted(2)-1) =my_matlab_gray(2:siz_shifted(1),2:siz_shifted(2)); my_edges = my_matlab_gray - shifted;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote