View Single Post
  #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