View Single Post
  #2   Spotlight this post!  
Unread 27-06-2009, 07:46
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,753
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: Develop and test C++ camera code without a robot

I haven't looked at the specific details, but this sounds like a great harness for developing and tweaking vision code. Let me add some other details, not necessarily for you, but for anyone interested in playing with the NI-Vision libraries.

If you want to learn about the capabilities of the libraries, the Vision Concepts manual is a great resource. It is available in the Start menu>>National Instruments>>Vision>>Documentation. It doesn't cover the syntax of the calls, but rather the algorithmic tradeoffs. For example, there are more than six methods for shape recognition, and it helps give background on the tradeoffs. I also presented some slides on the vision libraries Atlanta. They point out some examples to run and some of the library areas that are most applicable to FRC. They should be available on the NI site.

If you want to experiment at a higher level, you can run Vision Assistant on your Windows PC. Set the IP to 192.168.0.6 or similarly get your camera and PC on a compatible network, in the assistant you can choose to Acquire images, scroll in the list of camera types to Axis, adjust the IP address if needed, and click on either the single or multi frame acquire buttons. You can quickly modify camera settings, and once you have images in the browser pane, you can use menus and UI controls to inspect, correct, and process the IMAQ library functions. It may take away all the programming fun, but you can also have it generate C or LV code.

If you prefer to skip the menus and play with the code, Pat's tool sounds like it does the acquisition and display, and gives you a place to place C code for processing images.

If you are using LV, the WPI VIs work on Windows too. You can take your Robotics project and drag or copy select VIs from the cRIO target in the project to your PC target within the project window. Open the panel under the PC target and it will now run on the PC. You can delete or comment out WPI I/O components -- no simulation just yet, and you can run an app that does vision just fine. I would suggest opening the properties for the project and turning off auto-error-handling. The WPI vision libraries ignores a few HTTP errors from the camera, but with AEH, this will result in a dialog each time and it is distracting.

As always, if you have questions or issues, post them. And thanks for doing this for the C/C++ users.

Greg McKaskle