MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

FCam::Shot Class Reference

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

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 Shot operator= (const Shot &other)
  Copying a shot results in a very deep copy.
void  setColorMatrix (const int *)
  Set a custom color matrix to use to post-process this shot.
const std::vector< int > &  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.

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.


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.


Member Function Documentation

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]

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

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.

void FCam::Shot::setColorMatrix ( const int *   ) 

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<int>& FCam::Shot::colorMatrix (  )  const [inline]

If a custom color matrix has been set for this shot, this returns it.

Otherwise this will return an empty vector.

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.


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

Requested exposure time in microseconds.

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 (its default value) if you just want the shot to happen as quickly as possible.

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.

Requested white-balance setting in Kelvin.

Not applicable if the output format is raw.

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.

A unique ID, generated on construction.

Feel free to replace it with your own identifier.


Copyright (c) 2012, Nokia Corporation and/or its subsidiary(-ies). All rights reserved. See Copyright.
MeeGo 1.2 Harmattan API