문제

I have an image on mat-lab and i would like to analyze the intensity of the light in the image. I want to do some kind of 3-D plot so i can see it clearly and get from it the average of the intensity and other stuff. Can someone tell me what command should i use and how? my knowledge on mat-lab is very poor. I have tried to do a surf plot but it keeps telling me "Warning: CData must be double or single unless it is used only as a texture data " and i don't know how to change the type or what can i do to overcome this problem.

도움이 되었습니까?

해결책

Convert your image from uint8 to double type. This way you'll be able to do more operations on Matlab in a more flexible way:

>> doubleImg = im2double( uint8Img );

Alternatively (if you do not have image processing toolbox):

>> doubleImg = double( uint8Img ) / 255.0 ;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top