|
FPS drops with multiple cameras housed within if tests modules Anonymous |
10 year
|
We have three "if test" modules that are used to determine which of three web cameras to display (see attached image). The idea is to only show the camera that the robot is in. The if test work fine and only the image from the camera with the robot displays video. However, we have noticed that the FPS drop when we switch to a different camera. It should be that the FPS stay the same since the "if test" modules only allow one camera at a time. To test that this is the issue we disabled all camera modules but one and noticed that the FPS increased. It appears that even when the if test module is false the read modules still grabs an image from the web camera. Any suggestions on how to correct this behavior or is it possible to disable a module from the vb script.
|
|
|
Steven Gentner from United States [1446 posts] |
10 year
|
Vince,
While the IF statements will prevent an image from being used, it doesn't prevent the separate thread used for image capture by those modules. The theory is that the modules need to have the most recent image ready just in case the pipeline suddenly needs it so they continiously grab images. The FPS will NOT slow down, however, unless there is a bandwidth issue ... which is most likely the reason for you finding that removing the modules will speed things up.
So if you don't need to rapidly flicker back and forth between the different cameras what I would do is use a variable in the HTTP Read GUI like
[url]
and use the If Statements to instead set the URL to the camera chosen. That will force a single module to switch network feeds and thus only use what it needs in terms of bandwidth for the current view.
We just made a chance to ensure this actually works (i.e. changing the url closes the current connection and opens a new one) so you will need to download the latest version for this to work.
STeven.
|
|