finalsol2011

# finalsol2011 - 24 ECE 253a Digital Image Processing Pamela...

This preview shows pages 1–3. Sign up to view the full content.

# 24 ECE 253a Digital Image Processing Pamela Cosman 12/9/11 ECE 253a Final Exam Solutions 1. Binary Image Processing: (8 points) (a) Even though the origin of B 1 is not centered, the set ( A B 1 ) will be an outline of a square with side length 4 L with a single point in the center. (b) If B 2 has side length 2 L , then the result will have a solid interior. Grading: 4 points for part (a). Partial credit if you realize that the thick square erodes to a thin square outline, or that the inner circle erodes to a single point. 4 points for part (b). 2. Histogram Equalization: (3 points) First one is blue, second one is red, third one is green. Grading: one point each. 3. Huffman coding after DPCM: (10 points) (a) The difference values are 3 and +3 (each has probability 1/16), 2 and +2 (each has probability 2/16), 1 and +1 (each has probability 3/16), and 0 (with probability 4/16). (b) The symbols are listed on the left, the probabilities next (multiplied by 16), and the codewords on the right. There are several different valid sets of Huffman codewords for this distribution. 4 3 3 2 2 1 1 +1 -1 -3 +3 -2 +2 0 1111 1110 110 101 100 01 00 (c) The original symbols all have equal probability, so the average length of a Huffman code designed for them is 2 bits/symbol. The average length for the codewords found in part (b) is 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 × 4( 1 16 ) + 2 × 3( 2 16 ) + 3( 3 16 ) + 2( 3 16 ) + 2( 4 16 ) = 43 16 = 2 . 6875 bits/symbol The penalty is therefore 0.6875 bits/symbol. (d) Huffman coding the difference values is worse because the original values are independent. Grading: (a) 2 points, (b) 3 points, (c) 3 points, (d) 2 points. 4. Arithmetic encoding: (6 points) The encoder will put out a bit of zero after N consecutive zeros have been produced by the source, where N is the smallest integer such that (0 . 95) N < 0 . 5 Grading: One point for saying that the bit will be zero, and 5 points for the inequality. Note: The initial assignment of source symbols to portions of the unit interval is arbitrary. The answer above assumes that the source symbol 0 has been assigned to the lower 95% of the unit interval, and the source symbol 1 has been assigned to the remaining (upper) 5%. You
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern