Thread: Vision Failing
View Single Post
  #3   Spotlight this post!  
Unread 02-04-2012, 10:50
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: Vision Failing

You may want to try using the HSL color space rather than RGB. We've had relatively good luck with it.

Also loosening the particle filter a little bit (on the low end) may help.

I would also suggest doing some null checking for each of the different image pointers you get while performing your threshold, filtering, etc. especially if your getting vision task is crashing/throwing errors.

In addition to the null checking, I would recommend checking to ensure the height and width of the original camera image are non-zero, as this does occasionally happen for some reason, and will cause the vision to stop working.

Lastly, you say you look for a width of 33px to determine when your 12' away? Have you considered using height instead? By using width, your dependent on your horizontal viewing angle; if you use height instead, your distance equation should work from almost any angle (as long as your camera isn't moving up and down).
Reply With Quote