-
Notifications
You must be signed in to change notification settings - Fork 86
bug fix: avoid OpenCV display calls on multiple threads, merge debug video windows #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: Can we add similar pic-in-pic for the segmentation mask too?
I'm sure we could - top right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have a look to have consistent space after comma for arguments and similar style issues.
Functionality itself looks mostly good already, except for some performance/locking issues that keep the lock for too long and thus may degrade performance.
…lock period, removed capitalisation in help text
If you don't mind, I'll do that in a separate PR, which covers the wider codebase? |
Sure, not complains with splitting this into a separate PR. |
…as it prevents correct thread termination
Over in #124 (comment), referring to Line 28 in 44f94f3
The intended behaviour was to terminate the |
If that's the case, we're probably better of (even if this takes some extra checks) to use a Cf. https://en.cppreference.com/w/cpp/memory/weak_ptr/lock for an usage example. Additionally all threads should be joined. In combination with releasing the central |
OK, this is done - minor change so checked in without a PR (also I forgot which repo was upstream of my local work area!) |
These changes ensure OpenCV debug display calls (
cv::imshow()
) are on the main thread only, in an attempt to fix crashes experienced by others when using animated backgrounds. We also merge the separate background debug window into the main debug window (as picture-in-picture) and add keyboard controls to turn this on/off, along with FPS display, so users can grab the debug window as a clean image if required.