Go to Post Messy wires are a pain in the chassis - [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 27-01-2014, 17:14
Clancularius's Avatar
Clancularius Clancularius is offline
Registered User
FRC #1723 (FBI)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Independence, MO
Posts: 3
Clancularius is an unknown quantity at this point
2014 Vision Processing

I'm looking for some advice on getting vision processing to work on the DS. I have successfully integrated the vision processing in the DB VI following the "Tutorial 8 - Integrating Vision into Robot Code" if I remember correctly. After some testing with reflective tape, it does give us a distance value(which fluctuates), but that's all. We really need it to tell us whether or not the goal is "hot", but I'm not sure what to change in order to fix it. Any help would be greatly appreciated. If you need a copy of the project, let me know.

Last edited by Clancularius : 27-01-2014 at 17:48.
Reply With Quote
  #2   Spotlight this post!  
Unread 28-01-2014, 09:27
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: 2014 Vision Processing

Our team took the Identifying Target example, isolated the boolean value that tells whether or not a "Horizontal" target was identified and we use that to tell whether or not we're facing a hot goal.

This can be found by starting the Indentfying Targets example and finding the LED on the front panel that says "Horizontal." The boolean terminal is inside a few bundles but I'm sure when you see the LED, you can trace the value yourself.
__________________
Per Audacia Ad Astra
Reply With Quote
  #3   Spotlight this post!  
Unread 28-01-2014, 12:28
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: 2014 Vision Processing

There is an enum in the TargetInfo>>Scores that indicates that a horizontal and vertical are the right distance and orientation to be a hot goal. The data in the cluster is pretty complete, and you can dissect and use any portion of it.

If you decide to use only the horizontal segment's score, your tradeoff is that a horizontal particle from a fluorescent light or window or other reflection may pass that test. Requiring the horizontal and vertical gives a bit more confidence in the interpretation, but it also requires that both are visible. Perhaps an even better solution would be to calculate a hot-score. Some points are awarded for the presence of the H piece. Other points are awarded for the V piece in the correct location. You can then decide assign your score threshold based on your strategy.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 31-01-2014, 14:21
Clancularius's Avatar
Clancularius Clancularius is offline
Registered User
FRC #1723 (FBI)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Independence, MO
Posts: 3
Clancularius is an unknown quantity at this point
Re: 2014 Vision Processing

Thanks for your help, I was able to get the vision processing to work properly on the DS. Now that it works, I want to know exactly what the "Score Limit" value controls. Following the tutorial, it has you put that variable on the DB. I assume it is the confidence, or percent chance that what the camera is seeing is actually the horizontal and vertical indicators. How exactly does it work into the program? I have tried deciphering the code myself with no success.

I also noticed the two LED's named "horizontal?" in the front panel of the "score and rank" VI (If I remember correctly) in the "target info" cluster, one in the horizontal column and the other in vertical. Was that just a programming error? Should they both be named "horizontal?"? I apologize if I haven't explained anything clearly, I don't have access to the code as I type this. If I've made any errors, I will fix them when I can.
Reply With Quote
  #5   Spotlight this post!  
Unread 01-02-2014, 08:06
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: 2014 Vision Processing

Ultimately, you want a Boolean value of whether the target exists in the sea of pixels coming from the camera. And if it is there, where do I aim.

But it is rare that the captured image of the objects perfectly match our descriptions of them. This is due to lighting effects, sensor noise, lens distortion, lens defects, JPEG compression, camera movement, limited number of pixels, etc.

To deal with these inaccuracies in the image, the image processing code postpones the Boolean decision about whether the target is in the pixels for as long as possible. Instead, it calculates a score for various attributes. Instead of saying that is definitely a rectangle, it says that is scores XX out of 100 in rectangularity. It does the same for other attributes Is it the right aspect ratio. Are the objects the expected distance from one another?

But at some point you want the Boolean decision, and that is where score limit comes in. In this case, it is simply applied to all of the scores being measured and they determine the Boolean answer. If you were to decide that you care less about lets say rectangularity, you could ignore it, give it a lower score limit, or modify its scoring calculation to count off less for defects.

The initial score limit of 70 was based on the images provided with the example code. If your algorithm is being too lenient and calling "target" on a freshman wearing a green teeshirt, then you probably need to raise it. If it rejecting a target, you can look at the annotated text to see by how much and on which score. Then you can decide if you should lower the score or fix the imaging to have better data to analyze. Or perhaps you need to rethink how a score or measurement is being made and whether it is important enough to reject.

As for the LEDs named "Horizontal?". A false value means that it is a vertical segment and a true means it was determined to be a horizontal one.

When one of each is near enough to each other they may be scored as hot and labeled as left or right side of the field.

Greg McKaskle
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 09:47.

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