Proper Sequence for Getting Disparity Map from GPU
Hello,
I'm trying to write a GPU implementation of stereo_image_proc and am having some trouble getting a proper disparity map from my GPU. What I'm wondering is if I missed a filtering step. The current program flow goes as follows.
- Load left and right camera calibration data from two YAMLs and store in a Mat for OpenCV to later process
- Run initUndistortRectifyMap from OpenCV on said data to get the map matrices for rectification
- Upload map matrices as well as left and right camera images to GPU
- Rectify the images using gpu::remap
- Compute disparity map using gpu::StereoBM_GPU
- Bring image back to computer from GPU and publish into a ROS topic
I know everything up to and including rectifying the cameras images is correct because the rectified images are the same as those returned by stereo_image_proc. Below are the left and right camera images along with the disparity that is returned from the GPU. I also can't explain why there's a black bar on the left of the disparity map.
I can provide code if needed but I didn't want to clutter up the post if it was as simple as a missing step. Thanks for any help with this matter!