View Single Post
  #2   Spotlight this post!  
Unread 02-04-2010, 10:10
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Setting Camera Resolution

Quote:
Originally Posted by slavik262 View Post
We're having some issues setting the camera resolution. While we're not doing any image analysis, we want to reduce the resolution so that there's less data streaming from the PCVideoServer to our dashboard (we assume some lag may be contributing to a slowdown issue).

Upon examining the source code, we found that the camera task sleeps for one-second intervals in a loop until the cRIO and camera are connected, so making calls to change settings like the resolution is ignored completely during this time. Thinking we'd wait that out and knowing that a fresh image is posted when the camera finally comes online, we slept in our own loop until a fresh image was available, then tried to set the resolution. This still didn't work.

Do any other teams have issues setting the resolution or fixes?
we did not have trouble with this:
Code:
camera.WriteResolution(AxisCameraParams::kResolution_320x240);
and
Code:
camera.WriteResolution(AxisCameraParams::kResolution_160x120);
both worked
EDIT: Is it in the constructor?
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib

Last edited by byteit101 : 02-04-2010 at 10:13.
Reply With Quote