jzbontar/mc-cnn

problem about function sgm2 in adcensus.cu

Sarah20187 opened this issue · 2 comments

near line 579, the code as follows:


for (int i = 256; i > 0; i /= 2) {
		if (d < i && d + i < size3 && output_min[d + i] < output_min[d]) {
			output_min[d] = output_min[d + i];
		}
		__syncthreads();
	}

Should the initial number of i to be the max disparity here?

I haven't looked at this code for awhile, but it looks correct. I think i should be set to the largest power of two that is smaller than the highest max_disparity. I believe the highest max_disparity is 400 for some Middlebury samples, so setting i to 256 seems okay.

Thank you!