Hi, how can i scale the image data to 0 and 1
9 次查看(过去 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!