[Kinect] Storing Kinect UserMap to Disk?
in
Integration and Hardware
•
9 months ago
Hello,
I work on a project which tracks users with the SimpleOpenNI library.
The users silhouette is stored in an array called userMap:
- userMap = kinect.getUsersPixels(userID)
I want to record every movement of a new user and replay it after the user walk outside the kinect sensor zone.
I tried a solution with the OpenNI Recorder:
- // store data
- kinect.enableRecorder(SimpleOpenNI.RECORD_MEDIUM_FILE, "test.oni");
- // select the recording channels
- kinect.addNodeToRecording(SimpleOpenNI.NODE_DEPTH,
- SimpleOpenNI.CODEC_16Z_EMB_TABLES);
- //reload data
- if (kinect.openFileRecording("test.oni") == false){
- println("Cannot open recording");
- }
But when ever I try to reload the .oni file (check file with the OpenNIviewer.exe) the sketch says it cannot open the recording?? I tried the RecorderPlay example, sometmes it works, sometimes it shows the same error.
My secod solution would be to store the userMap of every user to disk from the start of the tracking till the user walks away. I stored the frames in an arraylist and serialized it after stop recording, but this leads me to some performance and memory issues.
Any idea to store user dependend frames memory efficient to disk?
1