Locate specific pixel from left and right view on the disparity map

asked 2020-09-01 18:40:23 -0500

becca gravatar image

updated 2020-09-01 18:41:04 -0500

Hi everyone.

I have performed camera calibration and image rectification, and was able to obtain a pretty good and stable disparity map.

For my project, I need to locate specific pixels from the left and right view in the disparity map.

So I am using a chessboard, through which thanks to the openCV function FindChessboardCorners I am able to locate the pixel coordinates (X, Y) of each corner in both the left and right view.

Now, let's say out of all those corners I select only one. I do have the pixel coordinates of that corner for both the left and right view, but how do I find its X and Y PIXEL COORDINATES on the corresponding disparity map? I would be able to find the pixel depth, but I need to track that specific pixel on the disparity map so I need Pixel coordinates and not real world coordinates.

I am a bit confused and can't really understand how to do it. Any help would be greatly appreciated.

Thank you!

edit retag flag offensive close merge delete

Comments

For a pixel from the left camera PL(X,Y) the corresponding pixel in the disparity map has the same coordinates PD(X,Y). The position of the corresponding pixel in the right image is PR(X+dx,Y), where dx=PD(X,Y).

kbarni gravatar imagekbarni ( 2020-09-02 04:20:22 -0500 )edit

I can't believe I didn't think of this. Thank you so much!

becca gravatar imagebecca ( 2020-09-02 10:05:16 -0500 )edit