Normalize an image from 0 to 1
3 次查看(过去 30 天)
显示 更早的评论
Im trying to normalize an image from 0 to 1,after having used rgb2gray. However using mat2gray and im2double is only giving me 0 and 1 values, nothing in between. I also need to use the equation (I-min(I))/(max(I)-min(I)) and somehow I still can only get zeros and ones.
0 个评论
采纳的回答
Image Analyst
2021-1-10
mat2gray() and rescale() will both work. If you're only getting 0 and 1 then you have only two gray levels in your image. Post your image so I can check it.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!