Skip to content
Snippets Groups Projects
Commit 15a03573 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Adapt window size

parent 12d4c15b
No related branches found
No related tags found
No related merge requests found
Pipeline #16978 passed
......@@ -227,13 +227,21 @@ void ftl::cuda::correspondence(
//printf("COR SIZE %d,%d\n", p1.width(), p1.height());
switch (func) {
/*switch (func) {
case 0: corresponding_point_kernel<16,0><<<gridSize, blockSize, 0, stream>>>(d1, d2, c1, c2, screen, conf, mask, pose2, cam1, cam2, params); break;
case 1: corresponding_point_kernel<16,1><<<gridSize, blockSize, 0, stream>>>(d1, d2, c1, c2, screen, conf, mask, pose2, cam1, cam2, params); break;
case 2: corresponding_point_kernel<16,2><<<gridSize, blockSize, 0, stream>>>(d1, d2, c1, c2, screen, conf, mask, pose2, cam1, cam2, params); break;
case 3: corresponding_point_kernel<16,3><<<gridSize, blockSize, 0, stream>>>(d1, d2, c1, c2, screen, conf, mask, pose2, cam1, cam2, params); break;
case 4: corresponding_point_kernel<16,4><<<gridSize, blockSize, 0, stream>>>(d1, d2, c1, c2, screen, conf, mask, pose2, cam1, cam2, params); break;
case 5: corresponding_point_kernel<16,5><<<gridSize, blockSize, 0, stream>>>(d1, d2, c1, c2, screen, conf, mask, pose2, cam1, cam2, params); break;
}*/
switch (func) {
case 32: corresponding_point_kernel<32,1><<<gridSize, blockSize, 0, stream>>>(d1, d2, c1, c2, screen, conf, mask, pose2, cam1, cam2, params); break;
case 16: corresponding_point_kernel<16,1><<<gridSize, blockSize, 0, stream>>>(d1, d2, c1, c2, screen, conf, mask, pose2, cam1, cam2, params); break;
case 8: corresponding_point_kernel<8,1><<<gridSize, blockSize, 0, stream>>>(d1, d2, c1, c2, screen, conf, mask, pose2, cam1, cam2, params); break;
case 4: corresponding_point_kernel<4,1><<<gridSize, blockSize, 0, stream>>>(d1, d2, c1, c2, screen, conf, mask, pose2, cam1, cam2, params); break;
case 2: corresponding_point_kernel<2,1><<<gridSize, blockSize, 0, stream>>>(d1, d2, c1, c2, screen, conf, mask, pose2, cam1, cam2, params); break;
}
cudaSafeCall( cudaGetLastError() );
......
......@@ -24,7 +24,8 @@ bool MultiViewMLS::apply(ftl::rgbd::FrameSet &in, ftl::rgbd::FrameSet &out, cuda
int iters = config()->value("mls_iterations", 3);
int radius = config()->value("mls_radius",5);
//bool aggre = config()->value("aggregation", true);
int win = config()->value("cost_function",1);
//int win = config()->value("cost_function",1);
int win = config()->value("window_size",16);
bool do_corr = config()->value("merge_corresponding", true);
bool do_aggr = config()->value("merge_mls", false);
bool cull_zero = config()->value("cull_no_confidence", false);
......@@ -139,6 +140,9 @@ bool MultiViewMLS::apply(ftl::rgbd::FrameSet &in, ftl::rgbd::FrameSet &out, cuda
);*/
}
}
// Reduce window size for next iteration
win = max(win>>1, 4);
}
// Find best source for every pixel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment