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]
Collaboration diagram for FCam::Frame:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::tr1::shared_ptr
< Frame
Ptr
 A reference counted pointer to a frame.

Public Member Functions

const Shotshot () const
 A const reference to the shot that generated this frame.
template<typename T>
const T::Tags * tags (T *device) const
 Get the tags a specified device has placed on this frame.

Public Attributes

Image image
 The actual image data.
Time exposureStartTime
 The time the earliest pixel in the image started exposing.
Time exposureEndTime
 The time the latest pixel in the rolling shutter finished exposing.
Time processingDoneTime
 The time the image appeared out of the imaging pipe.
Sensorsensor
 The sensor that produced this frame.
int exposure
 The actual exposure time for this frame in microseconds.
int frameTime
 The actual number of microseconds between the start of this frame and the start of the next one.
float gain
 The actual gain used to produce this frame.
Histogram histogram
 A histogram produced by the imaging pipe.
SharpnessMap sharpness
 A sharpness map produced by the imaging pipe.


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. Frames are passed around using reference counted pointers to them: Frame::Ptr

Definition at line 29 of file Frame.h.


Member Typedef Documentation

typedef std::tr1::shared_ptr<Frame> FCam::Frame::Ptr

A reference counted pointer to a frame.

Use it instead of a regular pointer. This way you won't have to worry about deleting frames. For example:
Frame::Ptr f = sensor.getFrame();

Reimplemented in FCam::F2::Frame.

Definition at line 36 of file Frame.h.


Member Function Documentation

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.

Definition at line 93 of file Frame.h.

template<typename T>
const T::Tags* FCam::Frame::tags ( T *  device  )  const [inline]

Get the tags a specified device has placed on this frame.

If you call getTags with a device pointer of type T*, the result is automagically cast to the appropriate tag type (T::Tags *). Returns NULL if that device did not tag this frame.

Definition at line 103 of file Frame.h.


Member Data Documentation

The actual image data.

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

Definition at line 40 of file Frame.h.

The time the earliest pixel in the image started exposing.

Definition at line 43 of file Frame.h.

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

This is exposureStart + exposure + rolling shutter time.

Definition at line 47 of file Frame.h.

The time the image appeared out of the imaging pipe.

Definition at line 50 of file Frame.h.

The sensor that produced this frame.

Definition at line 53 of file Frame.h.

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 58 of file Frame.h.

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 66 of file Frame.h.

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 72 of file Frame.h.

A histogram produced by the imaging pipe.

Check histogram.valid before using it.

Definition at line 77 of file Frame.h.

A sharpness map produced by the imaging pipe.

Check sharpness.valid before using it.

Definition at line 81 of file Frame.h.


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

Generated on Mon Jan 18 20:48:13 2010 for FCam by  doxygen 1.5.6