Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Arduino IDE Spresense manual exposure timing
-
I see from the update lists that v1.1.1 et seq. supports manual exposure timing, but I cannot find any examples or coding other than the .setAutoExposure(false); command in the API.
Can someone point me to an example or project that is controlling manual exposure timing? and use the shutter priority exposure control to get down to 1/8s (Long AE mode)?
thank you.
-
Hi @hintzc said
I looked into this and it sees you're right about the arduino library missing the absolute exposure time set function.
I have not found a project using manual exposure time but I looked into the Nuttx driver handling for the isx012 camera chip. Extracting information from the driver I added a function to the Camera driver:
Campera.cpp:
CamErr CameraClass::setAbsoluteExposure(uint32_t exposure_time_ms) { return set_ext_ctrls(V4L2_CTRL_CLASS_CAMERA, V4L2_CID_EXPOSURE_ABSOLUTE, exposure_time_ms); }
Camera.h
CamErr setAbsoluteExposure(uint32_t exposure_time_ms);
In the camera sketch you find under File->Examples->Camera
Serial.println("call takePicture()"); /*Following three lines are new*/ Serial.println("Setting autoexp and absolut exp"); Serial.println(theCamera.setAutoExposure(false)); Serial.println(theCamera.setAbsoluteExposure(1)); CamImage img = theCamera.takePicture();
Setting the exposure time to 1 gave me very dark images so and increasing it gave very light images so I it seems that this fix would do it for you.
Br
Karl Komierowski