Search code examples
matlabimage-processingcomputer-visionmatlab-cvstdisparity-mapping

Selecting initial seeds of rectified images in matlab


Dear friends I am currently working on a disparity algorithm that visits only a small fraction of disparity space in order to find a semi-dense disparity map. It works by growing from a small set of correspondence seeds. But before that I am implementing the standard region growing algorithm in matlab to understand how it works. The first step of the baseline growing algorithm says that:

Require: Rectified images Il, Ir, initial correspondence seeds S, image similarity threshold. Compute similarity simil(s) for every seed s belonging to S.

Now i cannot understand this step. First of all how do i calculate initial seed points from two rectified images. Should i use SIFT algorithm in matlab or is there any better way to do it.???Can anybody also give me some idea about how does a region growing based disparity calculating algorithm works and whether it is better than SAD or SSD.


Solution

  • If you have rectified images, finding disparity is a matter of calculating costs between pixels in left and right images on the same horizontal line.

    You can take a few selected points in the images (for example the ones that have high gradient or feature points coming from SIFT), set those as roots/seeds of your regions and calculate cost for a range of disparities using SAD/SSD or whatever cost function you prefer.

    Then take the best disparity for a root and assign it to a neighbor. If the cost for that is lower than a predefined threshold, add it to the region otherwise go to next neighbor. When you cannot add any more points the region growing is finished.

    This is a detailed example of the process: http://arxiv.org/pdf/0812.1340.pdf