Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Image reconstruction from modified histogram

Subject: Image reconstruction from modified histogram

From: Md. Omar Faruqe

Date: 17 Apr, 2014 20:11:13

Message: 1 of 3

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

Subject: Image reconstruction from modified histogram

From: Steven Lord

Date: 18 Apr, 2014 14:09:08

Message: 2 of 3


"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.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Image reconstruction from modified histogram

From: John D'Errico

Date: 18 Apr, 2014 14:38:11

Message: 3 of 3

"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.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us