Reputation: 261
I have a video clip with fish swimming in a flume and small particles floating on the surface. So, the moving objects are the swimming fish and hundreds of particles. Here is the link of the video sample.
My interest is to locate the fish correctly in each single frame.
Currently, my procedures are as below:
cv2.BackgroundSubtractorMOG
.My questions are:
cv2.BackgroundSubtractorMOG
, I adjusted history
, nmixture
in the function, it does not seems to work well in the first 10 frames. How to pick up the moving objects in the first few frames?cv2.BackgroundSubtractorMOG
can pick up a vague outline of fish, as shown in the red circle in the pic below: Here is the link of my code.
Thank you!
Upvotes: 1
Views: 510
Reputation: 3408
Assuming that the fish swim along only this direction (or the opposite), you can try to use custom morphological operations that help to grow elongated objects. It should at least increase the size of the blob, thereby giving more data to the MoG model for tracking.
Upvotes: 0