Hi, how can i scale the image data to 0 and 1
6 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
Jan
2017 年 3 月 29 日
編集済み: Stephen23
2017 年 3 月 29 日
If you divide an uint8, you get an uint8. Therefore either convert the matrix to double at first:
gray_d = double(gray) / 255;
But for productive work and if you have the image processing toolbox, use Thorsten's suggestion. im2double checks the type of the input and considers, if the input is a uint16 or double already.
0 件のコメント
その他の回答 (1 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!