Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between a disparity map and a disparity image in stereo matching?

I am new to stereo matching. I couldn't understand the concept of disparity. What are a disparity map and disparity image, and what is the difference between them?

like image 691
user2522560 Avatar asked Jul 12 '13 04:07

user2522560


People also ask

What is a disparity map in stereo images?

The disparity is the apparent motion of objects between a pair of stereo images. To experience this, try closing one eye and then rapidly open it while closing the other one. You will note that closer objects will move significantly while objects further away will move very little.

What is a disparity map?

Disparity map refers to the apparent pixel difference or motion between a pair of stereo images. To experience this, try closing one of your eyes and then rapidly close it while opening the other. Objects that are close to you will appear to jump a significant distance while objects further away will move very little.

What is difference between disparity map and depth map?

Disparity is the horizontal displacement of a point's projections between the left and the right image. Whereas, depth refers to the z coordinate (usually z) of a point located in the real 3D world (x, y, z).

What is disparity in machine vision?

In computer vision, binocular disparity refers to the difference in coordinates of similar features within two stereo images. A similar disparity can be used in rangefinding by a coincidence rangefinder to determine distance and/or altitude to a target.


2 Answers

Disparity

Disparity refers to the distance between two corresponding points in the left and right image of a stereo pair. If you look at the image below you see a labelled point X (ignore X1, X2 & X3). By following the dotted line from X to OL you see the intersection point with the left hand plane at XL. The same principal applies with the right-hand image plane.

enter image description here

If X projects to a point in the left frame XL = (u,v) and to the right frame at XR = (p,q) you can find the disparity for this point as the magnitude of the vector between (u,v) and (p,q). Obviously this process involves choosing a point in the left hand frame and then finding its match (often called the corresponding point) in the right hand image; often this is a particularly difficult task to do without making a lot of mistakes.

Disparity Map/Image

If you were to perform this matching process for every pixel in the left hand image, finding its match in the right hand frame and computing the distance between them you would end up with an image where every pixel contained the distance/disparity value for that pixel in the left image.

Example

Given a left image

enter image description here

And a right image

enter image description here

By matching every pixel in the left hand image with its corresponding pixel in the right hand image and computing the distance between the pixel values (the disparities) you should end up with images that look like this:

enter image description here

This bottom image is known as a disparity image/map. A useful topic to read about when performing stereo matching is rectification. This will make the process of matching pixels in the left and right image considerably faster as the search will be horizontal.

like image 62
Max Allan Avatar answered Oct 20 '22 00:10

Max Allan


One of the easiest methods to understand the disparity would be to blink your eyes, one at a time, alternating between your left and right eye. If you observe, the objects closer to you would appear to jump about their position more than the objects further away. This shift would become negligible as the objects move away. Therefore, in the disparity map, the brighter shades represent more shift and lesser distance from the point of view (camera). The darker shades represent lesser shift and therefore greater distance from the camera.

like image 29
Saania Avatar answered Oct 19 '22 23:10

Saania