UFOID / UFO-Detector

UFO Detector
http://ufoid.net/
GNU General Public License v3.0
54 stars 8 forks source link

Night detection is incorrect when camera has automatic brightness adjustment #32

Closed hekkup closed 8 years ago

hekkup commented 8 years ago

Some camera models such as old Logitech QuickCam have brightness auto-adjustment which causes night detection to give incorrect result.

UFOID commented 8 years ago

Can you please explain the issue further? My camera also adjusts the brightness automatically but that hasn't caused a problem for me. In a dark night the frame from the webcam still shows a black/dark view

hekkup commented 8 years ago

If I cover the camera lens completely, the image becomes slowly lighter instead of pitch black, reaching the lightness shown in the screenshot. When starting the detection process, the light measurement says total light 102. From ActualDetector::checkIfNight() I see the threshold is 100 so the app thinks it's not night. ufo-detector-camera-auto-brightness-160523

UFOID commented 8 years ago

Ok I can see what you mean now. My view during the night is quite different. Seeing all the image noise I wonder if the detection during the night would still work with that camera.

UFOID commented 8 years ago

I close this since it seems to be a specific camera model issue and I don't really know how to deal with the issue.

hekkup commented 8 years ago

This issue can be dealt with by using exposure and gain values from the camera. If the values are high, it can be concluded it's night. It's possible to get the values at least in Linux with v4l2 stuff.

UFOID commented 8 years ago

That would be a good solution but can we assume the value will always be correct for any webcam device? I have my doubts with that. Also, I am not sure how straight forward a Windows implementation would be