Question: 6.17. A binary (digital) picture is a two-dimensional array, each of whose entries is 0 or 1. The image is interpreted as light (1) on

 6.17. A binary (digital) picture is a two-dimensional array, each of

6.17. A binary (digital) picture is a two-dimensional array, each of whose entries is 0 or 1. The image is interpreted as light (1) on a dark (0) background. For example, the following is a binary picture of a football: 0 0 1 1 1 0 0 0 0 1 1 1 0 0 In analyzing a binary picture, it is often necessary to identify the edges. Let us define an element of the picture (called a pixel) to be an edge pixel if it is 1 and at least one of the pixels immediately above, below, left, or right is 0. We can thern show the edges by setting each edge pixel to 1 and all other pixels to 0. After iden- tifying the edges in the preceding picture, we obtain 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 0 Write a program that reads a binary picture and prints the picture showing the edges

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!