Here, I used new learned image processing techniques such as morphology operations and connected components labeling as well as clustering algorithms to resolve some common problems.
All problems are set by Hao-Chun Hsu who taught the basics of image processing.
Excercise 1
Write a script to identify the contour of the maple leaf in image ‘Maple.jpg’. The program should be able to exclude the petiole from the contour. Draw the contour on top of the maple leaf in the image. Please also calculate the ratio of leaf contour and leaf area.
Excercise 2
Calculate the mean area of 1 NTD, 5 NTD, 10 NTD and 50 NTD coins in image ‘NTDcoins.jpg’. Demonstrate the coins in a labeled image, where black pixels represent background, red pixels represent 1 NTD coins, yellow pixels represent 5 NTD coins, green pixels represent 10 NTD coins, and blue pixels represent 50 NTD coins. Describe your image processing procedure and approach.
I wrote the program excercise_1_identify_leaf_contour.m
and excercise_1_identify_leaf_contour.ipynb
to solve Excercise 1 and the program excercise_2_label_coins.m
to solve Excercise 2.