I tried controlling exposure using /dev/v4l-subdev0, when I runI get:Changing exposure using works, but auto-exposure changes it as soon as I try to capture from /dev/video0 (here it changed it to 171, this was with flash (I have set it to 30 beforehand)
I also tried changing it in C:I tried putting it at different points in code but auto exposure changes it right away.
Code:
v4l2-ctl -L --all -d /dev/v4l-subdev0
Code:
Driver Info:Driver version : 6.6.31Capabilities : 0x00000000User Controls exposure 0x00980911 (int) : min=1 max=2446 step=1 default=74 value=171 horizontal_flip 0x00980914 (bool) : default=0 value=0 flags=modify-layout vertical_flip 0x00980915 (bool) : default=0 value=0 flags=modify-layoutCamera Controls wide_dynamic_range 0x009a0915 (bool) : default=0 value=0 flags=modify-layout camera_orientation 0x009a0922 (menu) : min=0 max=2 default=2 value=2 (External) flags=read-only0: Front1: Back2: External camera_sensor_rotation 0x009a0923 (int) : min=180 max=180 step=1 default=180 value=180 flags=read-onlyImage Source Controls vertical_blanking 0x009e0901 (int) : min=40 max=8387184 step=1 default=1198 value=1198 horizontal_blanking 0x009e0902 (int) : min=5520 max=5520 step=1 default=5520 value=5520 flags=read-only analogue_gain 0x009e0903 (int) : min=112 max=960 step=1 default=112 value=112 red_pixel_value 0x009e0904 (int) : min=0 max=4095 step=1 default=4095 value=4095 green_red_pixel_value 0x009e0905 (int) : min=0 max=4095 step=1 default=4095 value=4095 blue_pixel_value 0x009e0906 (int) : min=0 max=4095 step=1 default=4095 value=4095 green_blue_pixel_value 0x009e0907 (int) : min=0 max=4095 step=1 default=4095 value=4095 notify_gains 0x009e0909 (int) : min=1 max=65535 step=1 default=256 dims=[4] flags=has-payloadImage Processing Controls link_frequency 0x009f0901 (intmenu): min=0 max=0 default=0 value=0 (450000000 0x1ad27480) flags=read-only0: 450000000 (0x1ad27480) pixel_rate 0x009f0902 (int64) : min=585600000 max=585600000 step=1 default=585600000 value=585600000 flags=read-only test_pattern 0x009f0903 (menu) : min=0 max=4 default=0 value=0 (Disabled)0: Disabled1: Color Bars2: Solid Color3: Grey Color Bars4: PN9 digital_gain 0x009f0905 (int) : min=256 max=65535 step=1 default=256 value=256
Code:
v4l2-ctl -d /dev/video0 -c exposure=30
I also tried changing it in C:
Code:
void set_exposure(int exposure){ //ms? int control_fd = open("/dev/v4l-subdev0", O_RDWR); struct v4l2_control ctrl; ctrl.id = V4L2_CID_EXPOSURE; ctrl.value = exposure; if(ioctl(control_fd, VIDIOC_S_CTRL, &ctrl) == -1){ perror("Setting Exposure"); cleanup(2); } close(control_fd);}
Statistics: Posted by m4rkohr — Mon Jul 15, 2024 10:35 am