Go to Post You do use CAD to prototype, Cardboard Aided Design. - Peter Matteson [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 02-04-2010, 02:11
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Setting Camera Resolution

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?
__________________
Reply With Quote
  #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
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
Setting Up 2010 Camera sdlynx C/C++ 8 21-01-2010 17:04
DPI resolution Branden Ghena IT / Communications 6 17-04-2006 14:43
How is everyone setting the angle for the shooter/camera? waialua359 Programming 6 26-01-2006 21:51
setting camera sbwprotoss9 Technical Discussion 0 17-01-2006 21:05
Resolution... Brandon Martus CD Forum Support 9 15-05-2002 18:49


All times are GMT -5. The time now is 18:06.

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