You are on page 1of 2

Addis Ababa Institute of technology

Center of biomedical engineering


Digital image processing
Lab Session 1

Title: Basic image manipulations and Operations between Images.

Objective: To understand Basic image manipulations, image formats, conversion between


different images formats and to performs operations between images.

Theory:

Image processing is a method to perform some operations on an image, in order to get an


enhanced image or to extract some useful information from it. In digital imaging, a pixel, or
picture element is a physical point in a raster image, or the smallest addressable element in an
all points addressable display device; so it is the smallest controllable element of a picture
represented on the screen. Image Manipulation involves transforming or altering an image
using various methods and techniques to achieve desired results. Image operation is Image
arithmetic applies one of the standard arithmetic operations or a logical operator to two or
more images. The operators are applied in a pixel-by-pixel way, i.e. the value of a pixel in the
output image depends only on the values of the corresponding pixels in the input images.
Hence, the images must be of the same size. After each operations and manipulations images
can be organized and stored by a means of image formats. There are different file formats and
conversion of one format to the other can be done using matlab.

Lab reports Instruction

• 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 Types of images, image formats and their conversion

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.

You might also like