how to use 'histeq' with my own histogram?

1 visualizzazione (ultimi 30 giorni)
Hello, I was working with 'histeq' using this expression-> J = histeq(I,n), with 'n' being the number of discrete gray levels (my images are in gray scale) but the result isn't a good result, and now, I work with the other parameter 'hgram', but I'm using always a histogram wich I get of the same image but with less levels,and I don't know if this solution is the best solution, so... my question is:
is any function in MATLAB which could help me to do diferents types of histogram? (like diferents filters, I don't know). I've been searching, but the only way I could think is to make a filter (in spatial domain) and then take his histogram with 'hist', but doesn't work...
Anybody could help me?
Thank you!

Risposta accettata

Image Analyst
Image Analyst il 10 Apr 2015
Here's a rule of thumb: global histogram equalization never gives a good result - get used to it. Not only that, but it's unnecessary . You don't need to do it for anything, not for image segmentation, not for visualization, not for anything. It's just one of those things that they teach in a beginners class but no one in the real world uses it for anything, at least if they know what they're doing. OK, there may be a rare esoteric use case that I haven't heard of, but in over 30 years of image processing I've never had to use it. And when I did use it (like to prove it gives bad results), it gave bad results (surprise surprise).
That said, local histogram equalization ("CLAHE"), done by the function adapthisteq(), does have uses, for example to "flat field" an image or things like that.
Why don't you tell me what you really want to do - the big picture - and I'll tell you some steps to do it (if it's easy, not if it's a Ph.D. project)?
  3 Commenti
Maria
Maria il 10 Apr 2015
Sorry for the answer form, with no spaces between paragraphs.
Image Analyst
Image Analyst il 11 Apr 2015
I agree that working in the spatial domain is better in most cases. It lets you have powerful and adaptive non-linear filters whereas doing stuff in the Fourier domain gives linear filters with less control.
It's common for authors to compare their new improved algorithm to prior algorithms. The simple filters and algorithms invented decades ago like histogram equalization and median filters, etc., have long been surpassed in performance by countless newer improved algorithms. Authors confident in their improved algorithms will compare their algorithms to recent state of the art algorithms. Others (I'm not implying you at all) will compare their algorithm to the oldest, simplest, and poorest performing algorithms, for example Otsu thresholding, inverse filtering, etc., to try to make their algorithm's performance look more impressive. Those people are often undergraduates doing non-state of the art research and have not scanned the recently published articles or don't understand them. I don't know what you're doing but I encourage you to compare your results to the recent state of the art methods that do the same thing. For example if you're doing noise reduction, no one (at least no one knowledgeable in the field) will be impressed if you compare your denoising method only to the median filter but conveniently neglect to compare it to BM3D and non-local means. Good luck with your research.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by