-
-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The exposure settings, they do nothing. PS3Eye tracking only works in low lighting. #150
Comments
I fixed this problem for Windows in my own fork. I made quite a few changes in my own fork that I'm not sure you want to merge upstream. For example, I removed PS3EYEDriver as a submodule. |
If you have a fix, I'd still be interested in getting it merged upstream. Any chance we could do that? ;) |
I'm having a related issue on Linux. Apparently psmoveapi sets auto exposure to 0 ( With my camera (PS3Eye, using GSPCA/OV534 USB Camera Driver), having auto exposure set to 0 means enabling the auto exposure. I found out that I don't understand what's going on, and wouldn't know how to fix this issue in a clean way. Hope this can help! |
@peoronoob thanks, it did help in my case too! |
Hi, i think i've found a solution, at least for Linux it's working...
to:
and it worked 😍 Hope this helps and the fix could be merged upstream Here's my modified file: psmove_tracker.zip |
PSEye on Linux: Fix auto-exposure setting (Fixes #150)
In OSX, pushing the globe against the iSight camera automatically lowers its exposure, so that works.
When using the PS3Eye in Windows or OSX, tracking only works in low-light conditions. I think many people get this problem. See #141
in
psmove_tracker_new_with_camera(int camera)
, there is a call topsmove_tracker_set_exposure(tracker, Exposure_LOW);
In
psmove_tracker_set_exposure(PSMoveTracker *tracker, enum PSMoveTracker_Exposure exposure)
,target_luminance
is set depending on the exposure input, with Exposure_LOW yieldingtarget_luminance = 0;
Then it calls
tracker->exposure = psmove_tracker_adapt_to_light(tracker, target_luminance);
That function has an algorithm to adapt the exposure setting to yield the target_luminance. When target_luminance==0, it immediately returns with minimum_exposure: 2051;
Then
camera_control_set_parameters(tracker->cc, 0, 0, 0, tracker->exposure, 0, 0xffff, 0xffff, 0xffff, -1, -1);
For reference, here's the function declaration.
camera_control_set_parameters(CameraControl* cc, int autoE, int autoG, int autoWB, int exposure, int gain, int wbRed, int wbGreen, int wbBlue, int contrast, int brightness)
That function is platform specific. In Windows, using the PSEYE, it sets a registry key with these values, then restarts camera capture with openCV. This calls
cvCreateCameraCapture( cameraID );
As far as I can tell, this function does not care what's in the registry.
In OSX, we just get a warning:
psmove_WARNING("Unimplemented: Setting of PS3EYEDriver parameters\n");
The text was updated successfully, but these errors were encountered: