|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
cl.nui.VKinect
public class VKinect
Kinect class for java on top of CLNUI from Code Laboratories. Windows only and it's having problems with running on Processing IDE. How to get started: 1) Create kinect object 2) Setup any flags if needed 3) Call init() 4) Access data. simple 5) Release
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
long |
_elapsedTime
|
long |
_longerTime
|
static int |
LED_BLINK_GREEN
|
static int |
LED_BLINK_RED_ORANGE
|
static int |
LED_GREEN
|
static int |
LED_OFF
|
static int |
LED_ORANGE
|
static int |
LED_RED
|
static int |
MODE_RAW
|
static int |
MODE_RGB32
|
static boolean |
USE_THREAD
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
VKinect()
|
Method Summary | |
---|---|
boolean |
createCamera()
Prepare and setup kinect's camera |
boolean |
createMotor()
Prepare and setup kinect's motor |
int[] |
getColor()
|
int |
getColorAt(int x,
int y)
|
int |
getColorMode()
Return raw depth map (11 bit values) |
int[] |
getDepth()
|
int[] |
getDepth8()
|
int |
getDepthAt(int x,
int y)
|
int |
getDepthMode()
|
float |
getDistanceAt(int x,
int y)
|
float[] |
getDistanceData()
|
float[] |
getDistanceDataNorm()
|
int |
getHeight()
|
boolean |
getInvertDepth()
|
float |
getMaxDistance()
|
float |
getMinDistance()
|
float[] |
getMotorAccelerometer()
Get motor's accelerometer's values for XYZ |
boolean |
getNoiseRemoval()
|
float |
getNormDistanceAt(int x,
int y)
|
short[] |
getRawDepth()
|
java.lang.String |
getSerial()
Return a 12-digit string with the motor serial number |
int |
getWidth()
|
boolean |
init()
Start Kinect's motor and camera. |
boolean |
isCameraValid()
Check if camera is available. |
boolean |
isMotorValid()
Check if motor is available. |
void |
release()
Release all. |
void |
run()
|
void |
setColorMode(int mode)
Set color capture mode. |
void |
setDepthMode(int mode)
Set depth capture mode. |
void |
setInvertDepth(boolean flag)
|
boolean |
setLedColor(int mode)
Set kinect's LED. |
boolean |
setMotorTilt(int position)
Set motor's head tilt position |
void |
setNoiseRemoval(boolean flag)
|
void |
setTimeout(int colorTimeout,
int depthTimeout)
Set timeout values for color and depth data Time is in milliseconds |
boolean |
startCamera()
Start camera. |
boolean |
stopCamera()
Stop camera. |
boolean |
stopMotor()
Stop motor |
void |
update()
Update data |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static boolean USE_THREAD
public static final int LED_OFF
public static final int LED_GREEN
public static final int LED_RED
public static final int LED_ORANGE
public static final int LED_BLINK_GREEN
public static final int LED_BLINK_RED_ORANGE
public static final int MODE_RAW
public static final int MODE_RGB32
public long _longerTime
public long _elapsedTime
Constructor Detail |
---|
public VKinect()
Method Detail |
---|
public boolean init() throws java.lang.Exception
java.lang.Exception
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void update()
public java.lang.String getSerial()
public boolean createMotor()
public boolean createCamera()
public boolean startCamera()
public boolean stopCamera()
public boolean stopMotor()
public boolean setLedColor(int mode)
mode
-
public boolean setMotorTilt(int position)
position
-
public float[] getMotorAccelerometer()
public boolean isCameraValid()
public boolean isMotorValid()
public int getColorMode()
timeOut
-
public void setColorMode(int mode)
mode
- public int getDepthMode()
public void setDepthMode(int mode)
mode
- public void setTimeout(int colorTimeout, int depthTimeout)
colorTimeout
- depthTimeout
- public int[] getColor()
public int[] getDepth()
public short[] getRawDepth()
public int[] getDepth8()
public float[] getDistanceData()
public float[] getDistanceDataNorm()
public float getMinDistance()
public float getMaxDistance()
public int getWidth()
public int getHeight()
public int getColorAt(int x, int y)
public int getDepthAt(int x, int y)
public float getDistanceAt(int x, int y)
public float getNormDistanceAt(int x, int y)
public boolean getInvertDepth()
public void setInvertDepth(boolean flag)
public boolean getNoiseRemoval()
public void setNoiseRemoval(boolean flag)
public void release()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |