#include <Sensor.h>


Public Types | |
| enum | DropPolicy { DropNewest = 0, DropOldest } |
| Which frames should be dropped if there are too many frames in the frame Queue. More... | |
| enum | BayerPattern { RGGB = 0, BGGR, GRBG, GBRG, NotBayer } |
| The bayer pattern of the sensor when in raw mode. More... | |
Public Member Functions | |
| virtual void | capture (const Shot &)=0 |
| Queue up the next shot. | |
| virtual void | capture (const std::vector< Shot > &)=0 |
| Queue up a burst of shots. | |
| virtual void | stream (const Shot &s)=0 |
| Set a shot to be captured when the sensor isn't busy capturing anything else. | |
| virtual void | stream (const std::vector< Shot > &)=0 |
| Set a burst to be captured whenever the sensor isn't busy capturing anything else. | |
| virtual bool | streaming ()=0 |
| Is there a shot or burst currently streaming? | |
| virtual void | stopStreaming ()=0 |
| Stop the sensor from streaming a shot or burst set with stream. | |
| void | setFrameLimit (int) |
| Set the maximum number of frames that can exist in the frame queue. | |
| int | getFrameLimit () |
| Get the current frame limit (see setFrameLimit). | |
| void | setDropPolicy (DropPolicy) |
| Set which frames should be dropped if the frame limit is exceeded. | |
| DropPolicy | getDropPolicy () |
| Get which frames will be dropped if the frame limit is exceeded. | |
| virtual Frame::Ptr | getFrame ()=0 |
| Get the next frame. | |
| virtual int | framesPending () const =0 |
| How many frames are in the frame queue (i.e., how many times can you call getFrame before it blocks? | |
| virtual int | shotsPending () const =0 |
| How many shots are pending. | |
| void | attach (Device *) |
| Allow a device to tag the frames that come from this sensor. | |
| virtual int | maxExposure () const |
| The maximum exposure time supported by this sensor. | |
| virtual int | minExposure () const |
| The minimum supported exposure time. | |
| virtual int | maxFrameTime () const |
| The maximum supported frame time. | |
| virtual int | minFrameTime () const |
| The minimum supported frame time. | |
| virtual float | maxGain () const |
| The maximum supported gain. | |
| virtual float | minGain () const |
| The minimum supported gain. | |
| virtual Size | minImageSize () const |
| The smallest image size. | |
| virtual Size | maxImageSize () const |
| The largest image size. | |
| virtual int | maxHistogramRegions () const |
| The maximum supported number of histogram regions. | |
| virtual int | getRollingShutterTime (const Shot &) const =0 |
| The time difference between the first line exposing and the last line in microseconds, for given shot parameters. | |
| virtual BayerPattern | getBayerPattern () const =0 |
| Get the bayer pattern of this sensor when in raw mode. | |
| virtual const float * | getXYZToRawColorMatrixTungsten () const =0 |
| The 3x3 color matrix mapping under Tungsten lighting. | |
| virtual const float * | getXYZToRawColorMatrixDaylight () const =0 |
| The 3x3 color matrix mapping under daylight. | |
| virtual const std::string & | getManufacturer ()=0 |
| The camera's manufacturer. | |
| virtual const std::string & | getModel ()=0 |
| The camera's model. | |
| virtual unsigned short | minRawValue () |
| The smallest value to expect when in raw mode. | |
| virtual unsigned short | maxRawValue () |
| The largest value to expect when in raw mode. | |
| virtual void | tagFrame (Frame *) |
| A sensor has the option of tagging the frames it returns. | |
Takes shots via Sensor::capture and Sensor::stream, and returns frames via Sensor::getFrame.
Definition at line 18 of file Sensor.h.
The bayer pattern of the sensor when in raw mode.
Listed as the colors of the top 2x2 block of pixels in scanline order. Non-bayer sensors should return NotBayer.
| virtual void FCam::Sensor::capture | ( | const Shot & | ) | [pure virtual] |
Queue up the next shot.
Makes a deep copy of the argument.
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| virtual void FCam::Sensor::capture | ( | const std::vector< Shot > & | ) | [pure virtual] |
Queue up a burst of shots.
Makes a deep copy of the argument.
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| virtual void FCam::Sensor::stream | ( | const Shot & | s | ) | [pure virtual] |
Set a shot to be captured when the sensor isn't busy capturing anything else.
Makes a deep copy of the argument.
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| virtual void FCam::Sensor::stream | ( | const std::vector< Shot > & | ) | [pure virtual] |
Set a burst to be captured whenever the sensor isn't busy capturing anything else.
Makes a deep copy of the argument.
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| virtual void FCam::Sensor::stopStreaming | ( | ) | [pure virtual] |
Stop the sensor from streaming a shot or burst set with stream.
The sensor will continue to run.
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| void FCam::Sensor::setFrameLimit | ( | int | l | ) |
Set the maximum number of frames that can exist in the frame queue.
This a failsafe for memory management, not a rate control tool.
Definition at line 24 of file Sensor.cpp.
| void FCam::Sensor::setDropPolicy | ( | Sensor::DropPolicy | d | ) |
Set which frames should be dropped if the frame limit is exceeded.
Definition at line 33 of file Sensor.cpp.
| Sensor::DropPolicy FCam::Sensor::getDropPolicy | ( | ) |
Get which frames will be dropped if the frame limit is exceeded.
Definition at line 37 of file Sensor.cpp.
| virtual Frame::Ptr FCam::Sensor::getFrame | ( | ) | [pure 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.
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| virtual int FCam::Sensor::shotsPending | ( | ) | const [pure 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.
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| void FCam::Sensor::attach | ( | Device * | d | ) |
Allow a device to tag the frames that come from this sensor.
Definition at line 20 of file Sensor.cpp.
| virtual int FCam::Sensor::maxExposure | ( | ) | const [inline, virtual] |
| virtual int FCam::Sensor::maxFrameTime | ( | ) | const [inline, virtual] |
| virtual int FCam::Sensor::getRollingShutterTime | ( | const Shot & | ) | const [pure virtual] |
The time difference between the first line exposing and the last line in microseconds, for given shot parameters.
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| virtual BayerPattern FCam::Sensor::getBayerPattern | ( | ) | const [pure virtual] |
Get the bayer pattern of this sensor when in raw mode.
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| virtual const float* FCam::Sensor::getXYZToRawColorMatrixTungsten | ( | ) | const [pure 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.
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| virtual const float* FCam::Sensor::getXYZToRawColorMatrixDaylight | ( | ) | const [pure 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.
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| virtual const std::string& FCam::Sensor::getManufacturer | ( | ) | [pure virtual] |
| virtual const std::string& FCam::Sensor::getModel | ( | ) | [pure virtual] |
The camera's model.
Should also include manufacturer (e.g. Canon 400D).
Implemented in FCam::F2::Sensor, and FCam::N900::Sensor.
| virtual unsigned short FCam::Sensor::minRawValue | ( | ) | [inline, virtual] |
| virtual unsigned short FCam::Sensor::maxRawValue | ( | ) | [inline, virtual] |
| virtual void FCam::Sensor::tagFrame | ( | Frame * | ) | [inline, virtual] |
A sensor has the option of tagging the frames it returns.
This is here so that derived sensor may attached extra information as tags if they wish, though it's usually better to return a derived Frame type.
Implements FCam::Device.
1.5.6