Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   USBCamera setExposure() not working (http://www.chiefdelphi.com/forums/showthread.php?t=153547)

Oromus 12-01-2017 18:38

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.

sanghakchun 12-01-2017 19:12

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 :P

Oromus 12-01-2017 19:22

Re: USBCamera setExposure() not working
 
Quote:

Originally Posted by sanghakchun (Post 1630226)
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 :P

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!

sanghakchun 12-01-2017 21:13

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.

BenBernard 12-01-2017 23:44

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!

euhlmann 13-01-2017 09:41

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

Justin Buist 13-01-2017 21:34

Re: USBCamera setExposure() not working
 
Quote:

Originally Posted by euhlmann (Post 1630451)
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.


All times are GMT -5. The time now is 12:34.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi