3D plotting only with double data?!
Show older comments
Hi, I want to display the differences within an 8bit grey-scale image as a 3D surface plot. Therefore I imported the image as a matrix with values between 1 and 255. The number of columns M and rows N defines the plain size of the plot, and the NxM.data the NxM.height. Why do I first have to convert the data from its original format (in this case unsigned Integer 8) to double? ( MatLab command: im2double(X))? Thanks for your help!
Answers (1)
Sean de Wolski
on 5 Jul 2011
0 votes
I would recommend just using double(). im2double() normalizes the data to fall between 0 and 1. The fact that surf and mesh don't accept other classes irritates me too - you're not alone!
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!