Question: Edge Detection Automatically detecting edges in images is an important task in image processing. An edge detector takes an input image and generates another image

Edge Detection
Automatically detecting edges in images is an important task in image processing. An edge detector takes an input image and generates another image where the edges in the original image are highlighted by gray/white colors while other pixels are black. For each 33-pixel subset A, of an image, we can calculate the magnitude of the gradient at the center pixel of A as a weighted sum of all the values in A . One common technique is called the Sobel operator specified as
M=sx2+sy22
where sx and sy can be defined as,
sx=[-101-202-101]:A, and ,sy=[121000-1-2-1]:A
Note that the colon in linear algebra means double dot product which is different from its use in MATLAB. So the formula above means that each pixel sx and sy will be a weighted sum of the values of the neighboring pixels in the original image using the weights specified in the 33 matrices above. For example, sx specifies that the current pixel and its top and bottom neighbors are not used (weights are zero), while the top right neighbor has a weight of 1 and the top left has weight of -1, etc. The final output pixel is then the root sum squared sx and sy.
Create a function called edgy that takes an original image input, and produces a processed image. Both the input and the output argument are grayscale images, that is, matrices of uint8 values.
Note that the output has two fewer rows and columns than the input since the pixels in the first and last columns and rows do not have enough neighbors for the required computation.
Here is an example input and output (click here for the imane).Code to call your function (o
ResetAssessment: 0 of 2 Tests Passed
Coca Cola image
Variable output has an incorrect value.
Random images
Variable output has an incorrect value.
Edge Detection Automatically detecting edges in

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 Programming Questions!