TP 1 MScourse2006
TP 1 MScourse2006
TP 1 - Introduction
Tasks:
1. Operating with grayscale images.
Read grayscale image “gbear” in a given format as a matrix.
Display image dimensions and find the smallest and the largest elements of the matrix.
Calculate and display histogram of the image. For verification use operator imhist.
Write the matrix after a rotation of 90 degrees as a new image in JPG format.
Compare obtained values with the corresponding ones after the usage of Matlab
function rgb2ycbcr and display an absolute difference between them. Make conclusion
about the obtained result.
Calculate the transposed matrix for Y matrix and write it as a new image in BMP
format.
3. Create a function that reads an input image, automatically detects color type and performs
RGB->YCbCr conversion (if necessary), and finally, writes it as a new image in specified
(as an argument) image format.
Useful information:
To operate with generic commands of MATLAB use command help general.
The list of commands help ops, help elfun, help matfun concerning operators and special
characters, elementary math functions and operations related to linear algebra.
The list of the matrix manipulation commands help elmat and the programming language
constructs help lang.
The Image Processing Toolbox assigned to different operations with images.
The test images are placed at http://cui.unige.ch/~ms/TP/Images/