I am trying to send kinect depth from one computer to create a point cloud on another. I have tried sending the data through OSC, but I'm not sure how to declare it on the receiving end as the depth data is sending as an int[].
This is not my entire code for each side, just what matters to my question to avoid confusion: (hello is what I am trying to send) This is the sender code.
int[] hello;
void draw() {
int[] depth = kinect.getRawDepth();
hello = depth;
}
void OscEvent(OscMessage theOscMessage) {
//create a message with a unique address pattern
OscMessage myOutGoingMessage = new OscMessage( playerAddressPattern );
myOutGoingMessage.add(hello); //send the depth data (as an int string)
osc.send( myOutGoingMessage, destination );
}
This is the applicable code from the receiver
int[] hello;//Declare the depth that is coming in from the kinect
int[] depth = hello; // the actual depth data coming from the remote kinect as the variable "hello"
void OscEvent (OscMessage theOscMessage) {
hello=theOscMessage.get(0).intvalue(); //the value being received is an int[], not an int as i have typed- how do i declare this?
}
So what might help me here is how would i declare that " hello=theOscMessage.get(0).intvalue();" as an int[]
(MacOS High Sierra, Processing 3.0.1)