x-treme
x-treme

Reputation: 1636

Finding the corresponding pixel using disparity maps

I have a stereo pair of images and their ground truth disparity. The gray level in the disparity map tells me how far the object is. How do I use this gray level to find the corresponding pixel of a pixel?

I am sure that the gray levels are not the displacement along the x axis because a pixel in the ground truth disparity map of the left image at (50, 4) has a disparity value of 70 (which cannot the displacement along the x axis for the corresponding pixel in the right image because, the co-ordinate would then be (-20, 4) which is not valid !!)

I got my images and the ground truth from the middlebury dataset

How do I translate these values to find the position of the corresponding pixel in the other image ?

P.S. : The image motion is purely horizontal

Upvotes: 1

Views: 1347

Answers (2)

kuskus
kuskus

Reputation: 176

By definition from here, disparity map tells the shift needed of a pixel in one image to the corresponding pixel in another image of a stereo image pair. Therefore, the first approach you describe is correct to get the corresponding pixel from the disparity map. That means (50, 4) will give (70, 4) or (-20, 4) if the disparity value in the pixel is 70, depends on how you choose 50 is left or right image.

Upvotes: -1

x-treme
x-treme

Reputation: 1636

I think I have figured out the answer !!

I was using the downsized images. I then downloaded the original images and the disparity maps and now they correspond perfectly to each other.

Will get back with how to work with downsized images as soon as I figure it out

Upvotes: 2

Related Questions