|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
kinecttcpclient.KinectTCPClient
public class KinectTCPClient
KinectTCPClient contains all methods needed to communicate with a KinectTCP server. It implements all commands defined in the documentation of KinectTCP. For more detailed information, please see documentation of kinectTCP on https://sites.google.com/a/temple.edu/kinecttcp/
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
int |
audioAmplitude
|
static int |
CMD_ENABLEDEPTHXYZINDEX
|
static int |
CMD_GETDEPTHMODE
|
static int |
CMD_GETRGBMODE
|
static int |
CMD_HELLO
|
static int |
CMD_INITDEPTH320X240
|
static int |
CMD_INITDEPTH640X480
|
static int |
CMD_INITDEPTH80X60
|
static int |
CMD_INITRGB1280X1024
|
static int |
CMD_INITRGB640X480
|
static int |
CMD_NODEPTH
|
static int |
CMD_NORGB
|
static int |
CMD_NUMDEVICES
|
static int |
CMD_READDEPTH
|
static int |
CMD_READDEPTHRGB
|
static int |
CMD_READDEPTHXYZ
|
static int |
CMD_READDEPTHXYZRGB
|
static int |
CMD_READRGB
|
static int |
CMD_READSKELETON
|
static int |
CMD_STARTKINECT
|
static int |
CMD_STARTKINECTDEFAULT
|
static int |
CMD_STREAMAUDIOSTART
|
static int |
CMD_STREAMAUDIOSTOP
|
long |
timestamp
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
KinectTCPClient()
Default constructor, connects to localhost, port 8001 |
|
KinectTCPClient(java.lang.String ipaddress,
int port)
Constructor, creates socket connection |
|
| Method Summary | |
|---|---|
int |
enableDepthXYZIndex()
Send command: enableDepthXYZIndex |
int |
getDepthMode()
Send command: getDepthMode |
static int[][] |
getJointPositions(int[] skel,
int skelIndex)
getJointPositions: convenience routine to extract joints from skeleton data |
int |
getRGBMode()
Send command: getRGBMode. |
int |
initDepth(int resX)
Send command: initDepth |
int |
initRGB(int resX)
Send command: initRGB |
int[] |
readDataFromCommunactionChannel(int channel)
MULTIBYTECOMMAND: read data from communication channel |
int[][] |
readDepth()
Read Depth Image. |
int[][] |
readDepthXYZ()
Read Depth Point Cloud. |
int[][] |
readDepthXYZIndex()
command: READ DepthXYZIndex. |
int[] |
readRGBImage()
command: READ RGB |
int[] |
readSkeleton()
Command Read Skeleton. |
void |
run()
start routine for thread. |
int |
sayHello()
Send command: Hello. |
int |
startKinect(boolean deflt)
Send command: start kinectTCP |
void |
stopAudio()
Command to stop audio streaming. |
void |
streamAudio()
Stream Audio: an example method for audio handling. |
static void |
writeArrayToASCIIFile(int[] data,
java.lang.String filename)
for debugging: write 1D array to a data file |
int |
writeDataToCommunactionChannel(int channel,
byte[] data)
MULTIBYTECOMMAND: write to communication channel |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public long timestamp
public int audioAmplitude
public static int CMD_HELLO
public static int CMD_NUMDEVICES
public static int CMD_STARTKINECT
public static int CMD_STARTKINECTDEFAULT
public static int CMD_ENABLEDEPTHXYZINDEX
public static int CMD_INITRGB640X480
public static int CMD_INITRGB1280X1024
public static int CMD_GETRGBMODE
public static int CMD_INITDEPTH80X60
public static int CMD_INITDEPTH320X240
public static int CMD_INITDEPTH640X480
public static int CMD_GETDEPTHMODE
public static int CMD_NORGB
public static int CMD_NODEPTH
public static int CMD_READRGB
public static int CMD_READDEPTH
public static int CMD_READDEPTHXYZ
public static int CMD_READDEPTHRGB
public static int CMD_READDEPTHXYZRGB
public static int CMD_READSKELETON
public static int CMD_STREAMAUDIOSTART
public static int CMD_STREAMAUDIOSTOP
| Constructor Detail |
|---|
public KinectTCPClient(java.lang.String ipaddress,
int port)
ipaddress: - ipaddress of kinectTCP server (kinectTCP server displays its ip-address)port: - port of kinectTCP server (kinectTCP server displays its port).public KinectTCPClient()
| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic int sayHello()
public int getRGBMode()
public int getDepthMode()
public int enableDepthXYZIndex()
public int initRGB(int resX)
resX= - 640 | 1280 | 0
public int initDepth(int resX)
resX= - 640 | 320 | 80 | 0
public int startKinect(boolean deflt)
deflt - (boolean), true: starts kinectTCP with default settings,
otherwise kinectTCP will be started with settings submitted by initDepth and initRGB
public int[][] readDepth()
public int[][] readDepthXYZ()
public int[][] readDepthXYZIndex()
public int[] readRGBImage()
public int[] readSkeleton()
public static int[][] getJointPositions(int[] skel,
int skelIndex)
skel: - skeleton data array, as obtained from readSkeleton()skelIndex: - index of skeleton (1 or 2)
public void streamAudio()
public void stopAudio()
public int writeDataToCommunactionChannel(int channel,
byte[] data)
channel - (int, 0..9)data - (byte[], max. length: 65535)
public int[] readDataFromCommunactionChannel(int channel)
channel - (int, 0..9)
public static void writeArrayToASCIIFile(int[] data,
java.lang.String filename)
data - int[]filename -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||