convert image and linear stretch
8 views (last 30 days)
Show older comments
If i have an array of type double, how can i convert it to uint8 and linearly stretch all the values such that min = 0 and max = 255 ? do I have too write my own code for this ? Would this be the correct code ?
K = (depth - min(depth(:)))/(max(depth(:)) - min(depth(:)))*255;
0 Comments
Answers (2)
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!