-1

I'm using the graph-cuts cvFindStereoCorrespondenceGC() function:

void cvFindStereoCorrespondenceGC(const CvArr *left, const CvArr *right, CvArr *disparityLeft, CvArr *disparityRight, CvStereoGCState *state, int useDisparityGuess = 0).

My question is: what is the disparityLeft and disparityRight maps that I am supposed to get?

Shouldn't there only be one disparity map like what cvFindStereoCorrespondenceBM() gives you?

cvFindStereoCorrespondenceBM(const CvArr *left, const CvArr *right, CvArr *disparity, CvStereoBMState *state)

David
  • 11
  • 2
  • 4

1 Answers1

0

Disparity left is giving you the locations of the pixels of the left image on the right. Disparity right is giving you the locations of the pixels of the right image on the left.

I guess the real answer to your question is: if you match left to right that will give you one disparity map and if you map right to left, that will give you another disparity map.

EDIT: "matching them" is simpler than it sounds: assume that at (i,j) we have a left disparity of d, that means means that IL(i,j) matches IR(i,j-d) and vice-versa.

carlosdc
  • 12,022
  • 4
  • 45
  • 62