Histogram to image

2 views (last 30 days)
M W
M W on 23 Dec 2011
Hi, I'm a Matlab newbie and I desperately need your help. I need to enhance image by performing operations on its histogram. But how can I apply that changes to the image? It's easy to extract histogram form the image but how to transform histogram back into image after performing e.g. histogram smoothing?

Answers (2)

Image Analyst
Image Analyst on 24 Dec 2011
I suppose you could maybe use the intlut() function. But why don't you tell us what you want to do and we can tell you the best way to achieve it? You can upload your image to tinypic.com.

M W
M W on 24 Dec 2011
Thanks for the answer.
I need to implement a Generalized Histogram Equalization algorithm. The method is described in the following article (click to open/download a PDF file)
I'm stuck at the point where I have to remove the noise from histogram. I can do it e.g. with the medfilt1() method. It works fine for the histogram but what about the image? I need to change the image too. Is there any way to recreate the image based on the new histogram?
  6 Comments
Image Analyst
Image Analyst on 25 Dec 2011
It may take you a while, as it would for me, but I think is something that you could handle.
M W
M W on 25 Dec 2011
Yea, I think I can do it. You provided a really good commentary.
I've spent some time looking through this code and I see that the desiredPixelsInEachBin vector may be the key.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!