Question: Write a function called highlightEdges that takes an image as an argument and returns a black-and-white version of the input image where edges are highlighted.

  1. Write a function called highlightEdges that takes an image as an argument and returns a

    black-and-white version of the input image where edges are highlighted. To do so, iterate over the (x, y) - coordinates of the image and calculate the mean values of pixel (x, y) (call it m1 ) and the pixel (x + 1, y) (call it m2 ). Set the color of the pixel (x, y) in the output image to

    (|m1 m2|,|m1 m2|,|m1 m2|).

 Write a function called highlightEdges that takes an image as anIn JAVASCRIPT

Pay attention to edge cases!

Write a function called highlightEdges that takes an image as an argument and returns a black-and-white version of the input image where edges are highlighted. To do so, iterate over the (x, y)-coordinates of the image and calculate the mean values of pixel (x, y) (call it ml ) and the pixel (x+1, y) (call it m2). Set the color of the pixel (x, y) in the output image to 3

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!