The following reference will help you dive deeper into thresholding and other image processing techniques: Python 3.x for Computer Vision by Saurabh Kapur (https://www.packtpub.com/application-development/python-3x-computer-vision-video-0)