3D plotting only with double data?!

2 ビュー (過去 30 日間)
David Stepputat
David Stepputat 2011 年 7 月 5 日
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!

回答 (1 件)

Sean de Wolski
Sean de Wolski 2011 年 7 月 5 日
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!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by