I really need help in writing a program which has 2 images as input and 2 histograms as output.

Please help!

Thanks.