Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

Exposure tuning (nightpreview) #192

Open
nopmop opened this issue Mar 1, 2019 · 7 comments
Open

Exposure tuning (nightpreview) #192

nopmop opened this issue Mar 1, 2019 · 7 comments

Comments

@nopmop
Copy link

nopmop commented Mar 1, 2019

Problem
my problem is dark images - I'm aware of the FPS<->light relationship (as detailed at #12) and of possible workarounds (like using an RTSP server as detailed here #165, which hammers the CPU considerably though).

Solution i'd like
Being able to tune the mmal exposure parameter (set to nightpreview for example) from kerberosio would be nice.

Question
Is this going to be contemplated for a future release? Where to look in the code to submit a PR?

@nopmop
Copy link
Author

nopmop commented Mar 16, 2019

Bump. Any help?

@cedricve
Copy link
Member

cedricve commented Mar 18, 2019

hey @nopmop, this is a hard one. You will need to consider looking into this https://github.com/dridri/OpenMaxIL-cpp

@gbus
Copy link

gbus commented Jul 28, 2019

Hi @cedricve
I have just added support for setExposureControl in https://github.com/dridri/OpenMaxIL-cpp.
I have tested it from kerberos.io with this simple change, but I guess that it takes you 5 minutes to make it configurable from the raspicam settings in capture.xml:

diff --git a/src/kerberos/capture/RaspiCamera.cpp b/src/kerberos/capture/RaspiCamera.cpp
index 07c1a97..f17ef9c 100755
--- a/src/kerberos/capture/RaspiCamera.cpp
+++ b/src/kerberos/capture/RaspiCamera.cpp
@@ -218,7 +218,7 @@ namespace kerberos
 				state.camera->setSaturation(m_saturation);
 				state.camera->setContrast(m_contrast);
 				state.camera->setSharpness(m_sharpness);
-				//state.camera->setExposureControl(Camera::ExposureControlOff);
+				state.camera->setExposureControl(Camera::ExposureControlNight);
 
 				if(m_angle > 0)
 				{

Thanks

@cedricve
Copy link
Member

super cool @gbus, do you have any results already?

@gbus
Copy link

gbus commented Jul 28, 2019

Yes, with ExposureControlNight the image from a room with little light looked very bright, while with ExposureControlSnow was totally dark.
:-)

@cedricve
Copy link
Member

Cool ! and what about the recording speed, just curious. How much FPS do you get.
Will definitely check this out myself. Great job!!

@gbus
Copy link

gbus commented Jul 28, 2019

I tried 1,3,5,10,20,30 fps, where at 10fps the exposure was similar to what I could see with my bare eyes. I would consider 1, 3 and 5fps like 3 possible level of exposure improvement (and image quality).
Here are the sample pictures:

01fps
03fps
05fps
10fps
20fps
30fps

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants