Go to Post Oh no, do I see a new reality TV show coming? "Dancing with the FIRST Stars"??? :ahh: - KathieK [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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: 47
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?
 


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 09:39.

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