![]() |
Re: Brightness on 2016 vision samples
Jonboy, In my thread, http://www.chiefdelphi.com/forums/sh...d.php?t=142633, that is exactly what I am trying to do - the code is there, the methods are there, but it doesn't seem to be working.
According to the USBCamera class, there is a setExposureManual(int exp) and a setBrightness(int bright) methods, which is what I'm using. Whether they get saved across power cycles or not, I'm not sure, but I don't care because I've connected it to the SmartDashboard and using the Preferences class, it will update to whatever values I save in the preferences file. |
Re: Brightness on 2016 vision samples
Quote:
https://www.microsoft.com/hardware/e...ifecam-hd-3000 |
Re: Brightness on 2016 vision samples
My team has been using NI Vision assistant and we now know how to track objects on the screen; however, we were wondering how to impliment the tracking to motor movement. We want our robot to find the target then auto adjust to score. If anyone has any code, websites, or tips for us that would be great. Thank you.
|
Re: Brightness on 2016 vision samples
Quote:
Edit: sorry, didn't see that this was already answered. |
Re: Brightness on 2016 vision samples
Quote:
|
Re: Brightness on 2016 vision samples
I've been setting exposure on the Lifecam from programs with v4l-utils. You can play with exposure settings using QV4L2 on your development computer, then in your code include a call to v4l2-ctl to set your exposure:
Code:
v4l2-ctl --set-ctrl=exposure_absolute=9 --device=1 |
Re: Brightness on 2016 vision samples
Has ANYONE been able to get DARK images out of the life cam, using ANY method? Images that come anywhere close to being as dark as the sample images for the FRC vision processing? I'm beginning to think that the LifeCam is simply not adjustable to that low of an exposure. I can see changes when I adjust the brightness, but exposure doesn't seem to be changing anything and even with both exposure and brightness set to minimums, the image still looks "normal" (a decent image for the average person to look at) not DARK like is needed for the image processing.
|
Re: Brightness on 2016 vision samples
I just confirmed it is possible - I'm running on a Mac and I just installed "Webcam Settings Panel" from the app store. It allowed me to adjust the exposure to a BLACK image. It also seems to confirm that it is not doing any of this in software, but is actually querying the camera for it's capabilities. The setting options are different between the LifeCam, my laptop iSight and my monitor's iSight, for example, the LifeCam has a backlight compensation slider while the iSights show up as simply on/off options.
I also confirmed that the settings are saved in the camera (or at least in the driver) - quit the settings panel (so I know it wasn't restoring the values) and unplugged the cam and plugged it back in and the image was the same as when I had unplugged it. This is all good news, now if I can just figure out how to use the USBCamera, NIVision.IMAQ or something on the RoboRIO to make these same adjustments, I would be happy. |
Re: Brightness on 2016 vision samples
CORRECTION - I THOUGHT I had closed "Web Cam Settings" - I hadn't. IT was storing and re-storing the settings. I made sure I quit it and tested again. When I replugged the camera, it reverted to Autoexposure
|
Re: Brightness on 2016 vision samples
One of the questions my team had is, can we change the camera settings for autonomous, and have them go back to normal for teleop? We'd like to have dark picture for vision analysis, but standard colors for real time feed for complicated driving. Is this possible?
|
Re: Brightness on 2016 vision samples
It is possible. You just need a routine to reset the camera settings again and have it run at the begining of teleop.
|
Re: Brightness on 2016 vision samples
You don't mention what language you are using, but the camera settings are adjusted using the WPILib camera property sets. The initialization code often has similar set calls.
Greg McKaskle |
Re: Brightness on 2016 vision samples
In Labview, we were able to use the stock VIs for camera control to adjust the settings of the LifeCam. In particular, settings that produced images where the target is brightly lit, but all surroundings are dark were:
Exposure 0 Brightness 20-30 We left the white balance on auto. |
Re: Brightness on 2016 vision samples
Where are the Vision Samples? I'd be interested to see what we should be shooting for.
|
Re: Brightness on 2016 vision samples
The LV examples include about 100 images. I didn't find them immediately, but I'm pretty sure they are on first forge or WPI or another public site.
Greg McKaskle |
| All times are GMT -5. The time now is 23:58. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi