as far as i know if you are (at the moment you are capturing the image) using v4l2 you can adjust the brightness and contrast of the camera itself(unless you are using pipewire which then im not even sure what to do)