Go to Post Basically, just because you CAN do something doesn't mean you should and being savvy enough doesn't entitle you to being above the law. - Greg Needel [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 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
  #2   Spotlight this post!  
Unread 02-04-2012, 12:37
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 157
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Vision Failing

I'll 2nd DJ's advice -- great advice DJScribbles! All of these items are necessary. In a realtime system, the world is never kind. Odd things do happen and null pointers and failures do occur occasionally. As programmers, we like to program for perfect systems as it makes our jobs easier, but alas this isn't reality. By carefully taking each step, you'll likely find that things work much more reliably.

bob
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
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 03:04.

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