Pest detection using adaptive thresholding | Synapse