|
libfreenect2 0.4
Open source driver for the Kinect for Windows v2 (K4W2) sensor
|
Device control. More...
#include <libfreenect2/libfreenect2.hpp>
Classes | |
| struct | ColorCameraParams |
| Color camera calibration parameters. More... | |
| struct | IrCameraParams |
| IR camera intrinsic calibration parameters. More... | |
| struct | Config |
| Configuration of depth processing. More... | |
Public Member Functions | |
| virtual | ~Freenect2Device () |
| virtual std::string | getSerialNumber ()=0 |
| virtual std::string | getFirmwareVersion ()=0 |
| virtual std::string | getPacketPipelineName ()=0 |
| virtual DeviceState | getState () const =0 |
| Return a thread-safe snapshot of the current lifecycle state. | |
| virtual std::string | getLastError () const =0 |
| Return a thread-safe snapshot of the most recent lifecycle error. | |
| virtual DeviceRuntimeStatistics | getRuntimeStatistics () const |
| Return monotonic counters for the lifetime of this device object. | |
| virtual bool | getCalibrationData (CalibrationData &calibration) const |
| Copy the immutable calibration captured during successful initialization. | |
| virtual bool | getCalibrationProfile (CalibrationProfile &profile) const |
| Copy an optional user profile attached to a durable recording. | |
| virtual ColorCameraParams | getColorCameraParams ()=0 |
| Get current color parameters. | |
| virtual IrCameraParams | getIrCameraParams ()=0 |
| Get current depth parameters. | |
| virtual void | setColorCameraParams (const ColorCameraParams ¶ms)=0 |
| Replace factory preset color camera parameters. | |
| virtual void | setIrCameraParams (const IrCameraParams ¶ms)=0 |
| Replace factory preset depth camera parameters. | |
| virtual void | setConfiguration (const Config &config)=0 |
| Configure depth processing. | |
| virtual void | setColorFrameListener (FrameListener *rgb_frame_listener)=0 |
| Provide your listener to receive color frames. | |
| virtual void | setIrAndDepthFrameListener (FrameListener *ir_frame_listener)=0 |
| Provide your listener to receive IR and depth frames. | |
| virtual void | setColorAutoExposure (float exposure_compensation=0)=0 |
| Sets the RGB camera to fully automatic exposure setting. | |
| virtual void | setColorSemiAutoExposure (float pseudo_exposure_time_ms)=0 |
| Sets a flicker-free exposure time of the RGB camera in pseudo-ms, value in range [0.0, 640] ms. | |
| virtual void | setColorManualExposure (float integration_time_ms, float analog_gain)=0 |
| Manually set true exposure time and analog gain of the RGB camera. | |
| virtual void | setColorSetting (ColorSettingCommandType cmd, uint32_t value)=0 |
| Set/get an individual setting value of the RGB camera. | |
| virtual void | setColorSetting (ColorSettingCommandType cmd, float value)=0 |
| virtual uint32_t | getColorSetting (ColorSettingCommandType cmd)=0 |
| virtual float | getColorSettingFloat (ColorSettingCommandType cmd)=0 |
| virtual void | setLedStatus (LedSettings led)=0 |
| Set the settings of a Kinect LED. | |
| virtual bool | start ()=0 |
| Start data processing with both RGB and depth streams. | |
| virtual bool | startStreams (bool rgb, bool depth)=0 |
| Start data processing with or without some streams. | |
| virtual bool | stop ()=0 |
| Stop data processing. | |
| virtual bool | close ()=0 |
| Shut down the device. | |
Static Public Attributes | |
| static const unsigned int | VendorId = 0x045E |
| static const unsigned int | ProductId = 0x02D8 |
| static const unsigned int | ProductIdPreview = 0x02C4 |
Device control.
|
virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Return a thread-safe snapshot of the current lifecycle state.
|
pure virtual |
Return a thread-safe snapshot of the most recent lifecycle error.
|
virtual |
Return monotonic counters for the lifetime of this device object.
|
virtual |
Copy the immutable calibration captured during successful initialization.
Returns false until calibration is available.
|
virtual |
Copy an optional user profile attached to a durable recording.
Live devices and legacy recordings return false.
|
pure virtual |
Get current color parameters.
Kinect v2 includes factory preset values for these parameters. They are used in Registration.
|
pure virtual |
Get current depth parameters.
Kinect v2 includes factory preset values for these parameters. They are used in depth image decoding, and Registration.
|
pure virtual |
Replace factory preset color camera parameters.
We do not have a clear understanding of the meaning of the parameters right now. You probably want to leave it as it is.
|
pure virtual |
Replace factory preset depth camera parameters.
This decides accuracy in depth images. You are recommended to provide calibrated values.
|
pure virtual |
Configure depth processing.
|
pure virtual |
Provide your listener to receive color frames.
|
pure virtual |
Provide your listener to receive IR and depth frames.
|
pure virtual |
Sets the RGB camera to fully automatic exposure setting.
Exposure compensation: negative value gives an underexposed image, positive gives an overexposed image.
| exposure_compensation | Exposure compensation, range [-2.0, 2.0] |
|
pure virtual |
Sets a flicker-free exposure time of the RGB camera in pseudo-ms, value in range [0.0, 640] ms.
The actual frame integration time is set to a multiple of fluorescent light period that is shorter than the requested time e.g. requesting 16 ms will set 10 ms in Australia (100Hz light flicker), 8.33 ms in USA (120Hz light flicker). The gain is automatically set to compensate for the reduced integration time, as if the gain was set to 1.0 and the integration time was the requested value.
Requesting less than a single fluorescent light period will set the integration time to the requested value, so the image brightness will flicker.
To set the shortest non-flickering integration period for any country, simply set a pseudo-exposure time of between (10.0, 16.667) ms, which will automatically drop the integration time to 10 or 8.3 ms depending on country, while setting the analog gain control to a brighter value.
| pseudo_exposure_time_ms | Pseudo-exposure time in milliseconds, range (0.0, 66.0+] |
|
pure virtual |
Manually set true exposure time and analog gain of the RGB camera.
| integration_time_ms | True shutter time in milliseconds, range (0.0, 66.0] |
| analog_gain | Analog gain, range [1.0, 4.0] |
|
pure virtual |
Set/get an individual setting value of the RGB camera.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Set the settings of a Kinect LED.
| led | Settings for a single LED. |
|
pure virtual |
Start data processing with both RGB and depth streams.
All above configuration must only be called before start() or after stop().
FrameListener will receive frames when the device is running.
|
pure virtual |
Start data processing with or without some streams.
FrameListener will receive enabled frames when the device is running.
| rgb | Whether to enable RGB stream. |
| depth | Whether to enable depth stream. |
|
pure virtual |
Stop data processing.
|
pure virtual |
Shut down the device.
|
static |
|
static |
|
static |