Accessing controls for onboard camera brightness / exposure / contrast?


I am creating a deep learning project and want to use the onboard TX2 camera to create the training images. However the brightness / contrast autobalance is creating large bright spots on the objects of interest that wash out the images which seem to be present in all lighting conditions.

Is it possible to access the camera settings through code? At the moment I am just using

gst = "nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=
(string)I420, framerate=(fraction)24/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)I420 
! videoconvert ! video/x-raw, format=(string)BGR ! appsink"

(code put on newlines just for readability here, its all one line in the program).


cap = cv2.VideoCapture(gst)


I am a fairly new programmer / new to TX2.


hello RoboRoss,

you could running with argus_camera and specify the exposure time range and gain range to adjust the capture luminance.

Executing Argus Sample Application (argus_camera)
Argus Version: 0.96.2 (multi-process)
Usage: argus_camera [OPTION]... [ACTION]... 


                        sets the exposure time range to RANGE, in nanoseconds.
                        Valid values need to be in the range [58000,184611000,
                        58000,184611000]. Default is '58000,184611000'.
      --gainrange=RANGE sets the gain range to RANGE. Valid values need to be in
                        the range [1,22.2, 1,22.2]. Default is '1,22.2'.

you could also check [L4T Multimedia API Reference Documentation] for more details,