Patent ID: 7333651

Claim:
A method of determining a stereo disparity between a reference image and a search image for a reference pixel in the reference image, said method comprising the steps of: (a) calculating a similarity measure between a reference window include a set of pixels centering on the reference pixel and each of a group of search windows in the search image which is of a same shape with the reference window and displaced from the reference window within a predetermined search range, wherein a matching pixel count, which is the number of pixels in the reference window which are similar in intensity to corresponding pixels in a search window, is used as the similarity measure between the reference window and said search window; and (b) determining a displacement between the reference window and a search window which yields a largest similarity measure as the stereo disparity for the reference pixel, wherein R(x,y) represents the reference pixel, the reference window include Wx*Wy pixels centering on R(x,y), Wx and Wy being predetermined numbers, each of the search windows includes Wx*Wy pixels centering on L(x+d, y) which is a pixel in the search image, d ranging from 0 to a predetermined number Sr, and said step (a) includes: (a1) calculating P(x,y,d) values as follows: P(x,y,d)=1, if abs (B R (x,y)−B L (x+d,y))≦Th =0, otherwise, where B R (x,y) and B L (x,y) represent intensity values of R(x,y) and L(x+d, y) and Th is a predetermined threshold; and (a2) determining MPC(x,y,d) values for d=0 to Sr as follows: MPC ⁡ ( x , y , d ) = ∑ w ⁢ P ⁡ ( x , y , d ) wherein w represents the reference window and the search window centering on L(x+d, y); and said step (b) include selecting a d value which yields a largest MPC(x,y,d) value as the stereo disparity for R(x,y).