Go to Post So.... football pizza water game with minibots and megabots? - euhlmann [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-02-2009, 09:48
Mike Mahar Mike Mahar is offline
Registered User
FRC #0138
 
Join Date: Jan 2007
Location: Amherst, NH
Posts: 64
Mike Mahar will become famous soon enough
Bug (?) in Target.cpp in TwoColorTrackingDemo

We were getting very different tracking behavior when we were looking for a target with pink below green than when we were looking for pink over green. It turns out that the function FindTwoColors was comparing the relative areas of the two blobs when the position was set to ABOVE but not making the comparison when the position was set to BELOW.

There's a comment in the code that says that the comparison doesn't seem to be necessary but we are finding that it is. The green color description seems to be pretty generous and that any green of almost any shade was being accepted. If the actual target was set so that pink was above green and we were looking for geen above pink, FindTwoColor was returning true if there was almost any green in the background that appeared above the pink. That includes exit signs, posters on the wall, dark green objects on shelves, etc. Once we added a call to SizesRelative to the BELOW case, our problems went away.

I suspect the arena environment will be visually very noisy. Let's just hope that "The Pink Team" (very pink t-shirts) and "The Big Mo" ( florescent green t-shirts) don't sit one above each other in the stands. We'll have a bunch of robots trying to leave the field to dump moon rocks on them during autonomous.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help Locating .h and .cpp files jkjohnson Programming 0 30-01-2009 09:00
Fatal Error: Cannot access Resource.cpp darkdwarven FRC Control System 2 26-01-2009 18:50
NiVision.cpp nickmagus Programming 4 26-01-2009 08:55
bug? Duke 13370 CD Forum Support 4 30-12-2003 21:44
Bug Matt Leese CD Forum Support 7 14-06-2001 12:18


All times are GMT -5. The time now is 02:30.

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