Made changes to the Adaptive Thresh method and location of image processing. This results in faster image processing and no more memory warnings.