Stone-detection

Environment

 Python = 3.6.12
 Numpy = 1.18.5
 Opencv-python = 4.1.2.30

Data

   ./video.avi

Test

   python dealWithVideo.py

Result

   ./video_new.avi

The interpretation of dealWithVideo.py

1.Because of the lighting conditions, the detection effect of places with poor lighting contrast is not ideal, so first cut each frame of the video, carry out binary detection respectively.

crop & binary detection

Left

three

Right

two

2.Connect the cropped and binarized images

1

3.Edge detection

2

4.Overlay the edge detection results with the original image

hello