I=imread('image.jpg')
h=imhist(I)
I have the histogram h and then modify & redistribute the intensities in h
and suppose modified histogram is hr (but not equalized with cdf)
How can I reconstruct the image using histogram hr

"Md. Omar Faruqe" <faruqe_cse@yahoo.com> wrote in message
news:lipch1$qh4$1@newscl01ah.mathworks.com...
> I=imread('image.jpg')
> h=imhist(I)
> I have the histogram h and then modify & redistribute the intensities in h
> and suppose modified histogram is hr (but not equalized with cdf)
> How can I reconstruct the image using histogram hr

You can't.

x1 = [1 2 3 4; 1 2 3 4]/4;
x2 = [1 1 2 2; 3 3 4 4]/4;

x1 and x2 have the same image histogram since they have exactly the same
elements, just in a different order. You can't distinguish between them
based on the output of IMHIST alone.

"Md. Omar Faruqe" <faruqe_cse@yahoo.com> wrote in message <lipch1$qh4$1@newscl01ah.mathworks.com>...
> I=imread('image.jpg')
> h=imhist(I)
> I have the histogram h and then modify & redistribute the intensities in h
> and suppose modified histogram is hr (but not equalized with cdf)
> How can I reconstruct the image using histogram hr

As Steve pointed out, the histogram is not sufficient. Even
simpler, suppose you just sorted the pixels of the image in
increasing order of their pixel value.

It seems pretty obvious that you cannot reconstruct an image
from the sorted values, so a histogram is worse yet. You ask
for the impossible.

John

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.