Go to Post The awards may or may not come...but the real trophies are the students. - David Brinza [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 11-02-2010, 21:44
wywern209 wywern209 is offline
Registered User
FRC #2202
 
Join Date: Jan 2009
Location: brookfield,WI
Posts: 4
wywern209 is an unknown quantity at this point
camera black & white

We have modified our color level & brightness so that the camera only displays black and white images. We were wondering how to change that back to color. When we turn our camera off and on, reboot the robot, it still displays black & white images... Are there any suggestions?

Thanks!

Code:
HSLImage image; // Create and set up a camera instance 
		AxisCamera &camera = AxisCamera::getInstance(); 
		camera.writeResolution(k160x120); 
		camera.writeBrightness(0);
		
		myRobot.Drive(0.0, 0.0);
		Toggler cameraBrightness = new Toggler();
		Toggler cameraBrightness2 = new Toggler();
		Toggler cameraBrightness3 = new Toggler();
		Toggler cameraBrightness4 = new Toggler();
		Toggler cameraColorLevel = new Toggler();
		int cBrightness = 0;
		int cColorLevel = 0;
while (IsOperatorControl())
		{
			camera.GetImage(image.image); 
			
			if (cameraBrightness.DoesNewStateToggle(stick.GetRawButton(2)))
			{
				cBrightness++;
				camera.writeBrightness(cBrightness);
			}
			if (cameraBrightness2.DoesNewStateToggle(stick.GetRawButton(3)))
			{
				cBrightness--;
				camera.writeBrightness(cBrightness);
			}
			if (cameraBrightness3.DoesNewStateToggle(stick.GetRawButton(4)))
			{
				cColorLevel++;
				camera.writeColorLevel(cColorLevel);
			}
			if (cameraBrightness4.DoesNewStateToggle(stick.GetRawButton(5)))
			{
				cColorLevel--;
				camera.writeColorLevel(cColorLevel);
			}}
Reply With Quote
  #2   Spotlight this post!  
Unread 12-02-2010, 17:36
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,748
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: camera black & white

I'm not sure I fully understand the question. You seem to be programmatically setting the brightness and colorLevel. You may want to insert temporary printfs to display the colorLevel value.

If you've set other camera settings interactively that you'd like to reset, you can log into the camera using a web browser and use the camera utility to view and change settings. You can also use Vision assistant to change the typical settings.

Both of these interactive edits involve connecting the camera to a PC with IP of 192.168.1.xx so it can communicate with the camera which is at 90. You can use the login of FRC and password of FRC if using the http login.

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
pic: Chief Delphi in Black and White! sanddrag Extra Discussion 16 12-04-2005 12:55
It's not black and white, its COLORED CMU lines! Hershey Programming 1 29-01-2005 17:06
White Paper Discuss: Universities & FIRST CD47-Bot Extra Discussion 1 22-06-2004 00:31
Does anybody have a cad drawing or a black and white picture of this years field? Alex Cormier General Forum 3 28-05-2004 11:46
Black and white image files into AutoCAD? A-Baum Inventor 7 24-04-2004 00:43


All times are GMT -5. The time now is 13:05.

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