Kitti images seem to be of typ CV_8UC3 so they should be converted to CV_8UC1 first
No need to convert, there was a mistake in the flag in imread which should have been 0 instead of 1 to read image as grayscale
Passing Left and Right images edge mask to dispkitti algorithm. Also setting the value for edge mask to 255 in edge file
bitwise_or changed to bitwise_and