Go to Post Since our team is in possession of the school, we have no restrictions on how late we can be there. So our teams are often practicing into the wee hours of the morning. Also, the school board uses "the breeze" for storage of high jump mats, so it's a great place to nap. :) - Karthik [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 07-10-2008, 00:34
manderson5192 manderson5192 is offline
Registered User
AKA: Matt Anderson
FRC #0948 (Newport Robotics Group: NRG (pronounced eNeRGy))
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Bellevue, WA
Posts: 62
manderson5192 is on a distinguished road
OpenCV and New Control System

I've been fascinated with OpenCV vision processing recently and I was wondering how I could implement it on the '09 control system. It looks as though it can't be run on the VxWorks OS or on the hardware on the cRIO. Am I correct in stating this? Do you have any suggestions for how I could implement OpenCV or computer vision processing in general on the new control system?

Thanks,
Matt
  #2   Spotlight this post!  
Unread 07-10-2008, 01:15
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: OpenCV and New Control System

I don't claim to be an expert at OpenCV, but from what I understand, there are two parts of OpenCV. The video and image capture/import/export part, and the image processing part. While I doubt that the capture/import part of OpenCV is going to work on the cRio out of the box, I bet the image processing part will work quite well, provided you can compile it. Compiling it could be a challenge, especially resolving dependency problems. OpenCV is definitely a neat tool though.
  #3   Spotlight this post!  
Unread 07-10-2008, 13:09
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: OpenCV and New Control System

Trying to port OpenCV to VxWorks/cRIO will lead to massive headaches on the trying to read and reprogram x86 assembly level (try just looking at the source code). OpenCV was designed for x86-based systems and is highly optimized for those architectures. (There was an effort to port it to ARM systems a couple years ago but it was only ever a partial job. I don't know of any other ports that exist.) When you got done, you might have something that works but it would be a mess and would probably not give you the kind of performance you would want, unless you beat out all my assumptions and are proficient in high performance coding for both x86 and cRIO. I don't mean to discourage you if you really want to try it, but you're probably ahead to use the image processing framework included with LabVIEW. Trust me... LabVIEW really isn't just the "easy way out" for programming.

If you want to use OpenCV on a robot (it can be really powerful), consider using a co-processor. I experimented with this configuration during the 2008 competition and got a quite robust system for recognizing trackballs. I've been meaning to post a whitepaper on it for a while. I'll try to get it posted in the next week or so. Included will be info on my hardware set-up if you're curious.

--Ryan

P.S.: AustinSchuh: You are correct that there are multiple sections in OpenCV: CV, CXCORE, HighGUI, and CVCam are the official ones that I know of. CV contains high-level image processing and filtering functions (Hough Transforms, Edge Detection, etc). CXCORE contains basic image/array/matrix manipulation functions (like add, dot product, scale, etc). HighGUI does what it sounds like and provides an easy to use way to display images and graphs and such but also contains a rudimentary camera interface. CVCam is a more full-featured camera interface module, but may be overkill for most projects. All, however, are written to be optimized for x86 and would be a pain to cross-compile properly.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor

Last edited by RyanCahoon : 08-10-2008 at 03:21.
  #4   Spotlight this post!  
Unread 07-10-2008, 18:39
manderson5192 manderson5192 is offline
Registered User
AKA: Matt Anderson
FRC #0948 (Newport Robotics Group: NRG (pronounced eNeRGy))
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Bellevue, WA
Posts: 62
manderson5192 is on a distinguished road
Re: OpenCV and New Control System

Thanks for all the help (and the headaches you saved me)! I was afraid that it would come down to a co-processor or using the LabView libraries. I remember checking out your 'bot at the Seattle Regional and the eePC you guys were using with a usb webcam. Very impressive. Anyways, I would love to know how you guys pulled that off.

Thanks!
-Matt
  #5   Spotlight this post!  
Unread 08-10-2008, 00:16
lynca's Avatar
lynca lynca is offline
Andrew Lynch
FRC #2587 (DiscoBots)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Houston, TX
Posts: 1,612
lynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond repute
Send a message via AIM to lynca
Re: OpenCV and New Control System

OpenCV is great fun and one of the earliest community vision processing toolkits. However Intel started OpenCV with x86 and there has not been very many ports to VxWorks/PowerPC architecture.

But luckily there are many other libraries out there that can work for the 09 Control System.

*The Labview Image Processing Toolkit - probably going to be the easiest to use
* Intel also has a low-level image processing library for VxWorks
*IPL 98 - independent C++ image processing library
*Matlab Toolbox does not work but its a very popular way to learn image processing
__________________
History: 624 - Cryptonite --> 118 - Robonauts --> 2158 - AusTIN CANS --> 2587 DiscoBots
Bio: Andrew Lynch "How I Work" ---- LinkedIn , Facebook, Twitter
  #6   Spotlight this post!  
Unread 12-10-2008, 16:58
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: OpenCV and New Control System

Quote:
Originally Posted by RyanCahoon View Post
OpenCV was designed for x86-based systems and is highly optimized for those architectures. (There was an effort to port it to ARM systems a couple years ago but it was only ever a partial job. I don't know of any other ports that exist.)
Slight correction: It appears as if a couple of third party companies have ported OpenCV to the Cell processor for use on a PlayStation3 (not much use for FIRST, I think) and to the PlayStation Portable. I would love to see someone use the PSP on a FIRST robot, but the final version of the x86 coprocessor we put together was under two pounds and was several times as powerful as the PSP. And then you'd have issues conforming to the rules; the battery would need to be removed, etc. Either of these might be really interesting for off-season or personal projects though. 27x performance on the PS3 port supposedly.

Whitepaper coming soon...

--Ryan
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
  #7   Spotlight this post!  
Unread 02-11-2008, 14:31
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: OpenCV and New Control System

Just an update for those affected parties:

The white paper is still coming but it has to fit around my classes, which have taken an upturn around midterms. I'm also trying to make it as complete a guide as possible, which means there's a decent bit of content to generate, but hopefully this will mean that the end product is more helpful.

It will be out as soon possible.

Apologies for the delay.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
  #8   Spotlight this post!  
Unread 02-11-2008, 20:53
Adam Y.'s Avatar
Adam Y. Adam Y. is offline
Adam Y.
no team (?????)
 
Join Date: Mar 2002
Location: Long Island
Posts: 1,979
Adam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to behold
Send a message via AIM to Adam Y.
Re: OpenCV and New Control System

Quote:
Originally Posted by RyanCahoon View Post
Just an update for those affected parties:

The white paper is still coming but it has to fit around my classes, which have taken an upturn around midterms. I'm also trying to make it as complete a guide as possible, which means there's a decent bit of content to generate, but hopefully this will mean that the end product is more helpful.

It will be out as soon possible.

Apologies for the delay.
Just as a side note there is an entire book written on OpenCV by Oreilly publishing.
__________________
If either a public officer or any one else saw a person attempting to cross a bridge which had been ascertained to be unsafe, and there were no time to warn him of his danger, they might seize him and turn him back without any real infringement of his liberty; for liberty consists in doing what one desires, and he does not desire to fall into the river. -Mill
  #9   Spotlight this post!  
Unread 02-11-2008, 21:09
manderson5192 manderson5192 is offline
Registered User
AKA: Matt Anderson
FRC #0948 (Newport Robotics Group: NRG (pronounced eNeRGy))
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Bellevue, WA
Posts: 62
manderson5192 is on a distinguished road
Re: OpenCV and New Control System

Thanks, Ryan, for taking the time to put together a whitepaper. I'm sure it will be amazing.

I picked up a copy of the O'Reilly book the other day. It's very good, if anyone is interested in learning about how to use the OpenCV library.
  #10   Spotlight this post!  
Unread 03-01-2009, 22:52
King Duke's Avatar
King Duke King Duke is offline
Registered User
FRC #0991 (Dukes)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2004
Location: Arizona
Posts: 25
King Duke is a jewel in the roughKing Duke is a jewel in the roughKing Duke is a jewel in the rough
Send a message via AIM to King Duke
Re: OpenCV and New Control System

Quote:
Originally Posted by lynca View Post
This would appear to only support Intel hardware solutions. The cRIO is an ARM i do believe, thus the two would be incompatible.

correct me if I'm wrong.
__________________
Mr. Ames
#991 The DUKES!!!!! from Phoenix, Arizona
Cornell MineSweeper- Business is Booming.
  #11   Spotlight this post!  
Unread 04-01-2009, 10:02
lynca's Avatar
lynca lynca is offline
Andrew Lynch
FRC #2587 (DiscoBots)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Houston, TX
Posts: 1,612
lynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond reputelynca has a reputation beyond repute
Send a message via AIM to lynca
Re: OpenCV and New Control System

Quote:
Originally Posted by King Duke View Post
This would appear to only support Intel hardware solutions. The cRIO is an ARM i do believe, thus the two would be incompatible.

correct me if I'm wrong.
The cRio has a powerPC and does not have an Intel module. Therefore the standard OpenCV will not work. There are ports available to powerpc but they might not be customized for vxworks,

https://launchpad.net/ubuntu/intrepi.../python-opencv
__________________
History: 624 - Cryptonite --> 118 - Robonauts --> 2158 - AusTIN CANS --> 2587 DiscoBots
Bio: Andrew Lynch "How I Work" ---- LinkedIn , Facebook, Twitter
  #12   Spotlight this post!  
Unread 04-01-2009, 16:11
King Duke's Avatar
King Duke King Duke is offline
Registered User
FRC #0991 (Dukes)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2004
Location: Arizona
Posts: 25
King Duke is a jewel in the roughKing Duke is a jewel in the roughKing Duke is a jewel in the rough
Send a message via AIM to King Duke
Re: OpenCV and New Control System

but am i correct in saying that the intel package that was put forward would not work on the cRIO because it would be incompatible with the powerpc?

anybody want to work on finding / making a stable port of openCV to the cRIO?
__________________
Mr. Ames
#991 The DUKES!!!!! from Phoenix, Arizona
Cornell MineSweeper- Business is Booming.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
LabVIEW Training and new control system demonstration 10/17-10/19 in Frazier Park, CA Joe Ross NI LabVIEW 0 25-09-2008 13:25
New control system? David55 Rumor Mill 2 29-12-2006 08:28
New Innovation FIRST control system and the dashboard archiver 2000 0 23-06-2002 22:15
UNFAIR ADVANTAGE for CDI and new control system archiver 2000 6 23-06-2002 22:13
New Control System? smokescreen Rumor Mill 4 07-03-2002 15:48


All times are GMT -5. The time now is 22:19.

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