OpenCV 3 Tracker won't work after reinitialization

前端 未结 3 1770
天涯浪人
天涯浪人 2020-12-20 16:10

I have issue using OpenCV 3 tracking module for tracking. It behaves same, either I use interface class (cv::Tracker) or class with implementation (like cv::TrackerMedianFlo

3条回答
  •  温柔的废话
    2020-12-20 16:43

    I ran into the same problem and here's my solution: Open the file in opencv_contrib/modules/tracking/src/tracker.cpp and apply the following changes:

    -  if( isInit )
    +  /*if( isInit )
       {
         return false;
       }
    +  */
    

    I recompiled opencv3 and reinstalled it. That fixed it for me. I think they did not want people to reinitialize the tracker for some reason. I am not sure why?

提交回复
热议问题