Depth image/disparity

the color mode of the image that is being read from the camera is "rgb8" and basically converting it to GRAY imageL_new=cv.cvtColor(imageLeft, cv.COLOR_BGR2GRAY) and inputting into stereo.compute(). i Dont understand what to change here exactly.
Thank you for your response.