Go to Post Downsides: it's highly toxic and recognized as a carcinogen in CA. Upsides: Basically everything else - lethc [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 20-01-2009, 09:54
j_johnson j_johnson is offline
Registered User
FRC #0226 (Hammerheads)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Shelby Township, MI
Posts: 10
j_johnson is an unknown quantity at this point
Re: Image processing and performance

If you are using a class inherited from IterativeRobot, note that there is no built in delay, so it will use as much processing power as possible, the kernel splitting it equally with tasks of the same priority. To correct this, you can add a taskDelay() call in each of the XXXContinuous functions.

The delay should be long enough to cede as much processing power to other threads as possible without being so long that you are missing calls to the XXXPeriodic functions. (Assuming you are not using the XXXContinuous for anything time sensitive.) Make sure to include taskLib.h which declares this method.

Here is some documentation on VxWorks tasks if you are interested in reading more.
Reply With Quote
  #2   Spotlight this post!  
Unread 20-01-2009, 13:32
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
Re: Image processing and performance

You also probably want to take a look at your vision processing system and see if anything can be sped up there. Using the lowest resolution at which you can still identify the target will be helpful, as well as using a nested structure for target identification(for example, only look for a pink flag if a suitable green flag has already been found)
__________________
Get yer robot source code here!
Reply With Quote
  #3   Spotlight this post!  
Unread 20-01-2009, 16:48
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: Image processing and performance

Quote:
Originally Posted by j_johnson View Post
If you are using a class inherited from IterativeRobot, note that there is no built in delay, so it will use as much processing power as possible, the kernel splitting it equally with tasks of the same priority.
Note that vxWorks will not, by default, do round-robin scheduling of tasks with the same priority. If there are 3 tasks with priority 100, and one of them never blocks (timed wait, request unavailable resource, etc.) then that task will forever be the only priority 100 task to run. Lower priority tasks will be locked out -- of course, higher priority tasks can still run.
To enable round-robin scheduling, the user code needs to call kernelTimeSlice() and pass it a tick count.
Those interested in knowing more about this stuff should use the Workbench HELP facility -- Help -> Help Contents.
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
[not-FIRST] Camera Image Processing Greg Marra Programming 11 11-03-2008 21:10
Image Processing on mouth ROI tommy_chai Programming 0 20-11-2007 08:32
thoughts about image processing 3dude_2231 Technical Discussion 5 12-11-2007 13:26
Critique my image processing program... Salik Syed Programming 13 29-06-2006 16:57
STAMP (Statistical Team Analysis of Match Performance) is off and running! Ethulin Scouting 6 04-02-2006 23:12


All times are GMT -5. The time now is 09:29.

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