Public Member Functions

FCam::Frame Class Reference

Data returned by the sensor as a result of a shot. More...

#include <Frame.h>

Inheritance diagram for FCam::Frame:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Frame (_Frame *f=NULL)
 Frames are normally acquired by sensor::getFrame().
virtual ~Frame ()
 Virtual destructor to allow derived frames to delete themselves properly when accessed as base frames.
bool valid () const
 Does this Frame refer to a valid frame?
bool operator== (const Frame &other) const
 Equality operator, to see if two frames point to the same underlying data.
Image image () const
 The actual image data.
Time exposureStartTime () const
 The time the earliest pixel in the image started exposing.
Time exposureEndTime () const
 The time the latest pixel in the rolling shutter finished exposing.
Time processingDoneTime () const
 The time the image appeared out of the imaging pipe.
int exposure () const
 The actual exposure time for this frame in microseconds.
int frameTime () const
 The actual number of microseconds between the start of this frame and the start of the next one.
float gain () const
 The actual gain used to produce this frame.
int whiteBalance () const
 The actual white balance setting used to produce this frame.
const Histogramhistogram () const
 A histogram produced by the imaging pipe.
const SharpnessMapsharpness () const
 A sharpness map produced by the imaging pipe.
const Shotshot () const
 A const reference to the shot that generated this frame.
const TagMaptags () const
 A const reference to the tags that have been placed on this frame by any devices.
TagValueoperator[] (const std::string &name) const
 Retrieve a reference to a tag placed on this frame by name.
virtual const Platformplatform () const
 Access to the static platform data about the sensor that produced this frame.
 operator EventGenerator * ()
 Treat a frame as an EventGenerator pointer.
void debug (const char *name="") const
 A Frame debugging dump function.
 Frame (_Frame *f=NULL)
 Frames are normally acquired by sensor::getFrame().
virtual ~Frame ()
 Virtual destructor to allow derived frames to delete themselves properly when accessed as base frames.
bool valid () const
 Does this Frame refer to a valid frame?
bool operator== (const Frame &other) const
 Equality operator, to see if two frames point to the same underlying data.
Image image () const
 The actual image data.
Time exposureStartTime () const
 The time the earliest pixel in the image started exposing.
Time exposureEndTime () const
 The time the latest pixel in the rolling shutter finished exposing.
Time processingDoneTime () const
 The time the image appeared out of the imaging pipe.
int exposure () const
 The actual exposure time for this frame in microseconds.
int frameTime () const
 The actual number of microseconds between the start of this frame and the start of the next one.
float gain () const
 The actual gain used to produce this frame.
int whiteBalance () const
 The actual white balance setting used to produce this frame.
const Histogramhistogram () const
 A histogram produced by the imaging pipe.
const SharpnessMapsharpness () const
 A sharpness map produced by the imaging pipe.
const Shotshot () const
 A const reference to the shot that generated this frame.
const TagMaptags () const
 A const reference to the tags that have been placed on this frame by any devices.
TagValueoperator[] (const std::string &name) const
 Retrieve a reference to a tag placed on this frame by name.
virtual const Platformplatform () const
 Access to the static platform data about the sensor that produced this frame.
 operator EventGenerator * ()
 Treat a frame as an EventGenerator pointer.
void debug (const char *name="") const
 A Frame debugging dump function.

Detailed Description

Data returned by the sensor as a result of a shot.

May contain image data, a histogram, sharpness map, and assorted tags placed there by devices attached to the sensor from whence this frame came. It may also contain none of these, so check each component is valid before using it. This class is a reference counted pointer type to the real data, so pass it by copy.

Definition at line 68 of file Frame.h.


Constructor & Destructor Documentation

FCam::Frame::Frame ( _Frame f = NULL  )  [inline]

Frames are normally acquired by sensor::getFrame().

The Frame constructor can be used to construct dummy frames for testing purposes. The Frame takes ownership of the _Frame passed in.

Definition at line 78 of file Frame.h.

FCam::Frame::Frame ( _Frame f = NULL  )  [inline]

Frames are normally acquired by sensor::getFrame().

The Frame constructor can be used to construct dummy frames for testing purposes. The Frame takes ownership of the _Frame passed in.

Definition at line 78 of file Frame.h.


Member Function Documentation

Image FCam::Frame::image (  )  const [inline]

The actual image data.

Check image().valid() before using it, image data can be dropped in a variety of cases.

Definition at line 92 of file Frame.h.

Time FCam::Frame::exposureStartTime (  )  const [inline]

The time the earliest pixel in the image started exposing.

Definition at line 95 of file Frame.h.

Time FCam::Frame::exposureEndTime (  )  const [inline]

The time the latest pixel in the rolling shutter finished exposing.

This is exposureStart + exposure + rolling shutter time.

Definition at line 99 of file Frame.h.

Time FCam::Frame::processingDoneTime (  )  const [inline]

The time the image appeared out of the imaging pipe.

Definition at line 102 of file Frame.h.

int FCam::Frame::exposure (  )  const [inline]

The actual exposure time for this frame in microseconds.

Note that exposureEndTime - exposureStartTime may be more than this for rolling shutter sensors.

Definition at line 107 of file Frame.h.

int FCam::Frame::frameTime (  )  const [inline]

The actual number of microseconds between the start of this frame and the start of the next one.

Note that exposureEndTime - exposureStartTime may be more than this for rolling shutter sensors. The frame time will be at least the exposure time, typically plus a small overhead of several hundred microseconds.

Definition at line 115 of file Frame.h.

float FCam::Frame::gain (  )  const [inline]

The actual gain used to produce this frame.

This may be a combination of analog and digital gain. Analog gain is preferred, and low gain settings should use only analog gain.

Definition at line 121 of file Frame.h.

int FCam::Frame::whiteBalance (  )  const [inline]

The actual white balance setting used to produce this frame.

Definition at line 125 of file Frame.h.

const Histogram& FCam::Frame::histogram (  )  const [inline]

A histogram produced by the imaging pipe.

Check histogram.valid before using it.

Definition at line 130 of file Frame.h.

const SharpnessMap& FCam::Frame::sharpness (  )  const [inline]

A sharpness map produced by the imaging pipe.

Check sharpness.valid before using it.

Definition at line 135 of file Frame.h.

const Shot& FCam::Frame::shot (  )  const [inline]

A const reference to the shot that generated this frame.

If you have a fancy sensor that takes more parameters, and a corresponding fancy shot that inherits from the base shot, this method should be overridden to return a const reference to your derived shot type instead. It is not a virtual method, so if your fancy frame is cast to a base frame, this method will return a base shot.

Reimplemented in FCam::F2::Frame, and FCam::F2::Frame.

Definition at line 145 of file Frame.h.

const TagMap& FCam::Frame::tags (  )  const [inline]

A const reference to the tags that have been placed on this frame by any devices.

In general you use frame["tagName"] to get and set tags, rather than directory accessing this map. If you wish to iterate over tags, however, you can use this TagMap, which is an std::unordered_map

Definition at line 155 of file Frame.h.

TagValue& FCam::Frame::operator[] ( const std::string &  name  )  const [inline]

Retrieve a reference to a tag placed on this frame by name.

This can be used to lookup tags like so: double x = frame["focus"]; Or to attach new tags that will survive being saved to a file and loaded again like so: frame["mySpecialTag"] = 42;

Definition at line 166 of file Frame.h.

virtual const Platform& FCam::Frame::platform (  )  const [inline, virtual]

Access to the static platform data about the sensor that produced this frame.

Definition at line 172 of file Frame.h.

FCam::Frame::operator EventGenerator * (  )  [inline]

Treat a frame as an EventGenerator pointer.

This allows us to associate events (such as failing to load a DNG) with a frame and look for them later in the event queue using getNextEvent().

Definition at line 180 of file Frame.h.

void FCam::Frame::debug ( const char *  name = ""  )  const [inline]

A Frame debugging dump function.

Prints out all Frame fields and details of the included Image

Definition at line 186 of file Frame.h.

Image FCam::Frame::image (  )  const [inline]

The actual image data.

Check image().valid() before using it, image data can be dropped in a variety of cases.

Definition at line 92 of file Frame.h.

Time FCam::Frame::exposureStartTime (  )  const [inline]

The time the earliest pixel in the image started exposing.

Definition at line 95 of file Frame.h.

Time FCam::Frame::exposureEndTime (  )  const [inline]

The time the latest pixel in the rolling shutter finished exposing.

This is exposureStart + exposure + rolling shutter time.

Definition at line 99 of file Frame.h.

Time FCam::Frame::processingDoneTime (  )  const [inline]

The time the image appeared out of the imaging pipe.

Definition at line 102 of file Frame.h.

int FCam::Frame::exposure (  )  const [inline]

The actual exposure time for this frame in microseconds.

Note that exposureEndTime - exposureStartTime may be more than this for rolling shutter sensors.

Definition at line 107 of file Frame.h.

int FCam::Frame::frameTime (  )  const [inline]

The actual number of microseconds between the start of this frame and the start of the next one.

Note that exposureEndTime - exposureStartTime may be more than this for rolling shutter sensors. The frame time will be at least the exposure time, typically plus a small overhead of several hundred microseconds.

Definition at line 115 of file Frame.h.

float FCam::Frame::gain (  )  const [inline]

The actual gain used to produce this frame.

This may be a combination of analog and digital gain. Analog gain is preferred, and low gain settings should use only analog gain.

Definition at line 121 of file Frame.h.

int FCam::Frame::whiteBalance (  )  const [inline]

The actual white balance setting used to produce this frame.

Definition at line 125 of file Frame.h.

const Histogram& FCam::Frame::histogram (  )  const [inline]

A histogram produced by the imaging pipe.

Check histogram.valid before using it.

Definition at line 130 of file Frame.h.

const SharpnessMap& FCam::Frame::sharpness (  )  const [inline]

A sharpness map produced by the imaging pipe.

Check sharpness.valid before using it.

Definition at line 135 of file Frame.h.

const Shot& FCam::Frame::shot (  )  const [inline]

A const reference to the shot that generated this frame.

If you have a fancy sensor that takes more parameters, and a corresponding fancy shot that inherits from the base shot, this method should be overridden to return a const reference to your derived shot type instead. It is not a virtual method, so if your fancy frame is cast to a base frame, this method will return a base shot.

Reimplemented in FCam::F2::Frame, and FCam::F2::Frame.

Definition at line 145 of file Frame.h.

const TagMap& FCam::Frame::tags (  )  const [inline]

A const reference to the tags that have been placed on this frame by any devices.

In general you use frame["tagName"] to get and set tags, rather than directory accessing this map. If you wish to iterate over tags, however, you can use this TagMap, which is an std::unordered_map

Definition at line 155 of file Frame.h.

TagValue& FCam::Frame::operator[] ( const std::string &  name  )  const [inline]

Retrieve a reference to a tag placed on this frame by name.

This can be used to lookup tags like so: double x = frame["focus"]; Or to attach new tags that will survive being saved to a file and loaded again like so: frame["mySpecialTag"] = 42;

Definition at line 166 of file Frame.h.

virtual const Platform& FCam::Frame::platform (  )  const [inline, virtual]

Access to the static platform data about the sensor that produced this frame.

Definition at line 172 of file Frame.h.

FCam::Frame::operator EventGenerator * (  )  [inline]

Treat a frame as an EventGenerator pointer.

This allows us to associate events (such as failing to load a DNG) with a frame and look for them later in the event queue using getNextEvent().

Definition at line 180 of file Frame.h.

void FCam::Frame::debug ( const char *  name = ""  )  const [inline]

A Frame debugging dump function.

Prints out all Frame fields and details of the included Image

Definition at line 186 of file Frame.h.


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