OpenCV: process every frame

前端 未结 2 1873
野的像风
野的像风 2020-11-29 11:04

I want to write a cross-platform application using OpenCV for video capture. In all the examples, i\'ve found frames from the camera are processed using the grab function an

2条回答
  •  北海茫月
    2020-11-29 11:25

    Quick thoughts would be to have 2 threads, the first thread is responsible for grabbing the frames and notifiy the second thread when they are available (places them in a processing queue), the second thread does all your processing in an event loop type manner.

    See boost::thread and boost::signals2 as those two together should provide most of the framework (except for the queue) for what I described above.

提交回复
热议问题