Go to Post Active control of game pieces throughout all stages of your robot's interactions with it is critical. Never let gravity/inertia control the game piece. If you want a game piece to go somewhere, you MAKE it go there. - Jeremy Germita [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 24-02-2009, 21:35
Loubear's Avatar
Loubear Loubear is offline
Registered User
AKA: YLou
FRC #0075 (RoboRaiders)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2006
Location: NJ
Posts: 33
Loubear will become famous soon enoughLoubear will become famous soon enough
Get Camera.vi slowdowns

When I run my camera processing code under a test harness, the get camera.vi runs at around 12-25 ms. However, once I move it into the main code, it starts to run at around 70-100 ms (checked by placing get camera.vi inside a flat sequence, and measuring tick counts before and after its execution). I haven't changed any camera settings, so that factor's out of the question. And the vision processing vis in both my test harness and main code are identical, only the main code incorporates all our other autonomous, teleop, and dashboard code. What could possibly be slowing get camera.vi down?
Reply With Quote
  #2   Spotlight this post!  
Unread 25-02-2009, 04:26
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Get Camera.vi slowdowns

I spent an afternoon tracking down something very similar only to discover that it was due to the lighting in the room. The camera defaults to using auto exposure, and I recommend you leave it on, but when there isn't much light, the camera will lengthen the exposure of each frame and slow the frame rate.

I discovered this mainly because I was wearing a dark shirt.

If you point the camera up at the lights in the room and the timing returns to the original, that is it, and it shouldn't bother you in a location with a reasonable amount of light on the targets.

If pointing it at the lights doesn't fix it, it may be that you have lots of other things going on in parallel. Get.vi also decodes the JPG. That is a pretty lengthy operation, and if your CPU is loaded, it will take longer -- 4x is believable. You probably want to look at parallel loops and make sure they have delays to throttle them. You can also use the System Manager to measure the CPU usage. Make sure to turn off the checkbox in the second tab for more reasonable numbers.

Greg McKaskle
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
Still can't get the camera to track Jill NI LabVIEW 6 15-02-2009 16:31
Adjusting Camera Code to get Better Image Robopanda6 NI LabVIEW 1 31-01-2009 18:55
Camera - how to get out of B&W? pgaston Technical Discussion 9 19-12-2008 09:00
first year team - cant get camera programmed sniggel Programming 12 20-01-2007 02:20
For anyone who doesn't get the camera code..... Jake M Programming 8 16-01-2006 18:56


All times are GMT -5. The time now is 10:37.

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