(EIE529) Assignment 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Assignment 3

EIE 529 - Digital Image Processing, Fall 2020-21


Department of Electronic and Information Engineering,
The Hong Kong Polytechnic University

Due 10:59pm, November 29 (Sunday), 2020


**No Late Submission Will be Accepted**

Note:
1) This assignment contains four questions and carries 50 marks in total.
2) Your solutions should be submitted via Blackboard Collaborate before the deadline.

Q1: Otsu’s Method (10 marks)


When deriving the Otsu’s algorithm for image segmentation, it is known that,
𝑚𝐺 = 𝑃1 (𝑘)𝑚1 (𝑘) + 𝑃2 (𝑘)𝑚2 (𝑘) and 𝑃1 (𝑘) + 𝑃2 (𝑘) = 1,
for a threshold value 𝑘, where 𝑃𝑥 (𝑘) and 𝑚𝑥 (𝑘) are the probability and mean intensity value
of the pixel in class 𝑥 (𝑥 = 1 or 2), and 𝑚𝐺 is the average intensity of the entire image. Given
that the between-class variance is defined as:
𝜎𝐵2 (𝑘) = 𝑃1 (𝑘)(𝑚1 (𝑘) − 𝑚𝐺 )2 + 𝑃2 (𝑘)(𝑚2 (𝑘) − 𝑚𝐺 )2 .
Show that,
2
𝜎𝐵2 (𝑘) = 𝑃1 (𝑘)𝑃2 (𝑘)(𝑚1 (𝑘) − 𝑚2 (𝑘)) .
2
(Hint: You may start from 𝜎𝐵2 (𝑘) = 𝑃1 (𝑘)(𝑚1 (𝑘) − (𝑃1 (𝑘)𝑚1 (𝑘) + 𝑃2 (𝑘)𝑚2 (𝑘))) +
2
𝑃2 (𝑘)(𝑚2 (𝑘) − (𝑃1 (𝑘)𝑚1 (𝑘) + 𝑃2 (𝑘)𝑚2 (𝑘))) .)

Q2: Morphological Watershed (10 marks)


A 4-bit grayscale image patch has the pixel values as shown in Figure 1. Based on the watershed
method, indicate the watershed lines by shading the related pixels. The local minima are
highlighted by the red circles.

1
Figure 1. The 4-bit grayscale image for Q2.

Q3: Graph Cut (10 marks)


Figure 2 shows a weighted undirected graph 𝐺(𝑉, 𝐸) with the set of vertices denoted as 𝑉 and
the set of edges denoted as 𝐸. The weights of the edges are marked in the figure.

Figure 2. The weighted undirected graph for Q3.

1) Determine the Laplacian matrix for the graph.


(4 marks)
2) If the normalized graph cut (Ncut) method is used to partition this graph into two sub-
graphs, determine the sets of nodes belonging to the two subgraphs, respectively. (Hint:
You may want to use the Matlab function “eig” to solve the generalized eigenvalue
decomposition problem after you determine the matrices “𝑳” and “𝑫” as specified in the
lecture notes).
(4 marks)
3) Comment if the result obtained in 2) follows your expectation.
(2 marks)

2
Q4: Shape and Region Descriptors (20 marks)
1) Represent the contour of the object shown in Figure 3 in a clockwise direction with a 4-
directional chain code. You should normalize your chain code with respect to the
orientation of the object and then the starting point of the chain code.

Figure 3. The objective for Q4 1).


(10 marks)
2) Consider a binary image of size 100x100 pixels, with a vertical black band extending from
columns 1 to 49 and a vertical white band extending from columns 50 to 100. Obtain the
co-occurrence matrix of this image using the position operator (i.e., the condition) “one
pixel to the right of the current one”.
(10 marks)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy