You are on page 1of 40

IMAGE PROCESSING NUMERICAL QUESTIONS

Click to edit Master subtitle style

5/24/12

Problem 8.4
Consider an 8-pixel line of intensity data, {108,139,135,244,172,173,56,99}. If it is quantized with IGS quantization with 4 bit accuracy, compute the rms error and rms signal to noise ratios for the quantized data.

5/24/12

5/24/12

5/24/12

Problem 8.5
A 1024*1024 8 bit image with 5.3 bits/pixel entropy is to be Huffman coded.

What is the maximum compression that can be expected? The maximum compression with Huffman coding is C = 8/5.3 =1.509.
5/24/12

If a greater level of lossless compression is required, what else can be done? One possibility is to eliminate spatial redundancies in the image before Huffman encoding. For instance, compute the differences between adjacent pixels and Huffman code them.
5/24/12

Problem 8.9
Consider the simple 4*8, 8-bit image:
21 212195169 243 243 243 21212195169 243 243 243 21212195169 243 243 243 21212195169 243 243 243

5/24/12

Compute the entropy of the image

Total number of pixel = 32


Grey level R1 R2 R3 R4 21 95 169 243 Value 0.375 0.125 0.125 0.375 Probability

5/24/12

Compress the image using Huffman Coding, and compute the compression achieved.

Compression:
5/24/12

What is the entropy of the image when looked at as pairs of pixel?

5/24/12

The difference between this value and the entropy in first part tells us that a mapping can be created to eliminate (1.8111.25) =0.56 bits/pixel of spatial redundancy. Difference image: 21 0 0 74 21 0 0 74 21 0 0 74 21 0 0 74
5/24/12

74 74 0 0 74 74 0 0 74 74 0 0 74 74 0 0

The entropy of the difference image:

Difference removes most of the spatial redundancy, leaving only (1.411.25) = 0.16 bits/pixel.
5/24/12

Problem 8.19
Use the LZW coding algorithm to encode the ASCII string aaaaaaaaaaa.

Assume that the first 256 codes in the starting dictionary are the ASCII codes. If you assume 7-bit ASCII, the first 128 locations are all that are needed. In either case, the ASCII a corresponds to location 97.
5/24/12

5/24/12

The encoded output is : 97 256 257 258 97.

Problem (10.2)

5/24/12

1515

Solution (10.2)

mask

5/24/12

1616

Solution (10.2) Cond

Each mask would yield a value of 0 when centered on a pixel of an unbroken 3-pixel segment oriented in the direction favored by that mask. Conversely, the response would be a +2 when a mask is centered on a one-pixel gap in a 3pixel segment oriented in the direction favored by that mask.
1717

5/24/12

Problem (10.5)

Suppose that we compute the gradient magnitude of each of the these models

Using the Prewitt operator , sketch what a horizontal profile through the center of each gradient image would look like.
5/24/12 1818

Solution (10.5)

-1 -1 -1 0 0 0 1 1 1

5/24/12

1919

Cond(10.5)

5/24/12

2020

Problem(10.22)

5/24/12

2121

Solution (10.22)
Y=ax+b b -b/a Normal form xcos + ysin = 5/24/12 2222

Solution (10.22)

5/24/12

2323

Problem(10.39)

Segment the image shown by using the split and merge procedure . Show the quad tree corresponding to the your segmentation.

5/24/12

2424

Solution (10.39)

5/24/12

2525

Solution (10.39)

5/24/12

2626

Problem(10.49)

5/24/12

2727

Problem(10.49)-(a)

Determine the maximum value of K that will guarantee that the blur from motion does not exceed 1 pixel.

5/24/12

2828

Solution (10.49)-(a)

It is given that 10% of the image area in the horizontal direction is occupied by a bullet that is 2.5 cm long. Because the imaging device is square (256 256 elements) the camera looks at an area that is 25cm25cm, assuming no optical distortions. Thus, the distance between pixels 25/256=0.098 cm/pixel.

5/24/12

2929

Solution Cond(49.(a))

The maximum speed of the bullet 1000m/sec = 100,000 cm/sec. At this speed, the bullet will travel 100,000/0.98 = 1.0210^6 pixels/sec. Here it is required that the bullet should not travel more than one pixel during exposure. That is, (1.0210^6 pixels/sec) K sec 1 pixel. So, K 9.8107 sec.
3030

5/24/12

Problem(10.49)-(b)

Determine the minimum number of frames per second that would have to be acquired in order to calculate the speed of the bullet.

5/24/12

3131

Solution (10.49)-(b)

The frame rate must be fast enough to capture at least two images of the bullet in successive frames so that the speed can be computed.

5/24/12

3232

Solution Cond(49.(b))

If the frame rate is set so that the bullet cannot travel a distance longer (between successive frames) than one half the width of the image, as in the case of A and E. In the other cases we get partial bullets. Although these cases could be handled with some processing (e.g., by determining size, leading and trailing edges, and so forth)
3333

5/24/12

Solution Cond(49.(b))

The length of the bullet in pixels is (2.5cm)/ (0.098cm/pixel) 26 pixels. One half of the image frame is 128 pixels, so the maximum travel distance allowed is 102 pixels. Because the bullet travels at a maximum speed of 1.02106 pixels/sec, The minimum frame rate 1.02106/102 = 106frames/sec.
3434

5/24/12

Problem 11.1

Show that redefining the starting point of a chain code so that the resulting sequence of a no. forms an integer of min magnitude makes the code independent of the initial starting point on the boundary .

Solution:
The key to this problem is to recognize that the value of every element in a chain code is relative to the value of its predecessor. The code for a boundary that is traced in a consistent manner (e.g., clockwise) is a unique circular set of numbers. Starting at different locations in this set does not change the structure of the circular sequence. Selecting the smallest integer as the starting point simply identifies the same point in the sequence. Even if the starting point is not unique, this method would still give a unique sequence. For example, the sequence 101010 has three possible starting points, but they all yield the same smallest integer 010101.
5/24/12

Problem 11.6
Find an expression for the signature of the boundary of an equilateral triangle and plot the signature.

Solution:
we see that the distance from the origin to the triangle is given by r() =D0/cos 0 < 60 =D0/cos(120 ) < 120 < 180 < 240 < 5/24/12 300 =D0/cos(180 ) =D0/cos(240 ) =D0/cos(300 ) 120 180 240 60

whereD0 is the perpendicular distance from the origin to one of the sides of the triangle, and D = D0= cos(60) = 2D0. Once the coordinates of the vertices of the triangle are given, determining the equation of each straight line is a simple problem, and D0 (which is the same for the three straight lines) follows from elementary geometry.

5/24/12

Problem 11.7:

Draw the medial axis of a.) A circle b.) A square

Solution:

5/24/12

Problem 11.16
Obtain the gray level co-occurrence matrix of 5*5 image composed of a checkerboard of alternating 0s and 1s if The position operator p is defined as one pixel to the right

Solution:
The image is 01010 10101 01010 10101 01010

5/24/12

Let z1 = 0 and z2 = 1. Since there are only two gray levels the matrix A is of order 2x2 . Element a11 is the number of pixels valued 0 located one pixel to the right of a 0. By inspection, a11 = 0. Similarly, a12 = 10, a21 = 10, and a22 = 0 The total number of pixels satisfying the predicate P is 20, so C= 0 1/2 1/2 0

5/24/12

You might also like