tsdconseil / opencv-demonstrator

OpenCV demonstrator (GUI)
http://www.tsdconseil.fr/log/opencv/demo/index-en.html
GNU Lesser General Public License v3.0
141 stars 57 forks source link

Enhance the way video and webcam stream are managed (separate thread) #33

Closed juliena82 closed 8 years ago

juliena82 commented 8 years ago

Currently, when a video or webcam stream is selected, a frame is processed, then some time is waited for, and then the next frame is processed. This is because it is the same thread that process the frames and manage the MMI, so it cannot take 100 % of one core, otherwise the MMI would be blocked.

However the direct consequence is that video processing is unnecessarily saccaded and slow. So the idea is to separate video reading and processing in another thread, independant from the MMI.

Also it would enable, in the case of single image processing, to display a progress bar when the process is long (e.g. panorama computing, cascade classifier, ...).

juliena82 commented 8 years ago

Done in commit 22ca6dd5ec4b205897b9bd4863854afb9ea5b365