Public Member Functions | Static Public Member Functions

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.
void start ()
 Power up the sensor, image processor, and the FCam daemon This is done automatically when you call capture for the first time.
void stop ()
 Shut down the sensor, image processor, and the FCam daemon.
virtual int maxExposure () const
 The maximum exposure time on the N900 is 1080842 us (just over a second) for small resolutions (height <= 960), and 2489140 us for larger resolutions (about 2.5 seconds).
virtual int minExposure () const
 The minimum exposure time on the N900 is 38 us for small resolutions (height <= 960) and 66 us for larger resolutions.
virtual int maxFrameTime () const
 The maximum frame time on the N900 is 1081250 us for small resolutions (just over a second), and 2490072 us for larger resolutions (about 2.5 seconds).
virtual int minFrameTime () const
 The minimum frame time on the N900 is the 33414 us for smaller resolutions (height <= 960), and 77412 us for larger resolutions.
virtual float maxGain () const
 The maximum gain on the N900 is 32, which can be considered ISO 3200.
virtual float minGain () const
 The minimum supported gain is 1, which can be considered ISO 100.
Size minImageSize () const
 minimum image 640x480
Size maxImageSize () const
 maximum image without black calibration areas is 2592x1944
int rollingShutterTime (const Shot &) const
 Overloaded version for F2::Shot.
int rollingShutterTime (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.
FCam::F2::Frame getFrame ()
 Get the next frame.
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.
void start ()
 Power up the sensor, image processor, and the FCam daemon This is done automatically when you call capture for the first time.
void stop ()
 Shut down the sensor, image processor, and the FCam daemon.
virtual int maxExposure () const
 The maximum exposure time on the N900 is 1080842 us (just over a second) for small resolutions (height <= 960), and 2489140 us for larger resolutions (about 2.5 seconds).
virtual int minExposure () const
 The minimum exposure time on the N900 is 38 us for small resolutions (height <= 960) and 66 us for larger resolutions.
virtual int maxFrameTime () const
 The maximum frame time on the N900 is 1081250 us for small resolutions (just over a second), and 2490072 us for larger resolutions (about 2.5 seconds).
virtual int minFrameTime () const
 The minimum frame time on the N900 is the 33414 us for smaller resolutions (height <= 960), and 77412 us for larger resolutions.
virtual float maxGain () const
 The maximum gain on the N900 is 32, which can be considered ISO 3200.
virtual float minGain () const
 The minimum supported gain is 1, which can be considered ISO 100.
Size minImageSize () const
 minimum image 640x480
Size maxImageSize () const
 maximum image without black calibration areas is 2592x1944
int rollingShutterTime (const Shot &) const
 Overloaded version for F2::Shot.
int rollingShutterTime (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.
virtual const Platformplatform ()
 Access to the static platform data about this sensor.
FCam::F2::Frame getFrame ()
 Get the next frame.

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.
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 24 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 38 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 59 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 92 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 112 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. To turn off the sensor completely see Sensor::stop

Implements FCam::Sensor.

Definition at line 141 of file Sensor.cpp.

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

Power up the sensor, image processor, and the FCam daemon This is done automatically when you call capture for the first time.

Implements FCam::Sensor.

Definition at line 26 of file Sensor.cpp.

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

Shut down the sensor, image processor, and the FCam daemon.

Call this to save power and/or processing cycles while your program is doing something unrelated to taking pictures.

Implements FCam::Sensor.

Definition at line 32 of file Sensor.cpp.

virtual int FCam::F2::Sensor::maxExposure (  )  const [inline, virtual]

The maximum exposure time on the N900 is 1080842 us (just over a second) for small resolutions (height <= 960), and 2489140 us for larger resolutions (about 2.5 seconds).

Todo:
Fix below functions to be correct for Aptina instead of N900

Implements FCam::Sensor.

Definition at line 55 of file Sensor.h.

virtual int FCam::F2::Sensor::minExposure (  )  const [inline, virtual]

The minimum exposure time on the N900 is 38 us for small resolutions (height <= 960) and 66 us for larger resolutions.

Implements FCam::Sensor.

Definition at line 60 of file Sensor.h.

virtual int FCam::F2::Sensor::maxFrameTime (  )  const [inline, virtual]

The maximum frame time on the N900 is 1081250 us for small resolutions (just over a second), and 2490072 us for larger resolutions (about 2.5 seconds).

Implements FCam::Sensor.

Definition at line 65 of file Sensor.h.

virtual int FCam::F2::Sensor::minFrameTime (  )  const [inline, virtual]

The minimum frame time on the N900 is the 33414 us for smaller resolutions (height <= 960), and 77412 us for larger resolutions.

Implements FCam::Sensor.

Definition at line 70 of file Sensor.h.

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

The maximum gain on the N900 is 32, which can be considered ISO 3200.

Implements FCam::Sensor.

Definition at line 73 of file Sensor.h.

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

The minimum supported gain is 1, which can be considered ISO 100.

Reimplemented from FCam::Sensor.

Definition at line 76 of file Sensor.h.

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

Overloaded version for F2::Shot.

Definition at line 188 of file Sensor.cpp.

int FCam::F2::Sensor::rollingShutterTime ( 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 194 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 234 of file Sensor.cpp.

FCam::F2::Frame FCam::F2::Sensor::getFrame (  ) 

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.

Reimplemented from FCam::Sensor.

Definition at line 147 of file Sensor.cpp.

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

Queue up the next shot.

Makes a deep copy of the argument.

Implements FCam::Sensor.

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.

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.

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.

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

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

The sensor will continue to run. To turn off the sensor completely see Sensor::stop

Implements FCam::Sensor.

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

Power up the sensor, image processor, and the FCam daemon This is done automatically when you call capture for the first time.

Implements FCam::Sensor.

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

Shut down the sensor, image processor, and the FCam daemon.

Call this to save power and/or processing cycles while your program is doing something unrelated to taking pictures.

Implements FCam::Sensor.

virtual int FCam::F2::Sensor::maxExposure (  )  const [inline, virtual]

The maximum exposure time on the N900 is 1080842 us (just over a second) for small resolutions (height <= 960), and 2489140 us for larger resolutions (about 2.5 seconds).

Todo:
Fix below functions to be correct for Aptina instead of N900

Implements FCam::Sensor.

Definition at line 55 of file Sensor.h.

virtual int FCam::F2::Sensor::minExposure (  )  const [inline, virtual]

The minimum exposure time on the N900 is 38 us for small resolutions (height <= 960) and 66 us for larger resolutions.

Implements FCam::Sensor.

Definition at line 60 of file Sensor.h.

virtual int FCam::F2::Sensor::maxFrameTime (  )  const [inline, virtual]

The maximum frame time on the N900 is 1081250 us for small resolutions (just over a second), and 2490072 us for larger resolutions (about 2.5 seconds).

Implements FCam::Sensor.

Definition at line 65 of file Sensor.h.

virtual int FCam::F2::Sensor::minFrameTime (  )  const [inline, virtual]

The minimum frame time on the N900 is the 33414 us for smaller resolutions (height <= 960), and 77412 us for larger resolutions.

Implements FCam::Sensor.

Definition at line 70 of file Sensor.h.

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

The maximum gain on the N900 is 32, which can be considered ISO 3200.

Implements FCam::Sensor.

Definition at line 73 of file Sensor.h.

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

The minimum supported gain is 1, which can be considered ISO 100.

Reimplemented from FCam::Sensor.

Definition at line 76 of file Sensor.h.

int FCam::F2::Sensor::rollingShutterTime ( const Shot  )  const

Overloaded version for F2::Shot.

int FCam::F2::Sensor::rollingShutterTime ( 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.

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.

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

Access to the static platform data about this sensor.

Implements FCam::Sensor.

Definition at line 101 of file Sensor.h.

FCam::F2::Frame FCam::F2::Sensor::getFrame (  ) 

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.

Reimplemented from FCam::Sensor.


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