1. A method, comprising: selecting a reference pixel in a first image; selecting a plurality of candidate pixels in a second image, each candidate pixel having an associated cost function value and an associated disparity value; identifying a plurality of additional pixels in the first image; for each candidate pixel, determining occurrences of disparity values associated with the candidate pixel in the plurality of additional pixels of the first image; associating the selected reference pixel of the first image with one of the candidate pixels of the second image based on the respective cost function values and the occurrences of disparity values of the candidate pixels of the second image; and determining a depth value of the reference pixel as a function of the disparity of the candidate pixel associated with the reference pixel.