|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
Toggle Between Two Cameras in Vision Processing
Hello, I am trying to make it to where I can toggle between two cameras in vision processing, and I tried to toggle between the cameras with a button on the joystick, but it did not work. How would I fix this?
![]() ![]() |
|
#2
|
|||
|
|||
|
Re: Toggle Between Two Cameras in Vision Processing
Are you using Axis cameras or USB cameras?
|
|
#3
|
|||
|
|||
|
Re: Toggle Between Two Cameras in Vision Processing
I'm not saying that this is going to fix everything, but the code is only reading the joystick once, outside the loop.
So move the Get Value inside each loop and at least at that point, you can probe and see that the buttons are working. Greg McKaskle |
|
#4
|
|||
|
|||
|
Re: Toggle Between Two Cameras in Vision Processing
Ok, I am using USB Cameras, and I will try to place the get values into the loop. Thanks you all!
|
|
#5
|
|||
|
|||
|
Re: Toggle Between Two Cameras in Vision Processing
I'm planning to do this on our robot with USB cameras. My goal is to get the code done by tomorrow evening. If I can get it done, I'll post it.
|
|
#6
|
|||
|
|||
|
Quote:
That would be great! I'm still actually getting no connection between both cameras at the same time. I also tried to put the values into the loops, and there was still no change. But thank you for your idea. This is what it looks like right now: ![]() |
|
#7
|
|||
|
|||
|
Re: Toggle Between Two Cameras in Vision Processing
As I said, it may not fix all of the issues, but I guarantee that if you do not put the Joystick Get Values inside of each loop, you are only reading them once at the beginning. That is, I assume a part of the bug you are reporting.
Greg McKaskle |
|
#8
|
|||
|
|||
|
Re: Toggle Between Two Cameras in Vision Processing
Do you know anything else we could do to try to fix that? We tried it with the joystick inside with no results.
|
|
#9
|
|||||
|
|||||
|
Re: Toggle Between Two Cameras in Vision Processing
When toggling, are you by chance expecting the camera image on the Dashboard to change?
It won't, since the Dashboard forwarding is handled in the Camera IP & Dash vi. Since you aren't doing anything in the Vision Processing loop, you won't see any effect of your joystick button, even if it weren't stuck at the first and only read. Last edited by Mark McLeod : 02-03-2015 at 07:52 AM. |
|
#10
|
|||
|
|||
|
Re: Toggle Between Two Cameras in Vision Processing
I had a bit more time to look at this.
As Mark mentioned, the actual code for sending USB camera images to the DB is inside of the IP & Dash VI. What type of cameras do you have? The current WPI VIs are setup to handle one USB camera forwarded to the DB. They don't have a ready mechanism to swap cameras, but it wouldn't be hard to add it. If one of the cameras were IP, it would be even simpler. So, what types of cameras do you have? Greg McKaskle |
|
#11
|
||||
|
||||
|
Re: Toggle Between Two Cameras in Vision Processing
Greg, I'm assuming that this is a boolean function, so I will do some testing today with it. I'm also going to work with the dash vi today, so I will start working with it. Thanks
|
|
#12
|
|||
|
|||
|
Re: Toggle Between Two Cameras in Vision Processing
Quote:
|
|
#13
|
|||
|
|||
|
Re: Toggle Between Two Cameras in Vision Processing
Quote:
|
|
#14
|
|||
|
|||
|
Re: Toggle Between Two Cameras in Vision Processing
Ok, I hacked this together in about 90 minutes and verified it works with two of our HD-3000 cams. Everything is located in the "Vision Processing.vi". It uses the "DB/Button 1" switch on the dashboard. True will give you one camera, false the other. It only runs in "HW Mode". There is a small switching delay.
*Edit* now with file. Last edited by adciv : 02-03-2015 at 07:24 PM. |
|
#15
|
|||
|
|||
|
Re: Toggle Between Two Cameras in Vision Processing
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|