MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

FCam::N9::Sensor Class Reference

The N9 Image Sensor class. More...

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

List of all members.

Public Member Functions

void  capture (const FCam::Shot &)
  Queue up the next shot.
void  capture (const std::vector< FCam::Shot > &)
  Queue up a burst of shots.
void  stream (const FCam::Shot &s)
  Set a shot to be captured when the sensor isn't busy capturing anything else.
void  stream (const std::vector< FCam::Shot > &)
  Set a burst to be captured whenever the sensor isn't busy capturing anything else.
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.
int  initialize (int timeout)
  start threads.
virtual int  maxExposure () const
  The maximum exposure time on the N9 is 109458 us.
virtual int  minExposure () const
  The minimum exposure time on the N9 is 50 us.
virtual int  maxFrameTime () const
  The maximum frame time on the N9 is 109846 us.
virtual int  minFrameTime () const
  The minimum frame time on the N9 is 33339 us.
virtual float  maxGain () const
  The maximum analog gain on N9 is 8.0 and the maximum digital gain is 4.0 so maximum total gain is 32.0.
virtual float  minGain () const
  The minimum supported gain is 1, which can be considered ISO 100.
virtual Size  minImageSize () const
  The smallest image size on the N9 is 410x304.
virtual Size  maxImageSize () const
  The largest image size on the N9 is 3280x2464 if operated in RAW mode.
int  rollingShutterTime (const 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 Platform platform () const
  Access to the static platform data about this sensor.
FCam::N9::Frame  getFrame ()
  Get the next frame.

Detailed Description

The N9 Image Sensor class.

It takes vanilla shots and returns vanilla frames. See the base class documentation for the semantics of its methods.

The image sensor on the N9 is natively 3576x2464, but the corner regions are always cropped out, so the full RAW resolutions are 3280x2464 (4:3) and 3568x2016 (16:9). These are the best RAW resolutions to stream. N9 can also capture 816x608 in RAW by "binning" (averaging down) by a factor of four, and 1632x1232 or 1776x1008 by binning with a factor of two (with a slightly different crop window on the sensor).

In UYVY mode, the N9 can stream at a wide variety of resolutions. This is done by streaming at a compatible raw resolution and then resizing the resulting images in hardware to requested resolution. Most resolutions incur some degree of resampling. The maximum resolutions in UYVY mode are 3264x2455 (4:3) and 3552x2007 (16:9). The runtime will pick a raw mode to use with compatible aspect ratio and resolution.


Member Function Documentation

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

Queue up the next shot.

Makes a deep copy of the argument.

Implements FCam::Sensor.

void FCam::N9::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::N9::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::N9::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::N9::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::N9::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::N9::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.

int FCam::N9::Sensor::initialize ( int  timeout  )  [virtual]

start threads.

return 0 for success, -1 for error

Implements FCam::Sensor.

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

The maximum exposure time on the N9 is 109458 us.

Implements FCam::Sensor.

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

The maximum frame time on the N9 is 109846 us.

Implements FCam::Sensor.

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

The minimum frame time on the N9 is 33339 us.

Implements FCam::Sensor.

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

The maximum analog gain on N9 is 8.0 and the maximum digital gain is 4.0 so maximum total gain is 32.0.

If a gain of less or equal to 8.0 is requested, the gain is analog only.

Implements FCam::Sensor.

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

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

Reimplemented from FCam::Sensor.

virtual Size FCam::N9::Sensor::maxImageSize (  )  const [inline, virtual]

The largest image size on the N9 is 3280x2464 if operated in RAW mode.

In UYVY, the largest image size you should request is 3264x2455.

Reimplemented from FCam::Sensor.

int FCam::N9::Sensor::rollingShutterTime ( const 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::N9::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::N9::Sensor::platform (  )  const [inline, virtual]

Access to the static platform data about this sensor.

Implements FCam::Sensor.

FCam::N9::Frame FCam::N9::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.


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