next up previous
Next: 5.5.3 Output modules Up: 5.5.2 Image modules Previous: 5.5.2.3.1 Synchronisation

5.5.2.4 InputDual

 
This module is an excellent example of how elegant a modular, object-oriented solution can be. It utilises the FactoryInput class to allow two Input modules to be used, one for the left image and one for the right. It doesn't allow itself to be used recursively as one of the left or right inputs, and thus avoids any problems with having too many inputs. It also ensures that both the left and right inputs have the same dimensions.

The only valid name for this module is dual.

It accepts two optional parameters, -left and -right, where each is followed by the name and parameters of an Input module (exactly the same as for -input). If either -left or -right is omitted, then no Input module is used for that component.

Its getImage() method is particularly elegant. It simply calls getImage() on its left and right component Input modules (assuming they were specified), and then combines these resultant images. If the left input returns a StereoImage with left and right components, only the left image is used, similarly, if the right input returns a StereoImage with left and right components, only the right image is used. Failing this, it simply uses whichever image is present from the inputs.

This module is very useful for combining different sources of images, for example, from a file and from the camera. It is anticipated that this module will be used to great effect to combine the inputs from remote machines, transmitted across the network with another (network-based) Input module.


next up previous
Next: 5.5.3 Output modules Up: 5.5.2 Image modules Previous: 5.5.2.3.1 Synchronisation
Kevin Pulo
2000-08-22