Go to Post Just a modest request for folks NOT to put 3000-pixel-wide pictures inline in the forum. A link to the big picture works just as well while keeping the text readable. Thanks. - Rick TYler [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 31-01-2015, 13:48
RoboBucs RoboBucs is offline
Registered User
FRC #5005
 
Join Date: Jan 2015
Location: Chattanooga, TN
Posts: 69
RoboBucs is an unknown quantity at this point
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?


Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2015, 21:50
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: Toggle Between Two Cameras in Vision Processing

Are you using Axis cameras or USB cameras?
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-02-2015, 10:25
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #4   Spotlight this post!  
Unread 02-02-2015, 16:38
RoboBucs RoboBucs is offline
Registered User
FRC #5005
 
Join Date: Jan 2015
Location: Chattanooga, TN
Posts: 69
RoboBucs is an unknown quantity at this point
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!
Reply With Quote
  #5   Spotlight this post!  
Unread 02-02-2015, 16:44
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
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.
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-02-2015, 17:11
RoboBucs RoboBucs is offline
Registered User
FRC #5005
 
Join Date: Jan 2015
Location: Chattanooga, TN
Posts: 69
RoboBucs is an unknown quantity at this point
Exclamation Re: Toggle Between Two Cameras in Vision Processing

Quote:
Originally Posted by adciv View Post
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.

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:

Reply With Quote
  #7   Spotlight this post!  
Unread 02-02-2015, 21:24
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #8   Spotlight this post!  
Unread 02-02-2015, 22:02
RoboBucs RoboBucs is offline
Registered User
FRC #5005
 
Join Date: Jan 2015
Location: Chattanooga, TN
Posts: 69
RoboBucs is an unknown quantity at this point
Re: Toggle Between Two Cameras in Vision Processing

Quote:
Originally Posted by Greg McKaskle View Post
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
Do you know anything else we could do to try to fix that? We tried it with the joystick inside with no results.
Reply With Quote
  #9   Spotlight this post!  
Unread 02-02-2015, 22:09
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,817
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 03-02-2015 at 07:52.
Reply With Quote
  #10   Spotlight this post!  
Unread 03-02-2015, 07:01
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #11   Spotlight this post!  
Unread 03-02-2015, 08:34
GrantCrowder's Avatar
GrantCrowder GrantCrowder is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2014
Location: Tucson, Arizona
Posts: 1
GrantCrowder is an unknown quantity at this point
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
Reply With Quote
  #12   Spotlight this post!  
Unread 03-02-2015, 14:13
RoboBucs RoboBucs is offline
Registered User
FRC #5005
 
Join Date: Jan 2015
Location: Chattanooga, TN
Posts: 69
RoboBucs is an unknown quantity at this point
Re: Toggle Between Two Cameras in Vision Processing

Quote:
Originally Posted by Greg McKaskle View Post
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
They are both usb cameras, I won't know model numbers until I get to the shop today.
Reply With Quote
  #13   Spotlight this post!  
Unread 03-02-2015, 16:21
RoboBucs RoboBucs is offline
Registered User
FRC #5005
 
Join Date: Jan 2015
Location: Chattanooga, TN
Posts: 69
RoboBucs is an unknown quantity at this point
Re: Toggle Between Two Cameras in Vision Processing

Quote:
Originally Posted by Greg McKaskle View Post
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
The webcams are Microsoft livecam hd 3000
Reply With Quote
  #14   Spotlight this post!  
Unread 03-02-2015, 19:11
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
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.
Attached Files
File Type: zip 2015 Video Router.zip (127.6 KB, 352 views)
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.

Last edited by adciv : 03-02-2015 at 19:24.
Reply With Quote
  #15   Spotlight this post!  
Unread 03-02-2015, 20:05
RoboBucs RoboBucs is offline
Registered User
FRC #5005
 
Join Date: Jan 2015
Location: Chattanooga, TN
Posts: 69
RoboBucs is an unknown quantity at this point
Re: Toggle Between Two Cameras in Vision Processing

Quote:
Originally Posted by adciv View Post
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.
Thank you so very much!!!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi