- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is a good way to modify Michael Voss' Feature Detection flow graph example when the source filter providing input images is blocking waiting for another image? This is a required modification if one wants to implement this graph for a real-time input source like a video camera. I know that if the source filter function body is blocking waiting to pull an image from an input device, then one of the tbb threads will be wasted because it is idle.
I appreciate any guidance.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm also interested in learning how to deal with blocking inputs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Couldn't you just let the Body return false to indicate that there are no more inputs, and then activate() the source_node as soon as new inputs are available again?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is async_node that is released in the TBB 4.3 Update 6 as a preview feature. The goal of this node is exactly fit for your needs. Here is the link to documentation:
You can create your own thread that will retrieve images from some source and using async_node::async_gateway push this messages to the graph. The advantage of such approach is that image retrieval will be done outside of TBB threads. This allows to execute other TBB tasks while your threads will wait for next image.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page