Sie sind auf Seite 1von 6

Digital Image Processing Examination

1. An image array f(m, n) of size M1 N1 is to be convolved with a filter array h(m, n) of size M2 N2 to produce a new image array g(m, n). 1) Write a pseudo code program that describes a method to compute g(m, n) through the use of Fourier transforms. The result should be the same size as would be achieved with direct convolution. 2) Modify the algorithm so that it does the correlation f ~ h rather than the convolution.

2. You have the job of designing an algorithm that will count the number of objects with holes and the number of objects without holes in images of the kind shown here. Assume that the images are binary with 0 corresponding to black and 1 corresponding to white. The imaging system is of low quality and produces images that are corrupted with salt and pepper noise. The objects do not overlap or touch, but may be close to each other in any direction. They may be of any shape or size. The algorithm should not be confused by the salt and pepper noise, and should not count noise pixels as objects. Write a pseudo-code description of your algorithm. You may also include a block diagram and other information to make it understandable to a programmer. State any assumptions you make, such as: Objects must contain at least 50 pixels.

3. Suppose that an image has the gray-level probability density functions shown. Here, p1(z) corresponds to objects and p2(z) corresponds to the background. Assume that p1=p2 and find the optimal threshold between object and back ground pixels.

4. The Sobel operator computes the following quantity at each location (x, y) in an image array, A: Gx[j,k]=(A[j+1,k+1]+2A[j+1,k]+A[j+1,k-1])-(A[j-1,k+1]+2A[j-1,k]+A[j-1,k-1]) Gy[j,k]=(A[j-1,k-1]+2A[j,k-1]+A[j+1,k-1])-(A[j-1,k+1]+2A[j,k+1]+A[j+1,k+1]) G[j,k] = |Gx[j,k]| + |Gy[j,k]| The position of A[j, k] is column j and row k of the array. The operation is implemented as the convolution of the image array A with two masks, Mx and My followed by the magnitude operation. 1) Write a 3 3 array for each mask, Mx and My. 2) What mathematical operation on an image array is approximated by the Sobel operator? Show how the Sobel operator is related to the mathematical operation.

5. Answer the following questions about morphological image processing. (a) Shown below are two tables with expressions that relate to binary morphological image processing. Associate each expression in the left table with one from the right table.

(b) A well-known morphological algorithm uses the following iteration with a structuring element B. (1) (2) (3) Initialize X[p] = 1 for some pixel p A Y = ( X B) I A If Y X then set X = Y and repeat (2)

An original set A is shown in (A) and an initial pixel p 2 A is shown in (B). The result after one iteration of the algorithm with structuring element 0 1 0 B= 1 1 1 0 1 0

is shown in (C). Fill in the result of the next two iterations by marking the appropriate pixels for the set Y in (D) and (E). In frame (F) show the result for Y that would be reached after a large number of iterations.