We use NI vision assistant to calibrate the thresholds. You can import the pictures into vision assistant straight from the LabVIEW Data folder, as the images from the robot are constantly temporarily saved in this folder. (I'm not sure if non-LabVIEW teams have something similar or not). Then adjust thresholds accordingly until you are satisfied!
Screenshot.