Tool/software:
Hello Team,
I'm trying to control parameters of the imx219 sensor, such as exposure and autofocus.
To use the camera, I'm using gstreamer with the pipeline:
pipeline_description = (
f"v4l2src device={source} ! "
f"video/x-bayer, width={width}, height={height}, format={format}, framerate={framerate}/1 ! "
"appsink name=appsink"
)
The command v4l2-ctl -d /dev/v4l-imx219-subdev0 --list-ctrls gave the output:
User Controls
exposure 0x00980911 (int) : min=4 max=1759 step=1 default=1600 value=1759
horizontal_flip 0x00980914 (bool) : default=0 value=0 flags=modify-layout
vertical_flip 0x00980915 (bool) : default=0 value=0 flags=modify-layout
Image Source Controls
vertical_blanking 0x009e0901 (int) : min=4 max=64455 step=1 default=683 value=683
horizontal_blanking 0x009e0902 (int) : min=1528 max=1528 step=1 default=1528 value=1528 flags=read-only
analogue_gain 0x009e0903 (int) : min=0 max=232 step=1 default=0 value=0
red_pixel_value 0x009e0904 (int) : min=0 max=1023 step=1 default=1023 value=1023
green_red_pixel_value 0x009e0905 (int) : min=0 max=1023 step=1 default=1023 value=1023
blue_pixel_value 0x009e0906 (int) : min=0 max=1023 step=1 default=1023 value=1023
green_blue_pixel_value 0x009e0907 (int) : min=0 max=1023 step=1 default=1023 value=1023
Image Processing Controls
link_frequency 0x009f0901 (intmenu): min=0 max=0 default=0 value=0 (456000000 0x1b2e0200) flags=read-only
pixel_rate 0x009f0902 (int64) : min=182400000 max=182400000 step=1 default=182400000 value=182400000 flags=read-only
test_pattern 0x009f0903 (menu) : min=0 max=4 default=0 value=0 (Disabled)
digital_gain 0x009f0905 (int) : min=256 max=4095 step=1 default=256 value=256
User Controls
exposure 0x00980911 (int) : min=4 max=1759 step=1 default=1600 value=1759
horizontal_flip 0x00980914 (bool) : default=0 value=0 flags=modify-layout
vertical_flip 0x00980915 (bool) : default=0 value=0 flags=modify-layout
Image Source Controls
vertical_blanking 0x009e0901 (int) : min=4 max=64455 step=1 default=683 value=683
horizontal_blanking 0x009e0902 (int) : min=1528 max=1528 step=1 default=1528 value=1528 flags=read-only
analogue_gain 0x009e0903 (int) : min=0 max=232 step=1 default=0 value=0
red_pixel_value 0x009e0904 (int) : min=0 max=1023 step=1 default=1023 value=1023
green_red_pixel_value 0x009e0905 (int) : min=0 max=1023 step=1 default=1023 value=1023
blue_pixel_value 0x009e0906 (int) : min=0 max=1023 step=1 default=1023 value=1023
green_blue_pixel_value 0x009e0907 (int) : min=0 max=1023 step=1 default=1023 value=1023
Image Processing Controls
link_frequency 0x009f0901 (intmenu): min=0 max=0 default=0 value=0 (456000000 0x1b2e0200) flags=read-only
pixel_rate 0x009f0902 (int64) : min=182400000 max=182400000 step=1 default=182400000 value=182400000 flags=read-only
test_pattern 0x009f0903 (menu) : min=0 max=4 default=0 value=0 (Disabled)
digital_gain 0x009f0905 (int) : min=256 max=4095 step=1 default=256 value=256
After doing some research, the only way I found to change the exposure was by doing:
os.system("v4l2-ctl -d /dev/v4l-imx219-subdev0 --set-ctrl=exposure=1000")
Is there a way to control the exposure from the pipeline, and to control the autofocus?
Kind regards,
Joaquin Perez