Answered step by step
Verified Expert Solution
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
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, ie the value must be within the range of 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 to and any value smaller than to 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 Edgeunsigned char RWIDTHHEIGHT
unsigned char GWIDTHHEIGHT
unsigned char BWIDTHHEIGHT;
The edge image should look like the figure shown in Figure b:
Please enter your choice:
"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
: Add Border to an image
: Test all functions
: Exit
please make your choice:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started