Go to Post Me: Hi, Honey - I'm home! Wife: Must have shipped the robot today, huh? - meaubry [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #19   Spotlight this post!  
Unread 14-05-2015, 18:51
KJaget's Avatar
KJaget KJaget is offline
Zebravision Labs
FRC #0900
Team Role: Mentor
 
Join Date: Dec 2014
Rookie Year: 2015
Location: Cary, NC
Posts: 44
KJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud of
Re: Nvidia posted a video about first

Quote:
Originally Posted by Munchskull View Post
Would you be able to post the computer version of the code?

And if you can, would you be able to give directions on how to run it? (Ex. What environment I would need? Required libraries? Required camera? Ect.)
I'll take a quick shot at this, from memory. Give it a try and ask questions if you run into problems. This will eventually morph into a readme in our code, but feedback will help us debug it.

The code in our git repo (https://github.com/FRC900/2015VisionCode) will build and run on Linux or Windows. The training code will require either Linux or cygwin for some of the scripts. The C++ code will build on everything we've tried, which includes X86 windows, X86 Linux, ARM Linux (for the Jetson) and so on.

You'll need OpenCV 2.4.x installed. On Linux this is typically an apt-get thing or the equivalent. For windows, the OpenCV page is good - http://docs.opencv.org/doc/tutorials...s_install.html.

For cygwin, we've had luck with the tarball at http://hvrl.ics.keio.ac.jp/kimura/op...cv-2.4.11.html. I think we had to move the files extracted into /lib, /share, and so on for the compiler to find them.

The code works with any camera we've thrown at it. It will also run on still images or on video files. For example, for testing we ran the code against video we've downloaded from youtube. We have special code in place for Logitech C920s under Linux since that's what we used, but it wasn't as critical as we thought to use that particular camera.

The detection code itself is in the subdir bindetection. Steps to build :
1. cd bindetection/galib247
2. make
3. cd ..
4. cmake .
5. make

We've hit a weird bug where occasionally you get a weird link error the first time through. If so, repeat the "cmake ." and make.

This will produce the creatively named binary "test", which is the recycle bin detector.

Most of the options to those code can be controlled from the command line. One thing to edit is line 25 of classifierio.cpp. Change the initial /home/ubuntu to the directory the code has been downloaded to. This will require a recompile to take effect.

To run using a camera, run test. This will open the default camera and start detecting. Adding a number to the command line to pick another camera.
To run against a video, add the video name to the command line (e.g. "test video.avi").

I'm sure I'm missing something but that's a start.
Reply With Quote
 


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 06:53.

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