Domanda

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.

È stato utile?

Soluzione

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 ;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top