-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isFrameNew() erratic behavior with multiple cameras #8
Comments
Hm, that's strange. I assume this is in your |
Sure, here's the print out. https://gist.github.com/adielfernandez/acb2ea819cd4a57b399115100fbc8bad I let it run for a few seconds. You can search for "cam 1", "cam 2", "cam 3" to see when the isFrameNew() is true. Also weird is that the on_frame_ready method runs kind of erratically in that print out, but I've seen it run more smoothly other times, i.e. 3 prints from on_frame_ready for every print from ofApp::update(). |
Hm, that is pretty weird. Looking at frames 0 or 1, it looks like on_frame_ready() gets called twice, so you'd expect to see two cams update. Here's an idea...I took a look at the MultiSensorViewer example, and there are a few similar things going on: each cam gets its own Also what could be helpful is adding a |
Sorry for the delay, got pulled away. I couldn't figure out how to call Didn't quite fix the issue though. In fact, it might have made it worse. Now, isFrameNew() is never invoked for the sensors 1 and 2. Feel free to dig around my fork of the repo and the multi cam example to see how I'm doing it if it helps: Here's the new printout with better labeling for clarity since we're printing from a load of different places: https://gist.github.com/adielfernandez/908c2830599fe39da4195b05fdb8ec2c As a side note, the main reason I needed these was to make sure my multi-threaded version wasn't flooding the thread with duplicate frames BETWEEN the new incoming frames. If sent too often it caused a build up and lag because of the queueing. I got around it by only sending the current cam pixels to the thread every 34ms (~30fps). Ideally isFrameNew() would be more precise, but this works for now :P |
Hrm, what happens when you try to call Two thoughts here. One is you could change the implementation of
This would ensure that a frame is reported as new...I think that the flag is getting toggled back to false before you get a chance to check it. Something like that.. On a separate note regarding the queueing...you mean that you're sending data with |
Using 3 Orbbec Astras (not Pro or S) for only their depth stream, i.e. initColorStream() never invoked.
All three cameras update and display their raw depth stream just fine, but the isFrameNew() method behaves strangely. I'm doing some really basic frame counting immediately after calling update on all three instances:
"isFrameNew()" fires somewhat regularly for astra1, but I'm not convinced it's every frame. It's true about 10% as often for astra2 and never fires for astra3. What's weird is that the video feed appears smooth and clear, it's just the boolean that's not behaving. But I need the boolean to do some threading stuff.
The text was updated successfully, but these errors were encountered: