Added a thresholding function to the image recognition file.
Added a thresholding function to the program.