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 ;