-
Notifications
You must be signed in to change notification settings - Fork 58
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
Changed SpinnakerCamera StreamBufferCountMode #116
Changed SpinnakerCamera StreamBufferCountMode #116
Conversation
Previously, the buffer count mode for the Spinnaker Camera was set to Auto. This feature has been depreciated so I changed it to be manual, and manually set the buffer count. In the case where bufferCount == 1, I set it to 3 because the Spinnaker SDK mentioned that 3 was the minimum buffer count.
Thank you for the bug fix @jacksulli, it is much appreciated! I have only have three questions:
|
No problem @dihm! Version 3.0.0.118 depreciated the feature, which I found here: https://www.flir.com/support-center/iis/machine-vision/knowledge-base/spinnaker-sdk-release-notes/ I think that it should still be backwards compatible, since I just used the same format for the buffer mode that the continuous acquisition mode used. As long as that still works with previous versions, I think these changes should as well. The only reason I switched it to newest first was because I was just trying to copy the format of the continuous mode, so that might not be right. I probably should have looked into that a bit more! |
@jacksulli Sorry for continuing to be slow here. I don't have an easy way to test this here and things keep piling up.
Yeah, this is an explicit choice the camera drivers make (when available). When streaming in continuous mode, you don't really care about frame order or dropping frames, so you always choose newest first in case the computer gets slow relative to the camera. When in buffered mode, dropped frames and order are critical considerations, so we always pull the last frame first to ensure it gets read out before the buffer overflows. We should continue to respect that distinction. I also think we could probably modify this if-else branch since buffercount of 1 isn't allowed anymore anyway. I'll suggest some changes directly in the code itself. If you could make a few modifications, I'll go ahead and merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is probably also sporting to add a comment in this function mentioning the feature that has been deprecated and which version did it. That way if this breaks something for someone and they start looking, they can find the culprit quickly.
Changed the StreamBufferHandling mode to OldestFirst, and the manual buffer count to 1 when taking a single snap.
Sounds good, I've made the changes you suggested. I also looked again in the Spinnaker documentation but I also couldn't find where it said the buffer count minimum should be 3 anymore, so I'm not sure where I found that. I tested it a little bit and taking a single snap with both the UI and through RunManager seemed to work fine with the buffer count set to 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the fix!
Previously, the buffer count mode for the Spinnaker Camera in blacs_workers.py was set to Auto. This Auto feature has been depreciated by FLIR so I changed it to be manual in the same format as the continuous mode. In the case where bufferCount == 1, I set it to 3 because the Spinnaker SDK mentioned that 3 was the minimum buffer count.