I am trying to adjust the brightness and contrast of an RGB image but the output is not what I expect.
The function is callbacked from createTrackbar() function with