Public Member Functions | Public Attributes

FCam::Shot Class Reference

Shot collects parameters for capturing a frame. More...

#include <Shot.h>

Inheritance diagram for FCam::Shot:
Inheritance graph
[legend]
Collaboration diagram for FCam::Shot:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void addAction (const Action &)
 Add an action to be performed during the shot.
void clearActions ()
 Clear the set of actions to be performed during the shot.
const std::set< Action * > & actions () const
 Acquire a const reference to the set of actions to be performed during the short.
 Shot (const Shot &other)
 Copying a shot results in a very deep copy.
const Shotoperator= (const Shot &other)
 Copying a shot results in a very deep copy.

Public Attributes

Image image
 Target image.
int exposure
 Requested exposure time in microseconds.
int frameTime
 Requested amount of time the frame should take in microseconds.
float gain
 Gain for the shot.
int whiteBalance
 Requested white-balance setting in Kelvin.
HistogramConfig histogram
 The desired histogram generator configuration.
SharpnessMapConfig sharpness
 The desired sharpness map generator configuration.
bool wanted
 Whether or not this shot should result in a frame.
int id
 A unique ID, generated on construction.

Detailed Description

Shot collects parameters for capturing a frame.

It may also contain actions that are taken during a shot. A returned Frame contains its requesting shot, whose ID will match with the shot passed in to a Sensor::capture() or Sensor::stream() call. Note that making a copy of a Shot, either by assignment or a copy constructor assigns a new ID to the copy. This lets you say things like:

Shot a; .. set many fields of a .. Shot b = a; .. only adjust changed fields of b ..

and still be able distinguish Frames created by a and b shots when they are handed over by the sensor.

Definition at line 31 of file Shot.h.


Constructor & Destructor Documentation

FCam::Shot::Shot ( const Shot other  ) 

Copying a shot results in a very deep copy.

This assigns a freshly generated shot id to the result.

Reimplemented in FCam::Dummy::Shot, and FCam::F2::Shot.

Definition at line 41 of file Shot.cpp.


Member Function Documentation

void FCam::Shot::addAction ( const Action action  ) 

Add an action to be performed during the shot.

Definition at line 37 of file Shot.cpp.

void FCam::Shot::clearActions (  ) 

Clear the set of actions to be performed during the shot.

Definition at line 29 of file Shot.cpp.

const std::set<Action *>& FCam::Shot::actions (  )  const [inline]

Acquire a const reference to the set of actions to be performed during the short.

Definition at line 84 of file Shot.h.

const Shot & FCam::Shot::operator= ( const Shot other  ) 

Copying a shot results in a very deep copy.

This assigns a freshly generated shot id to the result.

Reimplemented in FCam::Dummy::Shot, and FCam::F2::Shot.

Definition at line 64 of file Shot.cpp.


Member Data Documentation

Target image.

Set it to an allocated image to have it dump the data into that image. To tell the system to discard the image data, set the image's data pointer to Image::Discard (using the optional last argument in the Image constructor). To tell the system to allocate a new image of the appropriate size for each new frame, set the image's data pointer to Image::AutoAllocate

Definition at line 41 of file Shot.h.

Requested exposure time in microseconds.

Definition at line 44 of file Shot.h.

Requested amount of time the frame should take in microseconds.

You can set this to achieve a desired frame rate. If this is less than the exposure time, then the implementation will attempt to take the minimum amount of time possible for the shot, so you can leave it at zero (it's default value) if you just want the shot to happen as quickly as possible.

Definition at line 53 of file Shot.h.

Gain for the shot.

A value of 1.0 indicates no gain should be applied, and will be the minimum for most sensors. Values more than 1.0 will first use analog gain, and then digital gain once analog gain is exhausted.

Definition at line 59 of file Shot.h.

Requested white-balance setting in Kelvin.

Not applicable if the output format is raw.

Definition at line 63 of file Shot.h.

Whether or not this shot should result in a frame.

The default is true, but if you don't want a frame to come back at all for a given shot, you can set it to false.

Definition at line 74 of file Shot.h.

A unique ID, generated on construction.

Feel free to replace it with your own identifier.

Definition at line 88 of file Shot.h.


The documentation for this class was generated from the following files: