Using exposuretimerange/gainrange should be able do it.
Check the cap by gst-inspect-1.0 nvarguscamerasrc
exposuretimerange : Property to adjust exposure time range in nanoseconds
Use string with values of Exposure Time Range (low, high)
in that order, to set the property.
eg: exposuretimerange="34000 358733000"
flags: readable, writable
String. Default: null
gainrange : Property to adjust gain range
Use string with values of Gain Time Range (low, high)
in that order, to set the property.
eg: gainrange="1 16"
flags: readable, writable
String. Default: null
If you require to lock the exposure and white balance. Please try with the following nvarguscamerasrc properties:
aelock : set or unset the auto exposure lock
flags: readable, writable
Boolean. Default: false
awblock : set or unset the auto white balance lock
flags: readable, writable
Boolean. Default: false
If you are getting a different image with the same code, could be caused by the ISP processing the same scene at different times. By locking exposure and white balance, you should get a more stable result.
In regards to your other question. Could you please explain to me what is photo mode ? Or what is it that you want to achieve.
best regards,
Andres Campos
Embedded Software Engineer www.ridgerun.com
When I use ae lock and awb lock, I am getting the following error.
GStreamer-CRITICAL **: 16:06:54.235: gst_mini_object_set_qdata: assertion ‘object != NULL’ failed
Regarding photo mode, instead of getting a stream of frames, I am trying to just receive 1 frame. In opencv, if use VideoCapture(), it gets a stream of frames. Instead, I want to use imread() and get only 1 frame.
I am getting empty frames when I run this. I need the sensor_mode to be 1.
also I came across this –capture-gap Number of milliseconds between successive image/video capture. Default = 250 msec (use with --automate and --capture-auto only)