Thresholding techniques for image enhancement