Stop camshift algorithm

asked 2014-03-23 08:54:22 -0500

I am using the CAMshift algo. for my final year project but am stuck on a point. I am not able to terminate the algorithm automatically. Even after I remove the object from in front of the camera, the algorithm keeps tracking. I have heard about the termination criteria but don't know whether it is applicable here or not. Any help is appreciated. Thanks in advance.

Here's my code:


edit retag flag offensive close merge delete