Go to Post Of course, someone who can score on all rack levels while hovering autononmously 12 inches off the floor in his own home zone could probably have posted on CD while winning a regional.;) - Richard Wallace [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-01-2012, 15:56
docdavies's Avatar
docdavies docdavies is offline
Doc Davies
FRC #0346 (RoboHawks)
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 1998
Location: Richmond, VA
Posts: 70
docdavies is an unknown quantity at this point
Re: New Vision sample program

I don't seem to be able to download the "Detecting Vision Targets in C++ and Java" PDF from FirstForge.

Reasons?

Doc
Reply With Quote
  #2   Spotlight this post!  
Unread 23-01-2012, 16:29
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: New Vision sample program

Quote:
Originally Posted by docdavies View Post
I don't seem to be able to download the "Detecting Vision Targets in C++ and Java" PDF from FirstForge.

Reasons?

Doc
Did you look here: http://firstforge.wpi.edu/sf/go/doc1304?nav=1

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2012, 22:40
xmendude217 xmendude217 is offline
Registered User
FRC #3851
 
Join Date: Jan 2011
Location: Canoga Park, California 91303
Posts: 7
xmendude217 is an unknown quantity at this point
Re: New Vision sample program

I have a question regarding the sample program, given that we have an image, what's to do with it? How can I begin to translate the image into motor movement?
Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2012, 11:49
dxk3355 dxk3355 is offline
Registered User
FRC #1126
 
Join Date: Jan 2012
Location: Webster, NY
Posts: 1
dxk3355 is an unknown quantity at this point
Re: New Vision sample program

are there javadocs for the new code?
Reply With Quote
  #5   Spotlight this post!  
Unread 25-01-2012, 18:32
nickpeq nickpeq is offline
Turing-complete
FRC #1255 (Blarglefish)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Baytown, TX
Posts: 60
nickpeq is an unknown quantity at this point
Re: New Vision sample program

Quote:
Originally Posted by xmendude217 View Post
I have a question regarding the sample program, given that we have an image, what's to do with it? How can I begin to translate the image into motor movement?
We base our movement off of center_mass_x_normalized.

Quote:
Originally Posted by dxk3355 View Post
are there javadocs for the new code?
Some of the methods involved seem to not be setup for javadocs.
Reply With Quote
  #6   Spotlight this post!  
Unread 25-01-2012, 18:44
kamehameHA kamehameHA is offline
Inspector General
AKA: William Ha
FRC #3419 (RoHawks)
Team Role: Engineer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: New York
Posts: 8
kamehameHA is an unknown quantity at this point
Re: New Vision sample program

Is there a Netbeans plugin update? So far it looks like the CriteriaCollection, which is used in the Java sample code, doesn't exist.
Reply With Quote
  #7   Spotlight this post!  
Unread 25-01-2012, 18:57
nickpeq nickpeq is offline
Turing-complete
FRC #1255 (Blarglefish)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Baytown, TX
Posts: 60
nickpeq is an unknown quantity at this point
Re: New Vision sample program

Quote:
Originally Posted by kamehameHA View Post
Is there a Netbeans plugin update? So far it looks like the CriteriaCollection, which is used in the Java sample code, doesn't exist.
The plugin update came at the same time as the new sample.
If your Netbeans isn't set to update every startup/day, go into the Plugins and Reload the updates page.
Reply With Quote
  #8   Spotlight this post!  
Unread 29-01-2012, 01:33
sng sng is offline
Registered User
FRC #0649
 
Join Date: Jan 2012
Location: Saratoga, CA
Posts: 2
sng is an unknown quantity at this point
Re: New Vision sample program

We're doing something very similar to the sample code (thresholding, convex hull, particle analysis), and finding it takes about a second to process each image on the cRio--far too slow for automated targeting.

Has anyone else been able to get the code to work onboard, with acceptable performance?

Thanks,

Steve (software mentor for team 649)
Reply With Quote
  #9   Spotlight this post!  
Unread 29-01-2012, 10:13
loafdog loafdog is offline
Registered User
AKA: Maciej
FRC #2876 (DevilBotz)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2009
Location: Burlington, MA
Posts: 33
loafdog is an unknown quantity at this point
Re: New Vision sample program

Hi,
We copied the sample code into our project and are using the sample images provided. When we run it we get zero particles found. I added some extra code to print a particle report after every image operation and find that there are particles before the final filter is run(see below).

I also had a question about the following lines:
Code:
        cc = new CriteriaCollection();
        cc.addCriteria(MeasurementType.IMAQ_MT_BOUNDING_RECT_WIDTH, 30, 400, false);
        cc.addCriteria(MeasurementType.IMAQ_MT_BOUNDING_RECT_HEIGHT, 40, 400, false);
I read through the vision concepts doc and found descriptions of these criteria. But I was not sure if it meant:
a) crop the entire image to the described rectangle and return particles in the cropped area.
b) only return particles that fit in the size of described rectangle, so search entire image for particles that fit.

Here's the code and output. I am using 10ft2.jpg in this example output. I also tried the other xxft2.jpg images and got the same result, the last filter found zero particles.

Code:
            BinaryImage bigObjectsImage = thresholdImage.removeSmallObjects(false, 2);
            printParticleReports("bigobj", bigObjectsImage);

            // fill in occluded rectangles
            BinaryImage convexHullImage = bigObjectsImage.convexHull(false);
            printParticleReports("convexhull", convexHullImage);

            // find filled in rectangles
            BinaryImage filteredImage = convexHullImage.particleFilter(cc);
            printParticleReports("filtered", filteredImage);
The output is jumbled, see this thread: http://www.chiefdelphi.com/forums/sh...d.php?t=101438
Quote:
[cRIO]
[cRIO] * bigobj******************************************** *
[cRIO] 031250000000000444 , 0.0 )
[cRIO] Area : 301746.0
[cRIO] percent : 98.224609375
[cRIO] Bounding Rect : ( 0 , 0 ) 640*480
[cRIO] Quality : 98.33023755987878
[cRIO]
[cRIO]
[cRIO] Particle(1/2)
[cRIO] Particle Report:
[cRIO] Image Height : 480
[cRIO] Image Width : 640
[cRIO] Center of mass : ( 319 , 240 )
[cRIO] normalized : ( -0.0Particle(2/2)
[cRIO] Particle Report:
[cRIO] Image Height : 480
[cRIO] Image Width : 640
[cRIO] Center of mass : ( 323 , 31 )
[cRIO] normalized : ( 0.009374999999999911 , -0.8708333333333333 )
[cRIO] Area : 272.0
[cRIO] percent : 0.08854166666666666
[cRIO] Bounding Rect : ( 294 , 29 ) 55*7
[cRIO] Quality : 95.77464788732394
[cRIO]
[cRIO]
[cRIO] 2 146.245212
[cRIO] **********************************************
[cRIO]
[cRIO] 652 )
[cRIO] Area : 307200.0
[cRIO] percent : 100.0
[cRIO] Bounding Rect : ( 0 , 0 ) 640*480
[cRIO] Quality : 100.0
[cRIO]
[cRIO]
[cRIO] Particle(1/1)
[cRIO] Particle Report:
[cRIO] Image Height : 480
[cRIO] Image Width : 640
[cRIO] Center of mass : ( 319 , 239 )
[cRIO] normalized : ( -0.0031250000000000444 , -0.004166666666666vexhull************************** *******************
[cRIO]
[cRIO] * con1 146.837495
[cRIO] **********************************************
[cRIO]
[cRIO]
[cRIO] * filtered****************************************** ***
[cRIO] 0 147.054589
[cRIO] **********************************************
[cRIO]
Reply With Quote
  #10   Spotlight this post!  
Unread 30-01-2012, 20:44
loafdog loafdog is offline
Registered User
AKA: Maciej
FRC #2876 (DevilBotz)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2009
Location: Burlington, MA
Posts: 33
loafdog is an unknown quantity at this point
Re: New Vision sample program

Turns out someone had changed the low R param of the RGB filter (from 25 to 40) while switching between our green light filter and sample's red light filter. I changed it back to 25 and was able to run the sample code in our robot project and find targets. Once that worked we are guessing that the criteria lines add a filter that looks for particles that are in the size range 30,40 to 400,400.
Code:
cc.addCriteria(MeasurementType.IMAQ_MT_BOUNDING_RECT_WIDTH, 30, 400, false);
        cc.addCriteria(MeasurementType.IMAQ_MT_BOUNDING_RECT_HEIGHT, 40, 400, false);
These criteria do not crop an image. If that explanation of the bounding rect width/height is incorrect please let me know.
Reply With Quote
  #11   Spotlight this post!  
Unread 18-02-2012, 13:47
dfischer dfischer is offline
Registered User
FRC #3559
 
Join Date: Feb 2012
Location: Jasper, IN
Posts: 1
dfischer is an unknown quantity at this point
Re: New Vision sample program

We are a second year team that is trying at this late stage in the build cycle to do some image analysis. We have a high level question to help us visualize how to make this work. We are using Java.

Where is the best place to do the image analysis? It seems we have a couple of possibilities:
1. Send images from camera to cRio and then run the image analysis code on cRio.
2. Send images from camera to laptop and then run the image analysis code on laptop
3. Send images from camera to cRio and access the images using ftp to laptop and run image analysis on laptop

Are teams using all of these alternatives? Which one is most popular?
Recommendations?
Other alternatives we haven't thought of?
thanks
Dave Fischer - mentor
Jasper Indiana team 3559
Reply With Quote
Reply


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 11:15.

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