Professional Documents
Culture Documents
Even though the variables a and b have the same numeric value, they are of different data
types. An important consideration (of which we shall more) is that arithmetic operations
are not permitted with the data types int8, int16, uint8 and uint16.
Converting between double and uint8:
When you store an image, you should store it as a uint8 image
since this requires far less memory than double. When you are processing an
image (that is performing mathematical operations on an image) you should
convert it into a double. Converting back and forth between these classes is easy.
imshow(cd/255)
We can vary the display by changing the scaling of the matrix. Results of the commands:
Procedure:
1. Read the image from Matlab .
2. Convert the image from uint8 to double by using direct command im2double
3. Convert the image from uint8 to double by using indirect command by multiply 255
4. Display the result by imshow command.
Report:
1- Display image in the range from 0-1 and discussion the result?
2- Display image in the range from 0-2 and discussion the result?