[Solved]Write Matlab Function Takes Image Input Produces Image Output Follows Pn Pe Ps Pw Values P Q37207037
Write a Matlab function that takes an image as an input andproduces an image as an output as follows: If pN, pE, pS, pW arethe values of the pixels N, E, S, and W of an input pixel, then foreach output pixel, calculate the following:
Outputimage pixel value = (pN – pS)2+ (pE –pW)2
Do this for each color channel, and make the pixel values at theimage boundaries zero.
This algorithm is a way to identify the “edges” of objects whichcan be used for sharpening or blurring these edges, as well as partof object recognition and autonomous movement. This algorithmapplied to the peppers.png sample image will produce the followingimage. (Better algorithms do exist for identifying edges.)
Expert Answer
Answer to Write a Matlab function that takes an image as an input and produces an image as an output as follows: If pN, pE, pS, pW… . . .
OR

