Refined thresholding to improve noise reduction, added histogram checking to help eliminate false positives