How to playback occ/extract image from occ file with Structure IO SDK 0.9


Thanks for releasing Structure IO SDK 0.9.
I was able to save .occ file with Scanner sample code.

Now I am trying to playback occ file, or extract depth/color image from occ file by using api function
(instancetype)newCaptureSessionFromOccFile:(NSString *) occFilePath

I could not figure out how to make it work.
Do you have any sample code to playback Structure IO sensor occ file, or some instruction to show how to playback it?

I used structure core sdk to playback the occ file, it complains something else. it is probably because the occ files between structure core and structure IO are not compatible.



Are you using the structure sensor SDK based on OpenNI ?


I am using structure sensor SDK for iOS. this is my main issue.

(for comparison, but I did try structure core sdk playback code, but I don’t have right occ file for structure core )


Within the Structure SDK (iOS), you can use the STCaptureSession class to reply any OCC files you’d like.

It seems that you have the correct function, newCaptureSessionFromOccFile:(NSString *) occFilePath, but it not be used correctly.

Could you show me the exact line(s) of code you are using with the above function? Could you also send over any error messages you are seeing?


Hi, Anthony:
I modify the setupCaptureSession()

_captureSession = [STCaptureSession newCaptureSessionFromOccFile: @"[AppDocuments]/Scanner.occ"];

at the end of this function
[_captureSession startMonitoringWithOptions:sensorConfig];
_captureSession.streamingEnabled = true;
NSLog(@“stream is %d”,[_captureSession isStreaming]);

it seems streaming is on, but it never enter function

  • (void )captureSession:(STCaptureSession*)captureSession didOutputSample:(NSDictionary*)sample type:(STCaptureSessionSampleType)type

I am wondering how to extract color and depth frame from the streaming

the error messages show as
2019-04-12 12:14:47.295653-0700 Scanner[29937:7761449] Error: deserialization not supported here.
2019-04-12 12:14:47.305831-0700 Scanner[29937:7760809] stream is 1
2019-04-12 12:14:47.375671-0700 Scanner[29937:7761449] Error: deserialization not supported here.
2019-04-12 12:14:47.375915-0700 Scanner[29937:7761449] ERROR: Could not deserialize the color image.