Professional Documents
Culture Documents
ECE 253
Digital Image Processing
October 4, 2015
Instructions :
Homework 1 is due by 11:59 PM, October 13, 2015.
Submit your homework electronically by email to arangesh@ucsd.edu with the subject line
ECE 253 HW1.
The email should have one PDF file of your writeup attached. Make sure it includes your full
name, PID, and email. This file must be named ECE 253 hw1 lastname studentid.pdf.
All problems are to be solved using MATLAB unless mentioned otherwise.
You should avoid using loops in your MATLAB code unless you are explicitly permitted to
do so.
Append source code, floats, matrices, and image outputs, to your writeup where applicable.
Simply pasting your code in the report should suffice, but make sure it is indented correctly.
Problem 1. MATLAB basics
0
3 9 5 1
0
4 25 4 3
(i) Input A =
63 12 23 9 and B = 0
1
6 32 77 0
0
12 8 5 1
1
1
0
1
1
0
1
0
0
0
1
1
1
in MATLAB.
1
0
(ii) Transform the color image to grey-scale. Verify the values are between 0 and 255. If not,
please normalize your image from 0 to 255. Call this image B.
(iii) Add 20 to each value of image B. Set all pixel values greater than 255 to 255. Call this image
C.
(iv) Flip image B along both the horizontal and vertical axis. Call this image D.
(v) Calculate the median of all values in image B. Next, threshold image B by the median value
you just calculated i.e. set all values greater than median to 1 and set all values less than or
equal to the median to 0. Name this binary image E.
Include all images A-E in your report. Try to fit atleast 4 images in a page. You may use the
subplot function if necessary.