Professional Documents
Culture Documents
Lab 1
Lab 1
Theory:
• One report has to be handed in per team. Nevertheless, you must be able to answer
questions about your lab report individually.
• Clearly state your names, lab session no, submission date & ID no on the lab report.
• Write a short report with your answers/ results, remarks and analysis. Results discussed
have to be joined along with the report (images, tables). Hand in your report in pdf , the
scripts in form of m-files.and submit all your documents in a . zip file before the next
sessions. The functions and the code have to be fully commented for full understanding.
• Each lab report is either marked as fail or pass. To pass the labs, all reports must have
been marked as pass. The lab reports due date is 1week after lab session.
Exercises
1. Exercise basic Image commands Imread, Imshow, Imresize, Imwrite and imrotate ( for 90°
& 45°) on the image lenna.
2. Accessing pixel data
2.1 Access the pixel for the grayscale image lenna which is located at (60, 70) coordinate
and shows its value.
2.2 Download the single channel image ”crossroad.dat” and Change this image resolution
with boxes 2, 4, 8 and 16 pixels on a side and observe the results. What features do
you lose at each resolution size?
2.21 Using basic subsampling method,
2.22 Using imresize function.
2.3 Considering the previous images with data of type uint8, the data consists of eight bits
for each pixel. Create new images using 5, 4, 3, 2 and 1 bit only for each pixel (see
bitshift). Comment the results.
3.1 convert the RGB image chroL.bmp into grayscale and indexed image formats.
3.2 Using map function, transform the RGB image ‘umbrella.jpg’ in a single channel
image. Considering an RGB image, how obtaining such a map? Difficulties?
4. Operations
4.1 Implement a code using both inbuilt command and image difference function to find the
differences between two images. Use it with images ‘original.png’ and ‘original2.png’.
Comments with the visual inspection...
4.2 Make the difference between ‘chroOp.bmp’ and ‘chroL.bmp’. According to you, what
kind of information is in that way highlighted? Try to mask the original image ‘chro.bmp’
with these results in color in order to highlight particular parts of the image directly.
4.3 Try to remove the background ‘lum.png’ from the image ‘sonnet.png’ to obtain the
image ‘sonnetSubLum.png’. Comments.