Question 1
(a) Copy "Porshe.tiff" into file.
- Read the file into f
- How large is the image(rows,columns)?
In other to complete the question, followed these instructions:
- Use command imread to read the file
>> I=imread('Porsche.tiff')
- Make sure the directory for the image is the same as your current directory.
- To check the size of the image, you can check on the workspace
Value = <342x546 uint8>
Row = 342
Column = 546
* or double click I (open I) in workspace and variable editor of I will be displayed.
(b) Answer the following questions about the image
- How big is the file?
- Use whos command to display the information of the matrix
- Answer: 186732 bytes
- How large is the image (rows,columns)
- What are the minimum and maximum gray values?
Min = 0;
Max = 240
- How many bytes in the file are used to store one pixel?
Question 2
Part I : Image Acquisition
Sample image.
Part II : Read the image into MATLAB
- Use imread command to read the image
- To display the information of matrix I
- Note that the class should be "uint8" and the third dimension of I should be 3, which denotes it is a colour image (the three components responding to R, G, B channels respectively).
- To display the image with original colour.
- To convert image into grayscale
- To display the green channel of the image
- To display the red channel of the image
Part III : Basic Image Operations
- Transport the image and display it.
- To crop the top-left quarter of the image and display it
- To flip the image from left to right and display it
No comments:
Post a Comment