I am trying to write a simple C program to get a frame from the webcam. Before that I used opencv. When using opencv the image from the webcam was just right. My program gets an image from the webcam but the webcam settings seem to be wrong (brightness, saturation, hue, contrast, etc.) I tried to play around and to adjust them but no result. I was wondering internally, how does opencv set these parameters?