Go to Post Mark McLeod, spreadsheet whisperer - PayneTrain [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #14   Spotlight this post!  
Unread 14-12-2012, 15:36
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: Quick Question about Threads

Disclaimer: I have little to no experience with vision tracking apart from pseudo discussions with people who do.

I'm not sure there is any need to periodically fetch and analyse an image. For me, I would only get an image when it is needed, and only take one and analyse that. I know for a fact that most of the teams that did well in champs did exactly that. Processing multiple images is just wasting valuable processing power. If it take 2-5 seconds to process one image well, versus doing 10 images in the same amount of time badly, it seems like an obvious decision to do it once thoroughly.

Kind of like this:

1. User presses "track" button (mapped to somewhere on the controller)
2. Stop robot, Take picture
3. Send image to a new vision processing thread (or executor)
4. Wait (keep robot stopped) until thread sends speed (or whatever data you need) back to main thread (use thread.join() or object.wait())
5. Shoot using data

This is far more efficient than constantly looking for the target. 100% CPU all of the time can literally slow your robot down. (watchdog, PWM signal sent less) Unless you are using the target to dynamically line yourself up (which would be impressive), I can't think of a good reason to track it periodically.
__________________
All opinions are my own.

Last edited by joelg236 : 14-12-2012 at 15:38.
Reply With Quote
 


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 11:33.

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