Go to Post Maybe someone should start a FIRST Anonymous meeting to try to help the tragicly addicted... - BiTurboS4 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 12-01-2017, 18:38
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liaison
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 83
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
USBCamera setExposure() not working

Heya. I've been trying to use the USBCamera class' setExposureManual() function (apologies for the slight title type) to lower the exposure of our Microsoft Cinema webcam. The problem I'm having is pretty straightforward; no matter what values I pass it, the exposure doesn't change. The default exposure is way too bright, and it whitewashes almost every light source/bright surface to the point where the it is entirely white. Has anyone else experienced this, and what have you done to fix it? If you've gotten exposure control working with the Microsoft Lifecam 3000, please share that and what workarounds/fixes you had to apply (if any). We were using the Lifecam last season but encountered the same problem.
__________________


2016 Roles: Manipulator, Strategy Co-Lead, Programmer
2016 Orlando Regional: Quarterfinalist (Captain w/ 1557, 5557 and 4352)
2016 Rocket City Regional: Quarterfinalist (w/ 283 and 34), Regional Chairman's Award Winner
2016 Championship: N/A (had fun and was inspired, that's what counts)
-------------
2015 Role: Programmer
2015 GSCR: Quarterfinalist (w/ 4189 and 4026), Regional Chairman's Award Winner
2015 Orlando Regional: Semifinalist (w/ 456 and 86), Imagery Award Winner
2015 Championship: Pit Safety Award Winner

Last edited by Oromus : 12-01-2017 at 18:47.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-01-2017, 19:12
sanghakchun sanghakchun is offline
Registered User
AKA: Andy
FRC #0846 (The Funky Monkeys)
Team Role: Programmer
 
Join Date: May 2016
Rookie Year: 2015
Location: San Jose, CA
Posts: 4
sanghakchun is an unknown quantity at this point
Re: USBCamera setExposure() not working

Our team used the
Code:
v4l2-ctl
command line utility on the roboRIO to control our exposure (and auto-focus) settings on the Lifecam. We had a script that would run it with a set of arguments on every boot, as it wasn't persistent.

I can't remember the specific arguments we used, however, so you'll need to play around a bit with the utility to find the property you need to set
Reply With Quote
  #3   Spotlight this post!  
Unread 12-01-2017, 19:22
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liaison
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 83
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
Re: USBCamera setExposure() not working

Quote:
Originally Posted by sanghakchun View Post
Our team used the
Code:
v4l2-ctl
command line utility on the roboRIO to control our exposure (and auto-focus) settings on the Lifecam. We had a script that would run it with a set of arguments on every boot, as it wasn't persistent.

I can't remember the specific arguments we used, however, so you'll need to play around a bit with the utility to find the property you need to set
I was about to start looking into that, good to hear it works! How did you guys install it onto your roboRIO? Did you cross compile .so files, or...? If you can, can you provide/link the .so files you built/used/installed? Thanks!
__________________


2016 Roles: Manipulator, Strategy Co-Lead, Programmer
2016 Orlando Regional: Quarterfinalist (Captain w/ 1557, 5557 and 4352)
2016 Rocket City Regional: Quarterfinalist (w/ 283 and 34), Regional Chairman's Award Winner
2016 Championship: N/A (had fun and was inspired, that's what counts)
-------------
2015 Role: Programmer
2015 GSCR: Quarterfinalist (w/ 4189 and 4026), Regional Chairman's Award Winner
2015 Orlando Regional: Semifinalist (w/ 456 and 86), Imagery Award Winner
2015 Championship: Pit Safety Award Winner

Last edited by Oromus : 12-01-2017 at 19:31.
Reply With Quote
  #4   Spotlight this post!  
Unread 12-01-2017, 21:13
sanghakchun sanghakchun is offline
Registered User
AKA: Andy
FRC #0846 (The Funky Monkeys)
Team Role: Programmer
 
Join Date: May 2016
Rookie Year: 2015
Location: San Jose, CA
Posts: 4
sanghakchun is an unknown quantity at this point
Re: USBCamera setExposure() not working

No need to compile anything! The binary is already on the roboRIO

One thing to note: In our experiments, either v4l2 or the Lifecam seemed to implement poor exposure control; we were only able to set it to one of the extremes (super high or super low). Thankfully, the super low exposure was able to pick up the retroreflective tape well, and so there was no need to use an exposure in the middle.
Reply With Quote
  #5   Spotlight this post!  
Unread 12-01-2017, 23:44
BenBernard BenBernard is offline
Registered User
FRC #5687 (The Outliers)
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Portland, ME
Posts: 45
BenBernard is on a distinguished road
Re: USBCamera setExposure() not working

With our Lifecam 3000 connected to our Pi last year we used:
Code:
v4l2-ctl --set-ctrl=exposure_auto=1
v4l2-ctl --set-ctrl=exposure_absolute=25
This year we're finding that mechanical exposure control* is a lot more reliable and less fussy.




*Sunglasses. Seriously, not everything is a software problem!
Reply With Quote
  #6   Spotlight this post!  
Unread 13-01-2017, 09:41
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 377
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: USBCamera setExposure() not working

This may seem trivial, but are you using the range the function takes (0-100)?

I would have said try NIVision because that's how we did exposure control last year (not lifecam), but of course it's not in WPILib anymore
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote
  #7   Spotlight this post!  
Unread 13-01-2017, 21:34
Justin Buist Justin Buist is offline
Registered User
FRC #4003 (TriSonics)
Team Role: Mentor
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Allendale, MI
Posts: 27
Justin Buist is an unknown quantity at this point
Re: USBCamera setExposure() not working

Quote:
Originally Posted by euhlmann View Post
This may seem trivial, but are you using the range the function takes (0-100)?
Using the documented range is probably a bad idea. We dorked around with the Lifecam last year and found out, and don't quote me on the numbers, the camera actually supported exposure ranges from -11 to 2.
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 12:34.

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