Working on hysteresis thresholding