The N900 Image Sensor class. More...
#include <Sensor.h>
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. | |
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. | |
virtual Size | minImageSize () const |
The smallest image size on the N900 is 160x120. | |
virtual Size | maxImageSize () const |
The largest image size on the N900 is 2592x1968 if operated in RAW mode. | |
virtual int | maxHistogramRegions () const |
The maximum supported number of histogram regions on the N900 is 4. | |
int | rollingShutterTime (const Shot &) const |
The N900 has a rolling shutter time of around 33ms when operating at resolutions with height <= 960, and 77ms for resolutions above that size. | |
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 () |
Access to the static platform data about this sensor. | |
FCam::N900::Frame | getFrame () |
Get the next frame. | |
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. | |
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. | |
virtual Size | minImageSize () const |
The smallest image size on the N900 is 160x120. | |
virtual Size | maxImageSize () const |
The largest image size on the N900 is 2592x1968 if operated in RAW mode. | |
virtual int | maxHistogramRegions () const |
The maximum supported number of histogram regions on the N900 is 4. | |
int | rollingShutterTime (const Shot &) const |
The N900 has a rolling shutter time of around 33ms when operating at resolutions with height <= 960, and 77ms for resolutions above that size. | |
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 () |
Access to the static platform data about this sensor. | |
FCam::N900::Frame | getFrame () |
Get the next frame. |
It takes vanilla shots and returns vanilla frames. See the base class documentation for the semantics of its methods.
The image sensor on the N900 is natively 2592x1968, and so this is the best RAW resolution to stream. N900 can also capture 648x492 in RAW by "binning" (averaging down) by a factor of four, and 1296x984 by binning with a factor of two. These modes are not recommended, because they slightly break the assumptions underlying most demosaicing algorithms.
In UYVY mode, the N900 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. All resolutions incur some degree of resampling. If this bothers you, stream RAW and do the demosaicing using demosaic. The hardware resizer in the OMAP3430 is quite good however. Recommended resolutions to use in UYVY mode include 640x480, 1280x960, 2560x1920, and 2576x1944 (which is not quite 4:3).
Definition at line 40 of file Sensor.h.
void FCam::N900::Sensor::capture | ( | const FCam::Shot & | ) | [virtual] |
Queue up the next shot.
Makes a deep copy of the argument.
Implements FCam::Sensor.
Definition at line 73 of file Sensor.cpp.
void FCam::N900::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 93 of file Sensor.cpp.
void FCam::N900::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 120 of file Sensor.cpp.
void FCam::N900::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 134 of file Sensor.cpp.
void FCam::N900::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 156 of file Sensor.cpp.
void FCam::N900::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 31 of file Sensor.cpp.
void FCam::N900::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 38 of file Sensor.cpp.
virtual int FCam::N900::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).
Implements FCam::Sensor.
virtual int FCam::N900::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.
virtual int FCam::N900::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.
virtual int FCam::N900::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.
virtual float FCam::N900::Sensor::maxGain | ( | ) | const [inline, virtual] |
The maximum gain on the N900 is 32, which can be considered ISO 3200.
Implements FCam::Sensor.
virtual float FCam::N900::Sensor::minGain | ( | ) | const [inline, virtual] |
The minimum supported gain is 1, which can be considered ISO 100.
Reimplemented from FCam::Sensor.
virtual Size FCam::N900::Sensor::maxImageSize | ( | ) | const [inline, virtual] |
The largest image size on the N900 is 2592x1968 if operated in RAW mode.
In UYVY, the largest image size you should request is 2560x1920
Reimplemented from FCam::Sensor.
virtual int FCam::N900::Sensor::maxHistogramRegions | ( | ) | const [inline, virtual] |
The maximum supported number of histogram regions on the N900 is 4.
Reimplemented from FCam::Sensor.
int FCam::N900::Sensor::rollingShutterTime | ( | const Shot & | s | ) | const [virtual] |
The N900 has a rolling shutter time of around 33ms when operating at resolutions with height <= 960, and 77ms for resolutions above that size.
Implements FCam::Sensor.
Definition at line 179 of file Sensor.cpp.
int FCam::N900::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 211 of file Sensor.cpp.
virtual const Platform& FCam::N900::Sensor::platform | ( | ) | [inline, virtual] |
Access to the static platform data about this sensor.
Implements FCam::Sensor.
Frame FCam::N900::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 163 of file Sensor.cpp.
void FCam::N900::Sensor::capture | ( | const FCam::Shot & | ) | [virtual] |
void FCam::N900::Sensor::capture | ( | const std::vector< FCam::Shot > & | ) | [virtual] |
void FCam::N900::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::N900::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::N900::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::N900::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::N900::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::N900::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).
Implements FCam::Sensor.
virtual int FCam::N900::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.
virtual int FCam::N900::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.
virtual int FCam::N900::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.
virtual float FCam::N900::Sensor::maxGain | ( | ) | const [inline, virtual] |
The maximum gain on the N900 is 32, which can be considered ISO 3200.
Implements FCam::Sensor.
virtual float FCam::N900::Sensor::minGain | ( | ) | const [inline, virtual] |
The minimum supported gain is 1, which can be considered ISO 100.
Reimplemented from FCam::Sensor.
virtual Size FCam::N900::Sensor::maxImageSize | ( | ) | const [inline, virtual] |
The largest image size on the N900 is 2592x1968 if operated in RAW mode.
In UYVY, the largest image size you should request is 2560x1920
Reimplemented from FCam::Sensor.
virtual int FCam::N900::Sensor::maxHistogramRegions | ( | ) | const [inline, virtual] |
The maximum supported number of histogram regions on the N900 is 4.
Reimplemented from FCam::Sensor.
int FCam::N900::Sensor::rollingShutterTime | ( | const Shot & | ) | const [virtual] |
The N900 has a rolling shutter time of around 33ms when operating at resolutions with height <= 960, and 77ms for resolutions above that size.
Implements FCam::Sensor.
int FCam::N900::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::N900::Sensor::platform | ( | ) | [inline, virtual] |
Access to the static platform data about this sensor.
Implements FCam::Sensor.
FCam::N900::Frame FCam::N900::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.