How to Normalise an images histogram?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
<<
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147329/image.png)
>>
Attached is a histogram of an image I'm doing processing work on. The images are Greyscale, as you can see along the x axis the values go from 0-256. Im looking to create a function that will normalise the 3 tonal regions. Since the tonal spread varies across different images it doesn't work well if I run a function which will give all pixels <50 a value of 25 for example. Is there a method or function/s I could use which can recognise that there will always be 3 dominant pixel values in the different regions and normalise them by removing outliers, hence decreasing pixel variation.
0 Commenti
Risposta accettata
Image Analyst
il 26 Feb 2015
What are the 3 gray level regions? 0 to 100, 101 to 254, and 255? Then what do you want to do? Do you want to change the histogram so that it's totally flat in each of those regions? I think that would give a strange looking image as most histogram equalized images are. But if you want, I have code that lets you map your image to any histogram shape that you want. It's here in my File Exchange http://www.mathworks.com/matlabcentral/fileexchange/28972-custom-shaped-histogram
Or maybe you just want imquantize():
posterizedImage = imquantize(grayImage, numberOfLevels);
If neither of these is what you want, then explain better.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Histograms in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!