How to play and detect an object using captured video in background subtractor model?

后端 未结 1 1365
予麋鹿
予麋鹿 2021-01-24 20:40

everyone.! I am using opencv2.4.2. actually I am doing project on object detection. I tried using BackgroundSubtractorMOG model. But I am not able to load video file

1条回答
  •  囚心锁ツ
    2021-01-24 21:05

    The video loading in opencv works for me. To load a video you can try something like this. Once you have captured frame you either do processing in the loop or can call a separate function.

    std::cout<<"Video File "<

    or You can do something

    int main(int argc, char*argv[])
    {
    
        char *my_file = "C:\\vid_an2\\desp_me.avi";
        std::cout<<"Video File "<> cap_img;
             imshow("My_Win", cap_img);
              waitKey(0);
        }
       return 0;
     }
    

    0 讨论(0)
提交回复
热议问题