How can I normalize images in matlab?
11 views (last 30 days)
Show older comments
I'm writing thesis and I need to normalize .dcm images, but I don't know how. I tried to histogram equalization with 'imhisteq' function but it doesn't work because my histograms are not displayed (I will show you my code on shotscreen) and an images looks bad. Next step in my thesis will be removal of skull from MRI images. I need help from someone who did something similar. Could you help me?
Code:
I = dicomread('1-20.dcm')
J = imhist(I)
K = adapthisteq(I)
L = histeq(K)
M = imhist(L)
figure()
subplot(2,2,1), imshow(I,[])
subplot(2,2,2), imshow(J,[])
subplot(2,2,3), imshow(L,[])
subplot(2,2,4), imshow(M,[])
Image:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/355381/image.png)
0 Comments
Answers (1)
Bjorn Gustavsson
on 3 Sep 2020
Once upon a time I had to make my own versions of histogram equalization because at that time that function in the image processing toolbox worked with the assumption that the images were in 8-bit, and the result of using it with double-arrays or 16-bit images were underwhelming. It is not exactly clear to me what type of normalization you want so the 2 functions attached are my histogram equalization and histogram-matching functions, perhaps they can be of use.
HTH
0 Comments
See Also
Categories
Find more on Geometric Transformation and Image Registration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!