How to make the element of matrix that represented an image (pixel) can be real number and how to back the result (real number) to be a pixel?

1 view (last 30 days)
ow to make a matrix that represented an image to be a real number? I want operate this matrix as a real number because I need to read this matrix to a membership function and how to get the back the result in original form (for the real number to pixel)

Answers (1)

Image Analyst
Image Analyst on 19 Feb 2014
This will cast your uint8 image (called "uint8Image") into a double class variable (called "doubleImage"):
doubleImage = double(uint8Image);
To cast back to uint8:
uint8Image = uint8(doubleImage);

Community Treasure Hunt

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

Start Hunting!