Multi-color space threshold segmentation and self-learning k-NN algorithm for surge test EUT status identification