Foreign object judgment detection based on OpenCV