imageProcessing HUST-AIA-COURSE thresholdSegmentation use algorithm to choose threshold for segmentation