latest version v1.9 - last update 10 Apr 2010 |
Interface to all Leutron framegrabbers in the system. More...
#include <ltiLeutronFrameGrabber.h>
Classes | |
class | parameters |
the parameters for the class leutronFrameGrabber More... | |
Public Types | |
enum | eOptocouplerType |
Public Member Functions | |
leutronFrameGrabber () | |
leutronFrameGrabber (const parameters &par) | |
leutronFrameGrabber (const leutronFrameGrabber &other) | |
virtual | ~leutronFrameGrabber () |
virtual const char * | getTypeName () const |
virtual bool | apply (channel8 &srcdest) |
virtual bool | apply (image &srcdest) |
virtual bool | apply (channel8 &band1, channel8 &band2, channel8 &band3) |
bool | setOptocoupler (eOptocouplerType theOpto) |
bool | setOptocoupler (const std::vector< eOptocouplerType > &theOptos) |
leutronFrameGrabber & | copy (const leutronFrameGrabber &other) |
leutronFrameGrabber & | operator= (const leutronFrameGrabber &other) |
virtual functor * | clone () const |
const leutronFrameGrabber::parameters & | getParameters () const |
bool | setParameters (const leutronFrameGrabber::parameters &theParams) |
virtual bool | init () |
virtual bool | setCamera (int cameraIndex) |
virtual bool | setTarget (int targetIndex) |
virtual int | getNumberOfConnectedCameras () |
Protected Member Functions | |
leutronFrameGrabber::parameters & | getWritableParameters () |
virtual bool | checkParameters (const leutronFrameGrabber::parameters &theParams) |
virtual bool | startAquisition () const |
virtual bool | stopAquisition () const |
virtual bool | detectCameras () |
virtual bool | activateCameras () |
virtual bool | setDsyErrorInStatusString (STATUS &status, const char *error) |
virtual bool | initRoi (LvROI &roi) |
Interface to all Leutron framegrabbers in the system.
If more than one framegrabber is installed, they will be considered all. If framegrabber specific settings like monochrome VS. color or the number targets on the boards vary, the minimal common set is supported. In particular if a monochrome framegrabber is installed together with color framegrabbers all images acquired will be monochrome.
This implementation is rather slow because the camera is frozen while grabbing and woke up afterwards, which takes about 15 ms. For a faster access use the leutronMultiPlexFrameGrabber, which is not public yet.
For some strange reason the hardware path via the high performance scaler (HPS) is faster than via the binary ratio scaler (BRS).
This class is not thread safe. If used as a singleton, thread safety should be added. It also should be tested that all initialization, camera connection and camera activation methods are only called once.
CAVEATS: 1) This class is only tested with a PicPortColor framegrabber.
BUGS: 1) If two targets are enabled only the BRS path produces a useful image.
the optocouplers that can be set
lti::leutronFrameGrabber::leutronFrameGrabber | ( | ) |
default constructor
lti::leutronFrameGrabber::leutronFrameGrabber | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
par | the parameters to be used |
lti::leutronFrameGrabber::leutronFrameGrabber | ( | const leutronFrameGrabber & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::leutronFrameGrabber::~leutronFrameGrabber | ( | ) | [virtual] |
destructor
virtual bool lti::leutronFrameGrabber::activateCameras | ( | ) | [protected, virtual] |
Activate the current camera.
virtual bool lti::leutronFrameGrabber::apply | ( | channel8 & | band1, | |
channel8 & | band2, | |||
channel8 & | band3 | |||
) | [virtual] |
Grabs an image split in 3 separate channels.
This useful if the application distinguishes between chromacity (Y) and color information (U,V).
band1 | where the grabbed Y band will be left | |
band2 | where the grabbed Y band will be left | |
band3 | where the grabbed Y band will be left |
virtual bool lti::leutronFrameGrabber::apply | ( | image & | srcdest | ) | [virtual] |
Grabs an image from the current camera.
operates on the given parameter.
srcdest | where the grabbed image will be left |
Implements lti::frameGrabber.
virtual bool lti::leutronFrameGrabber::apply | ( | channel8 & | srcdest | ) | [virtual] |
Grabs a grey image.
operates on the given parameter.
srcdest | where the grabbed channel8 will be left |
Implements lti::frameGrabber.
virtual bool lti::leutronFrameGrabber::checkParameters | ( | const leutronFrameGrabber::parameters & | theParams | ) | [protected, virtual] |
check parameters
theParams | the parameters to be checked |
virtual functor* lti::leutronFrameGrabber::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
leutronFrameGrabber& lti::leutronFrameGrabber::copy | ( | const leutronFrameGrabber & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::frameGrabber.
virtual bool lti::leutronFrameGrabber::detectCameras | ( | ) | [protected, virtual] |
Detect and connect all cameras.
virtual int lti::leutronFrameGrabber::getNumberOfConnectedCameras | ( | ) | [virtual] |
Get the number of connected cameras.
const leutronFrameGrabber::parameters& lti::leutronFrameGrabber::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::frameGrabber.
virtual const char* lti::leutronFrameGrabber::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("leutronFrameGrabber")
Reimplemented from lti::frameGrabber.
leutronFrameGrabber::parameters& lti::leutronFrameGrabber::getWritableParameters | ( | ) | [protected] |
returns used parameters
virtual bool lti::leutronFrameGrabber::init | ( | ) | [virtual] |
Initializes and opens the framegrabber.
It is not necessary to call this method.
Implements lti::frameGrabber.
virtual bool lti::leutronFrameGrabber::initRoi | ( | LvROI & | roi | ) | [protected, virtual] |
leutronFrameGrabber& lti::leutronFrameGrabber::operator= | ( | const leutronFrameGrabber & | other | ) |
virtual bool lti::leutronFrameGrabber::setCamera | ( | int | cameraIndex | ) | [virtual] |
virtual bool lti::leutronFrameGrabber::setDsyErrorInStatusString | ( | STATUS & | status, | |
const char * | error | |||
) | [protected, virtual] |
bool lti::leutronFrameGrabber::setOptocoupler | ( | const std::vector< eOptocouplerType > & | theOptos | ) |
Sets or deactivates the optocouplers of the grabber that has been accessed last.
ToDo: think of method where you can tell the grabber on which the optocouplers shall be set.
theOptos | the optocouplers to be set |
bool lti::leutronFrameGrabber::setOptocoupler | ( | eOptocouplerType | theOpto | ) |
Sets one optocoupler or deactivates all optocouplers of the grabber that has been accessed last.
ToDo: think of method where you can tell the grabber on which the optocoupler shall be set.
theOpto | the optocoupler to be set |
bool lti::leutronFrameGrabber::setParameters | ( | const leutronFrameGrabber::parameters & | theParams | ) |
Set the paramters.
Adjusts non supported values internally.
theParams | the parameters to be set |
virtual bool lti::leutronFrameGrabber::setTarget | ( | int | targetIndex | ) | [virtual] |
Switches the target, from which is grabbed.
If the target buffer is not already connected to the camera(s) this is time consuming. This method affects the parameters targetIndex and target[].
targetIndex | the index of the target will be grabbed |
virtual bool lti::leutronFrameGrabber::startAquisition | ( | ) | const [protected, virtual] |
put a camera in live mode and start the acquisition
virtual bool lti::leutronFrameGrabber::stopAquisition | ( | ) | const [protected, virtual] |
put a camera in freeze mode and stop the acquisition