Shot collects parameters for capturing a frame. More...
#include <Shot.h>
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 Shot & | operator= (const Shot &other) |
Copying a shot results in a very deep copy. | |
void | setColorMatrix (const float *) |
Set a custom color matrix to use to post-process this shot. | |
const std::vector< float > & | colorMatrix () const |
If a custom color matrix has been set for this shot, this returns it. | |
void | clearColorMatrix () |
Clear any custom color matrix set for this shot. | |
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 Shot & | operator= (const Shot &other) |
Copying a shot results in a very deep copy. | |
void | setColorMatrix (const float *) |
Set a custom color matrix to use to post-process this shot. | |
const std::vector< float > & | colorMatrix () const |
If a custom color matrix has been set for this shot, this returns it. | |
void | clearColorMatrix () |
Clear any custom color matrix set for this shot. | |
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. |
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.
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, FCam::F2::Shot, FCam::Dummy::Shot, and FCam::F2::Shot.
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, FCam::F2::Shot, FCam::Dummy::Shot, and FCam::F2::Shot.
void FCam::Shot::addAction | ( | const Action & | action | ) |
void FCam::Shot::clearActions | ( | ) |
const std::set<Action *>& FCam::Shot::actions | ( | ) | const [inline] |
Copying a shot results in a very deep copy.
This assigns a freshly generated shot id to the result.
Reimplemented in FCam::Dummy::Shot, FCam::F2::Shot, FCam::Dummy::Shot, and FCam::F2::Shot.
void FCam::Shot::setColorMatrix | ( | const float * | m | ) |
const std::vector<float>& FCam::Shot::colorMatrix | ( | ) | const [inline] |
void FCam::Shot::clearColorMatrix | ( | ) |
void FCam::Shot::addAction | ( | const Action & | ) |
Add an action to be performed during the shot.
void FCam::Shot::clearActions | ( | ) |
Clear the set of actions to be performed during the shot.
const std::set<Action *>& FCam::Shot::actions | ( | ) | const [inline] |
Copying a shot results in a very deep copy.
This assigns a freshly generated shot id to the result.
Reimplemented in FCam::Dummy::Shot, FCam::F2::Shot, FCam::Dummy::Shot, and FCam::F2::Shot.
void FCam::Shot::setColorMatrix | ( | const float * | ) |
Set a custom color matrix to use to post-process this shot.
Expects a 3x4 matrix specified in row-major order. This overrides any white balance set in the whiteBalance field.
const std::vector<float>& FCam::Shot::colorMatrix | ( | ) | const [inline] |
void FCam::Shot::clearColorMatrix | ( | ) |
Clear any custom color matrix set for this shot.
The whiteBalance field will be used instead to determine the color matrix.
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
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.
float FCam::Shot::gain |
bool FCam::Shot::wanted |
int FCam::Shot::id |