Image segmentation algorithm to segment the Potomac River from the multi-spectral image of Washington DC
1. Team Assignment HW#5
Muhammad Irsyadi Firdaus (P66067055)
Iva Nurwauziyah (P66067021)
1. Develop an image segmentation algorithm to segment the Potomac River from the
multi-spectral image of Washington DC showed below (4 channels: R, G, B, NIR).
B channel ( =0.45-0.52) G channel ( =0.52-0.6)
R channel ( =0.63-0.69) Near Infrared channel ( =0.76-0.9)
Figure 1. The original image
Image segmentation means division of an image into meaningful structures. It
is process of extracting and representing information from the image to group
pixels together with region of similarity. Watershed based image segmentation
algorithms are less computational complex and provide very good segmentation
results. Watershed transformation also called, as watershed method is a powerful
mathematical morphological tool for the image segmentation.
First, we generate the Normalized Difference Water Index (NDWI) using this
following formula:
𝑁𝐷𝑊𝐼 =
𝐺𝑟𝑒𝑒𝑛 − 𝑁𝐼𝑅
𝐺𝑟𝑒𝑒𝑛 + 𝑁𝐼𝑅
Where, NDWI refers to the water index image, NIR refers to spectral value of
pixels at the near infrared spectral channel (band 4), and green refers to spectral
value of pixels at the green spectral channel (band 2).
Then, calculate threshold using global thresholding method. This threshold set
by trial and error until getting the best result, so we obtain the best threshold value
2. is 0.5. The value means the maximum region visualize of the river with less noise
in the around. The increase of threshold value will be less noise. In this threshold,
there are still has a noise, so we need to do removing this noise using erosion and
continued with opening method, and also provide the radius value. The radius is 2
for the erosion and opening, respectively.
After that, we continue to visualize the river in blue color. All of this result
will showed in the figure 3.
Figure 2. The threshold image = 0.5
2. Visualize the segmented river in colors and output the area of the segmented river
in pixel.
Figure 3. GUI Segmentation River