My question is, is there a way that I can adjust the exposure, or the brightness, of the camera before and after vision process? So that the program process the frames in lower exposure and the driver drives in normal exposure?
That is not a static function, it requires that you have an object of type VideoCapture to use to access it. There’s sample code at the hyperlink.
However, VideoCapture is an alternative technique to using the WPILIB cvSink object, so you’d have to restructure your code to use it. VideoCapture asks the camera for a snapshot. cvSink, I believe, builds a still image from a frame of the incoming stream.