hw4_sol - ECE 638: Principles of Digital Color Imaging...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 638: Principles of Digital Color Imaging Systems Homework No.4 Name: Qiqi Wang Problem 1. Solution: Because the density function is symmetric to x=0 and it is a 2-level quantizer, we could easy figure out the threshold should be set at 0, so we need to find out the output level for these 2 level quantizer. For minimizing the mean-squared error, the output level should satisfy the following condition. 1 1 1 () {| } x x x x x x xp xd x yE x x x x pxd x + + + == < A A A A AA A So we could find out 10 31 1 5 84 5 8 1.25 1 4 11 2 xx dx x dx y dx dx −− + = = =− =− + ∫∫ Using the same approach, 2 5 5 8 1.25 1 4 2 dx x dx y dx dx + = = + So the 2-level quantizer should be 1.25, when x<0 () { 1.25, when x 0 Qx =
Background image of page 1

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

View Full DocumentRight Arrow Icon
Problem 2. Solution: a. i: Median Cut 1. The range of both axes are the same, so we could choose any axis to start the first cut, here we choose first cut to be perpendicular to green axis, we want the cut to cut the area into 2 equal parts, it is easy to tell from the shape is symmetric about G=0.5 line, so the first cut will a line perpendicular to green axis and across (0,0.5), I marked it as a red cut in the figure 2. Then we could start the second cut to any of the two area, suppose we start from the top half, for this half, the R axis has greater range, so we should cut perpendicular to R axis, because we could again easily tell the top half is symmetric about r=0.5 line, so the second cut will be line perpendicular to red axis and across (0.5,0), I marked it as a green cut in the figure 3. The third cut is similar to the second cut but it cuts the bottom half into 2 pieces, so it is the blue cut in the figure. 4. Now we could cut any of the 4 parts since the area of the histogram are all the same with constant value in the area. We choose the left top part to start our 4 th cut. Here we could either choose red or green axis for the cut, let us do it along the green axis. We should again make the cut to divide the area into 2 equal parts, so we actually solve an
Background image of page 2
equation of the green coordinate value by 22 (1 ) 1 0.5 2 g , we get 2 1 4 g =− , it is marked as the magenta cut in the figure. Now we should calculate the centroid of each of the part. For Triangle part, The equation is 123 1 () 3 GP P P =+ + For quadrilateralpart, The equation is 1324 1 4 P P P + + So, values of all the vertices of these polygons could be obtained easily expect G, which is the intersection of the lines 0.5 gr = + and 2 1 0.646 4 g = , so (0.146,0.646) G = So we have A=(0.5,1) B=(0,0.5) C=(0.5,0.5) D=(1,0.5) E=(0.5,0) F=(0.5, 2 1 4 ) G=( 2 0.5 4 , 2 1 4 ) By using Matlab, I get the output value of these centroids as following(code attached) a=(0.3821, 0.7643) b=(0.2866, 0.5732) c=(0.6667, 0.6667) d=(0.3333, 0.3333) e=(0.6667, 0.3333)
Background image of page 3

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

View Full DocumentRight Arrow Icon
ii: binary splitting text a b c d e B A C D E F First Cut Second Cut Third Cut Forth Cut 1. The direction of greatest variation is actually AE or BD, so we could choose any axis to start the first cut, here we choose first cut to be perpendicular to AE, we want the cut to cut the area into 2 equal parts, it is easy to tell from the shape is symmetric about G=0.5 line, so the first cut will a line perpendicular to green axis and across (0,0.5), I marked
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/19/2012 for the course ECE 638 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 27

hw4_sol - ECE 638: Principles of Digital Color Imaging...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online