Question: The task is to write a simple stand-alone program that converts the loaded source image in the negative one. Source image is located in the

The task is to write a simple stand-alone program that converts the loaded source image in the negative one. Source image is located in the file cameraman.tif. It is a monochrome image of size 256 x 256 points. The degrees of gray image points are coded using integers in the range [0, 225]. The number 0 means black, while the number 255, white.

Image transformation algorithm is given as follows:

Read the source image file cameraman.tif and save it in the array X

Display the read source image.

Determine the input image size

Declare an array to record output image

  • Calculate the gray value for the output image points (negative) Y using given relation

y( i, j ) = 255 - x( i, j )

Display the output and input images, and their histograms.

The result of the program should be such as shown on Figure below.

The task is to write a simple stand-alone program that converts the

1000 500 0 0 100 200 1000 500 0 o 100 200

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!