Go to Post The real question is has anybody ever learned anything actionable from a game hint or red herring. - Joe Ross [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 24-01-2011, 16:46
Team 3705's Avatar
Team 3705 Team 3705 is offline
Registered User
FRC #3705
 
Join Date: Jan 2011
Location: Canada
Posts: 34
Team 3705 is an unknown quantity at this point
Code for Camera

Hi, I would like to know if I could get some code on how to get the camera working and receiving an image, I seem to not find any code anywhere.

Also, the search function takes too long, but still havent found code from the search function regarding the camera.

Any help will be appreciated!

-Team 3705
Reply With Quote
  #2   Spotlight this post!  
Unread 24-01-2011, 17:29
kwojcik kwojcik is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2009
Location: California
Posts: 24
kwojcik is a splendid one to beholdkwojcik is a splendid one to beholdkwojcik is a splendid one to beholdkwojcik is a splendid one to beholdkwojcik is a splendid one to beholdkwojcik is a splendid one to behold
Re: Code for Camera

Basic functionality for the camera can be found in the AxisCamera class. You'll need to get a reference to the camera (don't try to construct your own object) and use the getImage function of your choice. I think getting an AxisCamera reference will also start the task that serves images to the dashboard so you can easily see what the camera sees
Reply With Quote
  #3   Spotlight this post!  
Unread 24-01-2011, 18:30
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Code for Camera

There is an example in Windriver, called "2010 Vision Demo"
Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2011, 16:39
normpearii normpearii is offline
Fledgling Programmer
AKA: Norman Pearson II
FRC #2603 (Highland Robotics Team)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Medina, Ohio
Posts: 6
normpearii is an unknown quantity at this point
Send a message via ICQ to normpearii Send a message via AIM to normpearii Send a message via MSN to normpearii Send a message via Yahoo to normpearii
Re: Code for Camera

Make sure the camera is plugged into the cRio with a CROSS-OVER cabel and run the vision example code. If your camera works, the example will display.
Reply With Quote
  #5   Spotlight this post!  
Unread 25-01-2011, 20:07
Aaron691 Aaron691 is offline
Registered User
AKA: A-A-RON
FRC #0691 (Project 691 Robotics)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Stevenson Ranch
Posts: 20
Aaron691 is an unknown quantity at this point
Re: Code for Camera

can some one pleae post or email me code for Java to get the camera to display on the FRC Dashbroad. My email is mydrum9@gmail.com. also can you please tell me what i need to do to get the camera just working. Do i need to change the password or username of the camera?
Reply With Quote
  #6   Spotlight this post!  
Unread 31-01-2011, 19:23
ElliotCourant's Avatar
ElliotCourant ElliotCourant is offline
Elliot Courant
AKA: Elliot Courant
FRC #3038 (ICE Robotics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Minnesota
Posts: 19
ElliotCourant is an unknown quantity at this point
Re: Code for Camera

Try This

Code:
class RobotDemo : public SimpleRobot
{
HSLImage image;
void Autonomous(void)
	{
		myRobot.SetSafetyEnabled(false);

		AxisCamera &robocam = AxisCamera::GetInstance();
		robocam.WriteResolution((AxisCamera::Resolution_t)3);
		robocam.WriteBrightness(0);
}

void OperatorControl(void)
	{
	
		myRobot.SetSafetyEnabled(true);
		AxisCamera &robocam = AxisCamera::GetInstance();
		robocam.WriteResolution((AxisCamera::Resolution_t)3);
		robocam.WriteBrightness(0);
}
__________________
"Error, Cannot Find Back-End!" -WindRiver C++ Error
"If you aren't getting any errors while you are programming, then you are doing something wrong." -Elliot Courant
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


All times are GMT -5. The time now is 00:55.

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