Description : You need to implement a program to generate a color histogram for each input image, and compute a color histogram difference between two input [login to view URL] : The following valuesfrom keyboard.
First input image file name(square size, and .ppm format).
Secondinput image file name(square size -same size as the first image, and .ppm format).
Histogram size (2(2x2x2), 4(4x4x4),8(8x8x8), or 16(16x16x16)).
oYour program needs to do the following basically:
Get input valuesabove.
Perform ‘ReadPPM’ for two input images.
Initialize all bin values of two histogramsas 0.
Get each pixel value from the first input image, compute its proper bin location, and increase the bin count, and get each pixel value from the secondinput image, compute its proper bin location, and increase the bin count.
Compute a difference between two histograms, in which the denominator is Total number of pixels in two input images.
Output : The followings need to be displayed in the screen as output.
Histogram difference in term of number of pixels.
Histogram difference ratioin which Histogram difference in term of number of pixels is divided by the totalnumber of pixelsin two input images.