Go to Post The 4-wheel drive systems bounce around like Mexican jumping beans. It is quite fun to watch. - Warren Boudreau [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-05-2015, 22:49
cpapplefamily cpapplefamily is offline
Registered User
FRC #3244 (Granite City Gearheads)
Team Role: Mentor
 
Join Date: May 2015
Rookie Year: 2015
Location: Minnesota
Posts: 256
cpapplefamily has a spectacular aura aboutcpapplefamily has a spectacular aura about
opencv a place to start

I wish to start learning opencv. In the end does all the code in a frc environment run on the roborio. I have a raspberrypi and thought i would run some test with that only the RPI traditionally runs python. Our team is Java. Maybe i could just run the code on my window pc using my web cam to closely emulate what would be on the rio come next season. What suggestions do you have for me without a rio all summer.
  #2   Spotlight this post!  
Unread 28-05-2015, 22:54
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: opencv a place to start

Put opencv on a computer, preferably a similar OS that you will be running on (looks like a linux distro, I prefer ubuntu), then install opencv. I find that 2.4.10 is more friendly that their 3.0 release, but that is just me.

Here is a presentation that my team gives to others who are interested. If you have any questions, don't hesistate to ask. I have a bunch of c++ code with opencv that I'd be willing to port over to java for you if you're interested. These codes would be our team's award winning vision solutions along with plenty of data for you to explore with.

Presentation with the just the functions:

https://www.dropbox.com/s/0fa2ctzibu...ation.ppt?dl=0

Presentation with explainations of what is happening:

https://www.dropbox.com/s/8652pai3ep...earch.ppt?dl=0
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
  #3   Spotlight this post!  
Unread 28-05-2015, 23:09
cpapplefamily cpapplefamily is offline
Registered User
FRC #3244 (Granite City Gearheads)
Team Role: Mentor
 
Join Date: May 2015
Rookie Year: 2015
Location: Minnesota
Posts: 256
cpapplefamily has a spectacular aura aboutcpapplefamily has a spectacular aura about
Re: opencv a place to start

If I'm reading your suggestion i should test the opencv programming on my Ubuntu partitioned laptop This way i can stay in the java language. I have seen loads of code to procces through i just want to be sure as I'm teaching my self how to use it that I'm not ....hate to say waist..... a bunch of time in a language i will not be using. My trouble is i don't spend enough time in one language to GREAT. Arduino C, Raspberrypi Python, now FRC Java. Do teams often offload the vision to other processors like pi's? Will the gearsbot simulator run vision?

Thank for the start.
  #4   Spotlight this post!  
Unread 28-05-2015, 23:45
TheHolyHades1 TheHolyHades1 is offline
Registered User
no team
 
Join Date: Jan 2014
Rookie Year: 2010
Location: usa
Posts: 145
TheHolyHades1 is a jewel in the roughTheHolyHades1 is a jewel in the roughTheHolyHades1 is a jewel in the rough
Re: opencv a place to start

Quote:
Originally Posted by cpapplefamily View Post
If I'm reading your suggestion i should test the opencv programming on my Ubuntu partitioned laptop This way i can stay in the java language. I have seen loads of code to procces through i just want to be sure as I'm teaching my self how to use it that I'm not ....hate to say waist..... a bunch of time in a language i will not be using. My trouble is i don't spend enough time in one language to GREAT. Arduino C, Raspberrypi Python, now FRC Java. Do teams often offload the vision to other processors like pi's? Will the gearsbot simulator run vision?

Thank for the start.
Hey,

It really depends on what your team is using, and what you're feeling comfortable with. I know it's *possible* to run vision code on the roborio, but as the system is new, you'll likely be able to find greater support if you offload the computation to a coprocessor, like a raspi as you mentioned.

The raspi is a linux system, so writing your code on an Ubuntu partition is recommended for similarity of the systems. That, and it's *significantly* easier to get all of the dependencies installed in the Ubuntu system vs the windows one. As for language, there exist openCV ports for a variety of languages. The "primary" one is the C++ version, but there exist C and Python versions at the very least, and I'm sure ports exist for Java and others. The nice thing about these ports is that the functions are essentially the same among the languages - the Python and C++ version, for example, have the same function names with slightly differing parameters (by type). So, learning opencv in a particular language should let you port your code to another language quite quickly, and your effort won't really be wasted by any means.

So, my recommendation would be to pick the language that your team uses for their overall code (that is, pick between Java and C++). If you choose the other, you still can't really go wrong.

EDIT: Just read that your team runs Java. So choose Java.
  #5   Spotlight this post!  
Unread 01-06-2015, 22:27
chsahit's Avatar
chsahit chsahit is offline
Lead Developer
AKA: Sahit C
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Jul 2014
Rookie Year: 2013
Location: Mount Olive
Posts: 7
chsahit will become famous soon enoughchsahit will become famous soon enough
Re: opencv a place to start

If you are using the RPi I would suggest staying away from Java/Python, the overhead would make vision processing a pain. Try C++. A few years ago, MORT stripped down a laptop and put it on the robot, it's surprisingly straight forward and not as heavy as one might think. I believe there is a way to use network tables and actually do all your processing on the driver station itself. Just send the data from the robot to a client program on your DS, analyze it there, and send it back.
Feel free to message me about questions or if you want to see code!
  #6   Spotlight this post!  
Unread 03-06-2015, 16:27
F22Rapture's Avatar
F22Rapture F22Rapture is offline
College Student, Mentor
AKA: Daniel A
FRC #3737 (4H Rotoraptors)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Goldsboro, NC
Posts: 476
F22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant future
Re: opencv a place to start

Quote:
Originally Posted by chsahit View Post
If you are using the RPi I would suggest staying away from Java/Python, the overhead would make vision processing a pain. Try C++. A few years ago, MORT stripped down a laptop and put it on the robot, it's surprisingly straight forward and not as heavy as one might think. I believe there is a way to use network tables and actually do all your processing on the driver station itself. Just send the data from the robot to a client program on your DS, analyze it there, and send it back.
Feel free to message me about questions or if you want to see code!
Not really true. I'm not sure about the Java bindings for OpenCV, but the Python bindings only have an overhead of something like 15%. All of the work is still being done in the same native code.
__________________
Research is what I’m doing when I don’t know what I’m doing.
- Wernher von Braun
Attending: Raleigh NC Regional
Closed Thread


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 21:07.

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