is it im2double() have the same result with double()?
조회 수: 1 (최근 30일)
이전 댓글 표시
i read a image name it 'lena'
is it im2double(lena) == double(lena)?
답변 (2개)
Jan
2017년 4월 4일
While double() converts the type of the data only, im2double() cares for the values also:
img = uint8([255, 127])
double(img) % >> [255, 127] as double
im2double(img) % >> [1, 0.498] as double
The values are scaled to the range [0.0, 1.0] as wanted.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!