Boost logo

Boost :

From: Paolo Coletta (paolo_at_[hidden])
Date: 2007-02-21 09:08:34


> Is there any interest in a library which facilitates the
> implementation and interconnection of objects using Boost.Signals?
        
Yes, much interest.
        
> For example, in a video processing scenario, one might be using the
> following objects:
>
> * frame_rate - generates a void() signal at a consistent frame rate
> * video_generator - upon receiving a void() signal, produces a signal
> containing an image (e.g., a frame grabbed from a camera or read from
> a file)
> * differencer - upon receiving an image signal, outputs the
> pixel-difference between the image and the previous image received
> * flipper - upon receiving an image signal, outputs the horizontally
> flipped image
> * analysis - upon receiving an image signal, performs some sort of
> analysis and outputs a feature vector signal
> * database - upon receiving a feature vector signal, outputs an image
> from the database based on some relationship
> * display1, display2 - upon receiving an image, displays it in a window
>
> It would be nice to be able to easily connect these objects via
> intuitive signal flow "diagrams":
>
> // perform the whole video analysis and display the results
> frame_rate >>= video_generator >>= differencer >>= flipper >>=
> analysis >>= database >>= display1;
>
> // also display the video input
> video_generator >>= display2;
>
> ... or, to specify the entire signal flow in one shot using something like this:
> frame_rate
>>>= video_generator
> >= (differencer >>= flipper >>= analysis >>= database >>= display1)
> >= display2;
>
        
I didn't look at the library yet, however, in a similar context I had the
requirement to perform some operations in parallel. Thus, I wonder if this
could be supported by the syntax, e.g.,
   
video_generator >>= ( effect1 && effect2 ) >>= image_sum >>= display
     
where effect1 and effect2 are executed in parallel (for example, by
different threads of a thread_group); image_sum (which expects two
arguments) is executed only when both effect1 and effect2 are completed.
       
Regards,
     Paolo
        
        
        


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk