Go to Post It isn't what you're given that makes it awesome. It's what you do with it. - JosephC [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 01-02-2012, 17:19
ganchara ganchara is offline
Registered User
FRC #2523 (Hilltoppers)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: vermont
Posts: 28
ganchara is an unknown quantity at this point
Re: how to use openCV?

Quote:
Originally Posted by DjScribbles View Post
the threshold and particle analysis are both done in the C++ outside. (we also switched the vision assist file to a cpp file to evade some big errors)
When you say that the threshold and particle analysis are done in the C++ how does that work, because that would mean you went from C++ for the plane extraction and threshold, to VA to do the convex hull and particle filter, and then back to C++ for the final particle analysis?

Paul, in your first post you say that to do off cRIO processing you would have to port openCV into vxWorks, but then in your most recent post you say you don't need to port it to do off cRIO processing.
  #2   Spotlight this post!  
Unread 01-02-2012, 18:10
violinuxer violinuxer is offline
Registered User
FRC #2523
 
Join Date: Jan 2012
Location: Vermont
Posts: 13
violinuxer is an unknown quantity at this point
Re: how to use openCV?

Another programmer from team 2523 here...

To clarify- we plan to do the following:

1. Get the image from the camera.
2. Process image on drivestation computer. To do this we use the javacv libraries included in SmartDashboard. We determine the offset of the target from the center of the camera image.
3. Using NetworkTables, send this data back to the robot
4. Move the robot.
5. Rinse, repeat

AFAIK, The OpenCV has to be written manually. Am I right? An automation utility would be great...

Thanks!

violinuxer
  #3   Spotlight this post!  
Unread 01-02-2012, 18:27
catacon catacon is offline
Registered User
FRC #1444 (Lightning Lancers)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2006
Location: St. Louis
Posts: 154
catacon is a splendid one to beholdcatacon is a splendid one to beholdcatacon is a splendid one to beholdcatacon is a splendid one to beholdcatacon is a splendid one to beholdcatacon is a splendid one to beholdcatacon is a splendid one to behold
Re: how to use openCV?

OpenCV is just a set of C++/Java/Python libraries. It doesn't generate any code for you....
  #4   Spotlight this post!  
Unread 01-02-2012, 18:32
violinuxer violinuxer is offline
Registered User
FRC #2523
 
Join Date: Jan 2012
Location: Vermont
Posts: 13
violinuxer is an unknown quantity at this point
Re: how to use openCV?

Quote:
Originally Posted by catacon View Post
OpenCV is just a set of C++/Java/Python libraries. It doesn't generate any code for you....
Thought so... I just don't know how to use the wrappers provided with SmartDashboard. This is the best I have been able to find:

http://pastebin.com/cYtQiKpF


Gotta love javadocs!

violinuxer
  #5   Spotlight this post!  
Unread 01-02-2012, 18:28
violinuxer violinuxer is offline
Registered User
FRC #2523
 
Join Date: Jan 2012
Location: Vermont
Posts: 13
violinuxer is an unknown quantity at this point
Re: how to use openCV?

One more thing: where might we find the docs for WPI's JavaCV implementation?

Thanks!

violinuxer
  #6   Spotlight this post!  
Unread 02-02-2012, 14:55
DjScribbles DjScribbles is offline
Programming Mentor
AKA: Joe S
FRC #2474 (Team Excel)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2012
Location: Niles MI
Posts: 284
DjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to behold
Re: how to use openCV?

Quote:
Originally Posted by ganchara View Post
When you say that the threshold and particle analysis are done in the C++ how does that work, because that would mean you went from C++ for the plane extraction and threshold, to VA to do the convex hull and particle filter, and then back to C++ for the final particle analysis?
Code:
binaryImage = colorImage->ThresholdHSL(######);
imaqImage = binaryImage->GetImaqImage();
IVA_ProcessImage(imaqImage); //In here we just convex hull and particle filter
vector<ParticleAnalysisReport> *reports = binaryImage->GetOrderedParticleAnalysisReports();
  #7   Spotlight this post!  
Unread 02-02-2012, 17:27
ganchara ganchara is offline
Registered User
FRC #2523 (Hilltoppers)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: vermont
Posts: 28
ganchara is an unknown quantity at this point
Re: how to use openCV?

Quote:
Originally Posted by DjScribbles View Post
Code:
binaryImage = colorImage->ThresholdHSL(######);
imaqImage = binaryImage->GetImaqImage();
IVA_ProcessImage(imaqImage); //In here we just convex hull and particle filter
vector<ParticleAnalysisReport> *reports = binaryImage->GetOrderedParticleAnalysisReports();
if the code is in C++ where are you running it? on the driver station or the robot? My team is planning to run our image processing on the DS, which supposedly can't send data back to the robot while in C++.
  #8   Spotlight this post!  
Unread 05-02-2012, 12:13
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: how to use openCV?

Quote:
Originally Posted by ganchara View Post
if the code is in C++ where are you running it? on the driver station or the robot? My team is planning to run our image processing on the DS, which supposedly can't send data back to the robot while in C++.

I am going to use the JavaCV wrapper. But you could always send data using c++ you would just have to have code that talks to crio over the network.
  #9   Spotlight this post!  
Unread 19-02-2012, 15:48
Fischerk12 Fischerk12 is offline
Registered User
FRC #3559
 
Join Date: Feb 2012
Location: Jasper
Posts: 1
Fischerk12 is an unknown quantity at this point
Re: how to use openCV?

Ok we have been running into the issue of not having the wpijavacv libraries. Where can we get these or if we have them already where are they?
  #10   Spotlight this post!  
Unread 19-02-2012, 16:04
ganchara ganchara is offline
Registered User
FRC #2523 (Hilltoppers)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: vermont
Posts: 28
ganchara is an unknown quantity at this point
Re: how to use openCV?

they are downloaded with the smartdashboard
  #11   Spotlight this post!  
Unread 05-02-2012, 12:11
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: how to use openCV?

Quote:
Originally Posted by ganchara View Post
When you say that the threshold and particle analysis are done in the C++ how does that work, because that would mean you went from C++ for the plane extraction and threshold, to VA to do the convex hull and particle filter, and then back to C++ for the final particle analysis?

Paul, in your first post you say that to do off cRIO processing you would have to port openCV into vxWorks, but then in your most recent post you say you don't need to port it to do off cRIO processing.
Sorry for the confusion. If on crio you would need to do a port.
  #12   Spotlight this post!  
Unread 28-03-2013, 08:35
rdr2510 rdr2510 is offline
Registered User
no team
 
Join Date: Mar 2013
Location: MADAGASCAR
Posts: 1
rdr2510 is an unknown quantity at this point
Re: how to use openCV?

There is my code to use openCV 2.3 with delphi 7
http://www.developpez.net/forums/d13...i/#post7204310
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 23:23.

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