Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To detect an edge of the image, the intensity of the center pixel ( E ) with the value is changed to E - F

To detect an edge of the image, the intensity of the center pixel (E) with the value is changed to
E-F-G-H-I ). Repeat this for every pixel, and for every color channel (red, green, and blue) of the image. You
need to define and implement a function to do this DIP. Note that you have to adjust the boundaries for the newly gen-
erated pixel values, i.e., the value must be within the range of 0,255. To achieve this, we will use a technique called
saturated arithmetic. Specifically, you calculate the intensity values first with full integer precision (use a temporary
variable of type int). Next, you change any value larger than 255 to 255, and any value smaller than 0 to 0. Finally,
you assign the resulting saturated value to the target pixel intensity (which is an unsigned char).
Note that special care has to be taken for pixels located at the image boundaries. For ease of implementation, you may
choose to ignore the pixels at the border of the image where no neighbor pixels exist.
You need to define and implement the following function to do this DIP.
/* Find edge of an image */
void Edge(unsigned char R[WIDTH][HEIGHT],
unsigned char G[WIDTH][HEIGHT],
unsigned char B[WIDTH][HEIGHT]);
The edge image should look like the figure shown in Figure 4(b):
Please enter your choice: 6
"Edge" operation is done!
Load a PPM image
Save an image in PPM and JPEG format
Change a color image to Black & White
Make a negative of an image
Color filter an image
Sketch the edge of an image
Shuffle an image
Flip an image vertically
Mirror an image horizontally
0: Add Border to an image
11: Test all functions
12: Exit
please make your choice:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions