![]() |
Create a thread instead of using VisionThread?
I've been doing a lot of research about roboRio performance when handling vision processing, 2 cameras, and the rest of a robot program. I've been suggested to use a coprocessor if I want fast speeds, but I still think the roboRio will be able to handle the tasks.
Switching from camera to camera and using vision processing on both one at a time has made this tricky. The most obvious solution that came to mind was to create 2 VisionThreads, and switch between them one at a time using a boolean. This works, but It seems sloppy and would most likely lead to performance issues. What I'm currently working on is using a Thread and one pipeline to process images from the 2 cameras, again, using a boolean. The problem I'm facing is using the pipeline.process method. I'm able to switch the cameras very quickly without error with this code, but once : if (pipeline.filterContoursOutput().size() >= 2) is true, then I get "too many simultaneous client streams". I found that this happens when the outputStream does not receive any new frames (I don't know if thats the actual cause but it seems to be based off of testing). Is there a different way I should approach the way this thread is structured? Here is the code Code:
new Thread(() -> {Code:
// Switch camera streams. |
| All times are GMT -5. The time now is 13:15. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi