Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

used for PPM image 1.3.3 Change a color image to Black & White (W) Color image (b) Black and white image Figure 1: A color

image text in transcribed
image text in transcribed
image text in transcribed
used for PPM image
1.3.3 Change a color image to Black & White (W) Color image (b) Black and white image Figure 1: A color image and its black and white counterpart. A black and white image is the one that the intensity values are the same for all color channels, red, green, and blue, at each pixel. To change a color image to grey, assign a new intensity, which is given by (R+G+B)/3, to all the color channels at a pixel. The R, G, B are the old intensity values for the red, the green, and the blue channels at the pixel. You need to define and implement the following function to do the job. /* change color image to black and white +/ void Blacknwhite (unsigned char RWIDTH] [HEIGHT), unsigned char G[WIDTH) (HEIGHT), unsigned char B[WIDTH] [HEIGHT]); 1.3.4 Make a negative of an image A negative image is an image in which all the intensity values have been inverted. To achieve this each intensity value at a pixel is subtracted from the maximum value, 255, and the result is assigned to the pixel as a new intensity. You need to define and implement a function to do the job. You need to define and implement the following function to do this DIP. /* reverse image color */ void Negative (unsigned char R[WIDTH] (HEIGHT), unsigned char G[WIDTH] [HEIGHT), unsigned char B [WIDTH] [HEIGHT]); (a) Original image (b) Negative image /*** global definitions ***/ const int WIDTH = 512; const int HEIGHT = 288; const int SLEN 80; /* image width */ /* image height */ /* max. string length */

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

Recommended Textbook for

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions

Question

13-1 How does building new systems produce organizational change?

Answered: 1 week ago