Hi, I’m trying to use the VisionWorks tool to calculate the disparity map of a stereo vision.
I read the documentation and I wrote a short code to get the map but the results are not good, so I decided to try with the images that OpenCV provides and do a test with those but the result is an all black image of disparity.
Sorry if I put external links but I could only upload one photo in the post, anyway they are the aloeL.jpg and aloeR.jpg images of the OpenCV stereo_match example
Left:
https://ibb.co/t2dw0mT
Right:
https://ibb.co/7gYQ04B
This is the result
These are the parameters of the function:
nvxuSemiGlobalMatching( context_, left_gray, right_gray, disparity_short, 0, // min_disparity 64, // max_disparity 8, // P1 109, // P2 5, // sad 0, // ct_win_size 1, // hc_win_size 31, // bt_clip_value 32000, // max_diff 0, // uniqueness_ratio 7, // scanlines_mask 2); //flags
For now I use OpenCV to show it, convert vx_image to Mat and then use these lines of code to show it:
cv::normalize(disp,disp_8,0,255,cv::NORM_MINMAX,CV_8U); cv::imshow("Disp",disp_8); cv::waitKey(0);