View Single Post
  #6   Spotlight this post!  
Unread 03-02-2009, 16:30
wireties's Avatar
wireties wireties is online now
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: TrackTwoColors execution time

I am looking at this code also. It is unusable as is, toooo slow as you analyzed. It dynamically allocates and deletes memory for the hit nodes. This is not a good practice in any code where the goal is anything approaching real-time performance. With the color thresholds pretty liberal, this could cause a lot of delay.

It also seems to fetch two pictures, one each time it looks for one of the 2 colors. I think it need only process a single image. In fact, this would be preferable, correct?

Comments? Suggestions?
Reply With Quote