Go to Post Bottom line for us is this... By elevating what ANY team can do, we also push those outstanding teams to go even further. - Rich Kressly [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: 6 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 20-09-2009, 18:39
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Need Help: FRC Labview with local USB-cam (or laptop Webcam)

I'm trying to get started with some imaging VI's but I don't want to have to be connected to the cRio and/or the IP-based Webcam they provided. The only "Camera-Open" that I can find is for the provided Axis cam, and it needs an IP addy.

I'd prefer to do some of my development with either the camera in the lid of my laptop, or some detachable USB webcam.

I've done some web-searching and all I've come up with so far are some tips on the NI developer forums that say I need to create a custom library reference to the camera's DLL.

I'm hoping that somebody out here could point me in the right direction so I don't have to go off and re-invent the wheel. Has anybody already done this? Is there a library/archive I could go search?

I'm running FRC Labview 8.5.1f5 on a HP Pavillion dv5 running Vista. The USB webcam that I'd use would be a Logitech.

Thanks!
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote
  #2   Spotlight this post!  
Unread 20-09-2009, 20:17
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Need Help: FRC Labview with local USB-cam (or laptop Webcam)

to get pictures from a usb web cam the library that is needed is called
NI-IMAQ for USB Cameras
http://zone.ni.com/devzone/cda/epd/p/id/5030

only a few Vi's need to be changed in your application, only to the point where it recieves the image
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #3   Spotlight this post!  
Unread 20-09-2009, 20:38
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: Need Help: FRC Labview with local USB-cam (or laptop Webcam)

NI has more than one vision product, but only two that are shipped with FRC.

The two shipped with FRC are the Vision Analysis functions and Vision Assistant. I believe that you will find that Vision Assistant has support for USB cams, and should work with the ones you are asking about. This will allow you to view the camera image and grab individual images in order to inspect and build up simple algorithms inside Vision Assistant.

The part of IMAQ that provides the various camera protocols is the acquisition product. It supports many camera busses including USB. Ironically, it doesn't support IP cameras, so it isn't shipped with the FRC code as it wouldn't really help much. Instead we wrote simple IP drivers in LV and C on top of TCP.

Your options are to see about downloading a copy of the IMAQ acquisition or perhaps the Suite. You'll have a 30 day eval to fool around, and it should work with the USB camera, especially if Vision Assistant does. The other option is to use the Axis camera. The TCP driver will work on both desktop an the cRIO. One thing you may encounter is that various errors will come up when run on the desktop. This is because RT doesn't report unwired errors, but desktop does. The errors I was seeing are spurious, and caused by the web server on the camera occasionally returning errors about being busy. In the future, those errors will be hidden from the WPI layer.

You will likely see a significantly larger lag from a USB camera than the Axis. You'll also find that the setup and behavior of the camera to be quite different.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 20-09-2009, 21:18
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Need Help: FRC Labview with local USB-cam (or laptop Webcam)

on a fresh installation of frc labview, the vision assistant only has support for acquiring pictures from files (and ethernet i think), the imaq for usb enables that feature in the vision assistant and is not a trial.
The vis can also be used in labview, not just the VA
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #5   Spotlight this post!  
Unread 21-09-2009, 09:42
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: Need Help: FRC Labview with local USB-cam (or laptop Webcam)

Thanks guys. Funny, bio, I was already at that page once, then clicked something on the left-hand side and never went back to it ... I think it was the comments about the memory leak that initially scared me away.

The download installed correctly, now it's up to me to figure out how to get it all to work! (I got the USB-IMAQ download, not the Vision Assistant)

I'm using the standard FRC bot template as a guide, but it's still tricky. My standalone app doesn't need all of those robot/competition conditional cases. So I'm picking up on why/when the template code is doing something, then trying to find a similar function in the USB-IMAQ library. It is definitely kicking it up a notch w.r.t. my fledgeling Labview skills.

Anybody have a sample VI using these USB IMAQ routines to gather and display video from a local cam?

This week I'll get my hands on our cRio so I'll be able to use the standard template code for the next few weeks, but one day the team will want the controller back ... and I want to be able to work on some prototype vision algorithms without hogging a desired team resource.

Hey NI! Adding USB support to this year's FRC distribution would be GREAT ... I think biojae's right ... the '09 FRC LV installation only has the "Camera Open" function for the Apex IP camera. ... at least that's the only one that I could find.

Thanks again guys.
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote
  #6   Spotlight this post!  
Unread 21-09-2009, 11:30
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Need Help: FRC Labview with local USB-cam (or laptop Webcam)

Is the Axis Camera the desired team resource or is the cRIO? I would recommend using the Axis camera if possible as (baring changes to the kit electronics) is the camera you actually want to be developing for.

The Axis camera can be connected directly to a computer via an ethernet cable and then be used with the Vision Assistant. You can also develop a Labview app for the desktop and interact with the camera using the provided FRC libraries. As Greg mentioned errors may appear on occasion, but they do not affect the functioning of the program.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #7   Spotlight this post!  
Unread 21-09-2009, 16:43
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: Need Help: FRC Labview with local USB-cam (or laptop Webcam)

I almost went down that path ... I have the Axis camera at my house, and could've re-configured it to work on my home LAN.

It just seemed silly to be on my laptop in the living room, playing with a camera that was hooked to a 100' ethernet cable that snaked back into my home office. ... especially since I was staring at a camera right there in my laptop lid. (and not having the Axis power cord was another reason to try to get my webcam working)

I understand the desire to develop the apps using the same camera we'd use in competition, but I figured that I could still investigate various hi-level methods with any camera, then fine-tune those methods once I was back running on the 'bot.

This all becomes moot in a few days, when I get my team's controller for the next few weeks. If I still don't have a USB solution working when I give back the cRio, I'll simply setup the Axis cam to work on my home network.


[edit] If I had the Axis power cord, I would've tried plugging it into my home router and reconfiguring it ... I didn't know that it'd work by plugging directly into my Laptop's RJ45. I just assumed I had to plug it into my home router. My laptop's RJ45 is inactive 99.99% of the time, I could reconfigure it to some dummy IP range without affecting it's wireless surfing etc. This sounds like a very feasible option. Thanks for the tip.
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics

Last edited by Ziaholic : 21-09-2009 at 16:50. Reason: waitaminnit ... what?
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with Festo Solenoid and Labview Team2883 General Forum 3 17-02-2010 12:56
LabVIEW - Need help with Arrays sanddrag NI LabVIEW 2 16-05-2009 21:16
Laptop for FRC Labview: Recommendation Wanted Foster National Instruments LabVIEW and Data Acquisition 2 22-11-2008 21:14
grrr need help with my cmu cam lilrican13 Programming 6 18-01-2006 00:14
I need help buying a laptop LBK Rules Chit-Chat 9 09-04-2003 02:20


All times are GMT -5. The time now is 16:10.

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