Greetings, I have been working to switch our interactive wall product over from Kinect to Astra Pro and i have run into an issue retrieving the frames from the Astra.
- using the latest version of the SDK (v2.0.9-beta3 32bit)
- programming in C#
- working off the demonstration posted by Andrew here https://3dclub.orbbec3d.com/t/latest-sdk-v2-0-7-help-find-any-example-or-instructions-of-using-c-wrapper/1256/3
Issue in short:
After successfully reading 6 or 7 frames using the line
_Reader.TryOpenFrame(10, out Astra.ReaderFrame frame);
I receive the following exception
Issue more in-depth:
I follow the steps listed in the post linked above, start context, make readers, configure readers, etc. just as in the example. Then start a background thread with the following, wich is pretty much a copy from the example.
private void BackgroundReadingLoop()
bool running = true;
if (_Reader.TryOpenFrame(10, out Astra.ReaderFrame frame))
catch (Astra.AstraException aex)
running = false;
Using breakpoints i can see that i get about 6 or 7 frames before the exception is thrown, it is then thrown every loop. I have commented out the content of the "HandleFrame" method to see if it mite be doing something problematic but i observed the same behavior as before. I've tried using the DLLs that come with the example instead of the SDK but still saw the same behavior. I also don't see why the parameter would only be valid 6 or 7 times, i feels to me that the frame resource mite not be properly disposed of but i don't see why that would be the case.
Additionally i have tried to use the event "StreamReader.FrameReady", i registered a listener and placed "Astra.Context.Update();" in the loop above. This however leads to no frames being received, the event never fires. However after restoring the loop i found that the event does fires on the "TryOpenFrame" call. So it seems the event works and i have registered to it just fine but Context.Update() seems to not update the context. I don't know if these things are related but its definitely odd to me.
I hope someone can shed some light on the matter or has some ideas.
Thanks in advance.