FCam::F2::Sensor Class Reference

F2::Sensor manages the Aptina MT9P031 image sensor on the F2 Frankencamera. More...

#include <Sensor.h>

Inheritance diagram for FCam::F2::Sensor:

Inheritance graph
[legend]
Collaboration diagram for FCam::F2::Sensor:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void capture (const FCam::Shot &)
 Queue up the next shot.
void capture (const Shot &)
 Overloaded capture for a F2::Shot.
void capture (const std::vector< FCam::Shot > &)
 Queue up a burst of shots.
void capture (const std::vector< Shot > &)
 Overloaded capture for a burst of F2::Shot.
void stream (const FCam::Shot &)
 Set a shot to be captured when the sensor isn't busy capturing anything else.
void stream (const Shot &)
 Overloaded stream for a F2::Shot.
void stream (const std::vector< FCam::Shot > &)
 Set a burst to be captured whenever the sensor isn't busy capturing anything else.
void stream (const std::vector< Shot > &)
 Overloaded stream for a burst of F2::Shot.
bool streaming ()
 Is there a shot or burst currently streaming?
void stopStreaming ()
 Stop the sensor from streaming a shot or burst set with stream.
Size minImageSize () const
 minimum image 640x480
Size maxImageSize () const
 maximum image without black calibration areas is 2592x1944
int getRollingShutterTime (const Shot &) const
 Overloaded version for F2::Shot.
int getRollingShutterTime (const FCam::Shot &) const
 The time difference between the first line exposing and the last line in microseconds, for given shot parameters.
int framesPending () const
 How many frames are in the frame queue (i.e., how many times can you call getFrame before it blocks?
int shotsPending () const
 How many shots are pending.
BayerPattern getBayerPattern () const
 Get the bayer pattern of this sensor when in raw mode.
const float * getXYZToRawColorMatrixTungsten () const
 The 3x3 color matrix mapping under Tungsten lighting.
const float * getXYZToRawColorMatrixDaylight () const
 The 3x3 color matrix mapping under daylight.
const std::string & getManufacturer ()
 The camera's manufacturer.
const std::string & getModel ()
 The camera's model.
FCam::Frame::Ptr getFrame ()
 Get the next frame.
Frame::Ptr getF2Frame ()
 Retrieve a F2::Frame from the F2::Sensor.

Static Public Member Functions

static Size pixelArraySize ()
 all pixels on the array, including black pixels: 2752x2004
static Rect activeArrayRect ()
 The rect describing the active (imaging) pixel array, in the coordinate system used by F2::Shot::roiStartX/Y.
static Rect pixelArrayRect ()
 The rect describing the entire pixel array, including black pixels, in the coordinate system used by F2::Shot::roiStartX/Y.


Detailed Description

F2::Sensor manages the Aptina MT9P031 image sensor on the F2 Frankencamera.

Using F2-specific F2::Shot and F2::Frame classes with F2::Sensor exposes the additional functionality of the Aptina sensor relative to the FCam base requirements. This includes the ability to control the sensor region-of-interest on a per-frame basis.

Definition at line 28 of file Sensor.h.


Member Function Documentation

void FCam::F2::Sensor::capture ( const FCam::Shot  )  [virtual]

Queue up the next shot.

Makes a deep copy of the argument.

Implements FCam::Sensor.

Definition at line 21 of file Sensor.cpp.

void FCam::F2::Sensor::capture ( const std::vector< FCam::Shot > &   )  [virtual]

Queue up a burst of shots.

Makes a deep copy of the argument.

Implements FCam::Sensor.

Definition at line 46 of file Sensor.cpp.

void FCam::F2::Sensor::stream ( const FCam::Shot s  )  [virtual]

Set a shot to be captured when the sensor isn't busy capturing anything else.

Makes a deep copy of the argument.

Implements FCam::Sensor.

Definition at line 78 of file Sensor.cpp.

void FCam::F2::Sensor::stream ( const std::vector< FCam::Shot > &   )  [virtual]

Set a burst to be captured whenever the sensor isn't busy capturing anything else.

Makes a deep copy of the argument.

Implements FCam::Sensor.

Definition at line 94 of file Sensor.cpp.

void FCam::F2::Sensor::stopStreaming (  )  [virtual]

Stop the sensor from streaming a shot or burst set with stream.

The sensor will continue to run.

Implements FCam::Sensor.

Definition at line 123 of file Sensor.cpp.

int FCam::F2::Sensor::getRollingShutterTime ( const Shot s  )  const

Overloaded version for F2::Shot.

Definition at line 171 of file Sensor.cpp.

int FCam::F2::Sensor::getRollingShutterTime ( const FCam::Shot  )  const [virtual]

The time difference between the first line exposing and the last line in microseconds, for given shot parameters.

Implements FCam::Sensor.

Definition at line 177 of file Sensor.cpp.

int FCam::F2::Sensor::shotsPending (  )  const [virtual]

How many shots are pending.

This includes frames in the frame queue, shots currently in the pipeline, and shots in the capture queue. Stop streaming (stopStreaming) and get frames (getFrame) until this hits zero to completely drain the system.

Implements FCam::Sensor.

Definition at line 198 of file Sensor.cpp.

BayerPattern FCam::F2::Sensor::getBayerPattern (  )  const [inline, virtual]

Get the bayer pattern of this sensor when in raw mode.

Implements FCam::Sensor.

Definition at line 75 of file Sensor.h.

const float* FCam::F2::Sensor::getXYZToRawColorMatrixTungsten (  )  const [inline, virtual]

The 3x3 color matrix mapping under Tungsten lighting.

It maps from XYZ to this sensor's raw color space under standard illuminant A (just under 3000K). Given in row-major order.

Implements FCam::Sensor.

Definition at line 77 of file Sensor.h.

const float* FCam::F2::Sensor::getXYZToRawColorMatrixDaylight (  )  const [inline, virtual]

The 3x3 color matrix mapping under daylight.

It maps from XYZ to this sensor's raw color space under standard illuminant D65 (6500K). Given in row-major order.

Implements FCam::Sensor.

Definition at line 80 of file Sensor.h.

const std::string& FCam::F2::Sensor::getManufacturer (  )  [inline, virtual]

The camera's manufacturer.

(e.g. Canon).

Implements FCam::Sensor.

Definition at line 84 of file Sensor.h.

const std::string& FCam::F2::Sensor::getModel (  )  [inline, virtual]

The camera's model.

Should also include manufacturer (e.g. Canon 400D).

Implements FCam::Sensor.

Definition at line 85 of file Sensor.h.

FCam::Frame::Ptr FCam::F2::Sensor::getFrame (  )  [virtual]

Get the next frame.

We promise that precisely one frame will come back per time capture is called. A reference-counted shared pointer object is returned, so you don't need to worry about deleting it.

Implements FCam::Sensor.

Definition at line 129 of file Sensor.cpp.

Frame::Ptr FCam::F2::Sensor::getF2Frame (  ) 

Retrieve a F2::Frame from the F2::Sensor.

Due to the limitations of C++, getF2Frame has to be used to retrieve a F2::Frame instead of getFrame. Otherwise, it acts identically to getFrame.

Definition at line 140 of file Sensor.cpp.


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

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