简体   繁体   中英

Dense dispairity map generation in OpenCV with ORB

I am trying to generate a dense disparity map with OpenCV's ORB detectors. I followed this tutorial and understand how it generates its disparity map.

However, I don't understand how the code in the tutorial generates a dense disparity map because I cannot find any portion of the code that calculates the disparity of pixels that are not key points.

By replicating the code in the tutorial with Python, I got an accurate disparity map of only the pixels at the key point, but not the dense disparity map of the whole image, can anyone explain how did the tutorial find the dense disparity map of the whole image with the code?

I hope this answers your question. All the pixels in the image are keypoints. The set of keypoints is initialized manually to contain all the pixels in the image. This is done in the following lines copied from the website you refered to:

for (int i = 0; i < img_left.cols; i++) {
    for (int j = 0; j < img_left.rows; j++) {
        kpl.push_back(KeyPoint(i,j,1));
        kpr.push_back(KeyPoint(i,j,1));
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM