class methods
- ofxKinect()
- ~ofxKinect()
- clear()
- close()
- draw()
- drawDepth()
- enableDepthNearValueWhite()
- getAccelPitch()
- getAccelRoll()
- getColorAt()
- getCurrentCameraTiltAngle()
- getDepthPixels()
- getDepthPixelsRef()
- getDepthTextureReference()
- getDeviceId()
- getDistanceAt()
- getDistancePixels()
- getDistancePixelsRef()
- getFarClipping()
- getHeight()
- getMksAccel()
- getNearClipping()
- getPixels()
- getPixelsRef()
- getRawAccel()
- getRawDepthPixels()
- getRawDepthPixelsRef()
- getSensorCameraDistance()
- getSensorEmitterDistance()
- getSerial()
- getTargetCameraTiltAngle()
- getTextureReference()
- getWidth()
- getWorldCoordinateAt()
- getZeroPlaneDistance()
- getZeroPlanePixelSize()
- hasAccelControl()
- hasCamTiltControl()
- hasLedControl()
- init()
- isConnected()
- isDepthNearValueWhite()
- isDeviceConnected()
- isFrameNew()
- isFrameNewDepth()
- isFrameNewVideo()
- listDevices()
- nextAvailableId()
- nextAvailableSerial()
- numAvailableDevices()
- numConnectedDevices()
- numTotalDevices()
- open()
- setCameraTiltAngle()
- setDepthClipping()
- setLed()
- setRegistration()
- setUseTexture()
- update()
variables
Documentation from code comments
wrapper for a freenect kinect device
references:http://openkinect.org/wiki/Main_Pagehttps://github.com/OpenKinect/libfreenect/blob/master/include/libfreenect.h
clear()
void ofxKinect::clear()
close()
void ofxKinect::close()
Documentation from code comments
close the connection and stop grabbing images
draw(...)
void ofxKinect::draw(float x, float y, float w, float h)
Documentation from code comments
draw the video texture
drawDepth(...)
void ofxKinect::drawDepth(float x, float y, float w, float h)
Documentation from code comments
draw the grayscale depth texture
getAccelPitch()
float ofxKinect::getAccelPitch()
Documentation from code comments
get the current pitch (x axis) & roll (z axis) of the kinect in degrees
useful to correct the 3d scene based on the camera inclination
getCurrentCameraTiltAngle()
float ofxKinect::getCurrentCameraTiltAngle()
Documentation from code comments
get the current angle
getDepthPixels()
unsigned char * ofxKinect::getDepthPixels()
Documentation from code comments
get the pixels of the most recent depth frame
grayscale values
getDepthPixelsRef()
ofPixels & ofxKinect::getDepthPixelsRef()
Documentation from code comments
get the pixels of the most recent depth frame
grayscale values
getDepthTextureReference()
ofTexture & ofxKinect::getDepthTextureReference()
Documentation from code comments
get the grayscale depth texture
getDistanceAt(...)
float ofxKinect::getDistanceAt(int x, int y)
Documentation from code comments
get the calulated distance for a depth point
getDistancePixels()
float * ofxKinect::getDistancePixels()
Documentation from code comments
get the distance in millimeters to a given point as a float array
getDistancePixelsRef()
ofFloatPixels & ofxKinect::getDistancePixelsRef()
Documentation from code comments
get the distance in millimeters to a given point as a float array
getMksAccel()
ofPoint ofxKinect::getMksAccel()
Documentation from code comments
axis-based gravity adjusted accelerometer values
from libfreeenect:
as laid out via the accelerometer data sheet, which is available at
http://www.kionix.com/Product%20Sheets/KXSD9%20Product%20Brief.pdf
getPixelsRef()
ofPixels & ofxKinect::getPixelsRef()
Documentation from code comments
get the video pixels reference
getRawDepthPixels()
unsigned short * ofxKinect::getRawDepthPixels()
Documentation from code comments
raw 11 bit values
getRawDepthPixelsRef()
ofShortPixels & ofxKinect::getRawDepthPixelsRef()
Documentation from code comments
raw 11 bit values
getSensorCameraDistance()
float ofxKinect::getSensorCameraDistance()
Documentation from code comments
get the distance between the IR sensor and the RGB camera in cm
getSensorEmitterDistance()
float ofxKinect::getSensorEmitterDistance()
Documentation from code comments
get the distance between the IR sensor and IR emitter in cm
getSerial()
string ofxKinect::getSerial()
Documentation from code comments
get the unique serial number returns an empty string "" if not connected
NOTE: currently, libfreenect returns a serial number with all 0s for kinect models > 1414, so this will only work with the original xbox kinect
getTargetCameraTiltAngle()
float ofxKinect::getTargetCameraTiltAngle()
Documentation from code comments
get the target angle (if the camera is currently moving)
getTextureReference()
ofTexture & ofxKinect::getTextureReference()
Documentation from code comments
get the video (ir or rgb) texture
getWorldCoordinateAt(...)
ofVec3f ofxKinect::getWorldCoordinateAt(int cx, int cy)
Documentation from code comments
calculates the coordinate in the world for the depth point (perspective calculation)
center of image is (0.0)
getZeroPlaneDistance()
float ofxKinect::getZeroPlaneDistance()
Documentation from code comments
get the focal length of the IR sensor in mm
getZeroPlanePixelSize()
float ofxKinect::getZeroPlanePixelSize()
Documentation from code comments
get the size of a single pixel on the zero plane in mm
isConnected()
bool ofxKinect::isConnected()
Documentation from code comments
is the connection currently open?
isDeviceConnected(...)
bool ofxKinect::isDeviceConnected(int id)
Documentation from code comments
is a device already connected?
isFrameNew()
bool ofxKinect::isFrameNew()
Documentation from code comments
is the current frame new?
nextAvailableId()
int ofxKinect::nextAvailableId()
Documentation from code comments
get the id of the next available device, returns -1 if nothing found
nextAvailableSerial()
string ofxKinect::nextAvailableSerial()
Documentation from code comments
get the serial number of the next available device, returns an empty string "" if nothing found
numAvailableDevices()
int ofxKinect::numAvailableDevices()
Documentation from code comments
get the number of available devices (not connected)
numConnectedDevices()
int ofxKinect::numConnectedDevices()
Documentation from code comments
get the number of currently connected devices
numTotalDevices()
int ofxKinect::numTotalDevices()
Documentation from code comments
get the total number of devices
open(...)
bool ofxKinect::open(int id=-1)
Documentation from code comments
open the connection and start grabbing images
set the id to choose a kinect, see numAvailableDevices() if you don't set the id (ie id=-1), the first available kinect will be used
note: this is the freenct bus id and may change each time the app is run
open(...)
bool ofxKinect::open(string serial)
Documentation from code comments
open using a kinect unique serial number
NOTE: currently, libfreenect returns a serial number with all 0s for kinect models > 1414, so this will only work with the original xbox kinect
setDepthClipping(...)
void ofxKinect::setDepthClipping(float nearClip=500, float farClip=4000)
Documentation from code comments
set the clipping planes for the depth calculations in millimeters
these are used for the depth value (12bit) -> grayscale (1 byte) conversion ie setting a short range will give you greater sensitivity from 0-255
default is 50cm - 4m note: you won't get any data < 50cm and distances > 4m start to get noisy
setLed(...)
void ofxKinect::setLed(ofxKinect::LedMode mode)
Documentation from code comments
set the current led color and/or blink mode, only applied while the kinect is open
setRegistration(...)
void ofxKinect::setRegistration(bool bUseRegistration=false)
Documentation from code comments
calibrates the depth image to align with the rgb image, disabled by default
call this before open(), has no effect while the connection is running
note: this calculation uses some cpu, leave off if not needed
setUseTexture(...)
void ofxKinect::setUseTexture(bool bUse)
Documentation from code comments
enable/disable frame loading into textures on update()
update()
void ofxKinect::update()
Documentation from code comments
updates the pixel buffers and textures
make sure to call this to update to the latest incoming frames
Last updated 星期二, 19 十一月 2024 17:23:54 UTC - 2537ee49f6d46d5fe98e408849448314fd1f180e
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue