Go to Post The best metrics are your own. Do you see the impact of your efforts in your community? Do you feel like you should/could have won Chairman's, but another team was even more deserving? That's how you know FIRST is really working. - dcarr [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-02-2016, 21:57
robert1356 robert1356 is offline
Registered User
AKA: Robert Palmer
FRC #3824 (RoHAWKtics)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Knoxville, TN
Posts: 48
robert1356 is an unknown quantity at this point
USBCamera class setExposureManual() useless for LifeCam HD

I spent a number of hours working on getting the LifeCam HD to do what I wanted. It was easy to get it to display on the SmartDashboard, but I couldn't get any appreciable change when I used the setBrightness() or setExposureManual() commands. I have finally figured out how to make it work and why it doesn't normally.

It doesn't work because the USBCamera class normalizes the exposure range to 0-100 INTEGER. The ACTUAL range is 5 - 20,000 (yes you read that right, 20 THOUSAND). This means that normalized 0 is 5, normalized 1 is actual 200. So I duplicated the USBCamera class in my own code and removed the normalization so I could write raw values. It turns out that anything above about 30 raw is way too bright. This means that the only USBCamera normalized value that would work is 0. I'm keeping my duplicate class and writing raw values. It's a bit of a pain because I can't pass my class references in to CameraServer, but it's the only way to get the kind of exposure control needed.

Anybody know how to report bugs on the WPI code?
  #2   Spotlight this post!  
Unread 04-02-2016, 00:27
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,058
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: USBCamera class setExposureManual() useless for LifeCam HD

Quote:
Originally Posted by robert1356 View Post
Anybody know how to report bugs on the WPI code?
https://usfirst.collab.net/sf/tracke...wpilib/tracker
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Closed Thread


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:43.

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