Quick-and-dirty "panaromic" image stitcher. More...
#include <Robots/LoBot/io/LoCompositor.H>
Public Types | |
typedef Streams::const_reference | const_reference |
STL compatibility. | |
Public Member Functions | |
void | push_back (VideoStream *) |
void | update () |
Dims | getImageSize () const |
This method returns the output image's size. |
Quick-and-dirty "panaromic" image stitcher.
From Wikipedia:
"Digital compositing is the process of digitally assembling multiple images to make a final image, typically for print, motion pictures or screen display. It is the evolution into the digital realm of optical film compositing."
This class does not actually do any image compositing. No fancy alpha blending or any other such stuff. But technically, it does assemble multiple images into a final image and in that sense can be considered a kind of compositor (albeit a laughably crude one).
Given a number of different video streams, lobot::Compositor reads the current frame from each and then simply stitches the images together to create a kind of panaromic image. Of course, it doesn't actually try to find correspondences between image boundaries and properly stitch the images to create the final result. Rather, it simply creates a big image and copies each of the source images into this final image.
The motivation for this class is as follows: Robolocust is equipped with three FireWire cameras pointed straight ahead and to the left and right. We want to take the images from these cameras and create a single frame from them. Thus this simple-minded "compositor."
Definition at line 103 of file LoCompositor.H.
typedef Streams::const_reference lobot::Compositor< pixel_type >::const_reference |
STL compatibility.
Definition at line 133 of file LoCompositor.H.
Dims lobot::Compositor< pixel_type >::getImageSize | ( | ) | const [inline, virtual] |
This method returns the output image's size.
Reimplemented from lobot::ImageSource< pixel_type >.
Definition at line 141 of file LoCompositor.H.
void lobot::Compositor< pixel_type >::push_back | ( | VideoStream * | V | ) | [inline] |
This method adds a video stream to the compositor's list of input sources.
Definition at line 163 of file LoCompositor.H.
References lobot::VideoStream::frameSize(), Dims::h(), max(), and Dims::w().
void lobot::Compositor< T >::update | ( | ) | [inline, virtual] |
This is the compositor's output routine. When invoked, it reads frames from all its current sources and stitches them together to create the final output image.
Implements lobot::ImageSource< pixel_type >.
Definition at line 209 of file LoCompositor.H.
References NO_INIT.
Referenced by lobot::App::run().