Normalize an image from 0 to 1

6 ビュー (過去 30 日間)
Bárbara Maurício
Bárbara Maurício 2021 年 1 月 10 日
コメント済み: Bárbara Maurício 2021 年 1 月 10 日
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.

採用された回答

Image Analyst
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.
  1 件のコメント
Bárbara Maurício
Bárbara Maurício 2021 年 1 月 10 日
Thank you for answering I have now managed to solve it but still appreciated!

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by