menandro / vfs

Variational Fisheye Stereo
49 stars 18 forks source link

Update of dual variable p #15

Closed dprov closed 2 years ago

dprov commented 2 years ago

In the VFS paper (and in the paper it cites) :

In contrast, in e.g. https://openaccess.thecvf.com/content_iccv_2013/papers/Ferstl_Image_Guided_Depth_2013_ICCV_paper.pdf and https://link.springer.com/chapter/10.1007/978-3-319-46475-6_36 , it's rather

However, in VFS's TGV solver, the way p is updated seems to follow these other papers :

// NOTE: details/checks skipped for clarify.

 // u_x = dxp(u_) - v_(:, : , 1);
u_x = u_[right] - u_pos - v_pos.x;
 ...
 // du_tensor_x = a.*u_x + c.*u_y;
float du_tensor_x = a[pos] * u_x + c[pos] * u_y;
...
// p(:, : , 1) = p(:, : , 1) + alpha1*sigma / eta_p.*du_tensor_x;
  ppos.x = p[pos].x + (alpha1 * sigma / eta_p) * du_tensor_x;
...

Whereas I would have expected something like

// du_x = dxp(u_);
du_x = u_[right] - u_pos;
 ...
// du_tensor_x = a.*u_x + c.*u_y;
float du_tensor_x = a[pos] * du_x + c[pos] * du_y;
...
// p(:, : , 1) = p(:, : , 1) + alpha1*sigma / eta_p.*(du_tensor_x - v_(:, : , 1));
  ppos.x = p[pos].x + (alpha1 * sigma / eta_p) * (du_tensor_x - v_pos.x);
...

Would you be able to comment on that? Am I missing something? Thanks

menandro commented 2 years ago

I might have missed which one I implemented, but your observation looks correct. I remember changing between two cases has really small effect on the smoothness of the depth, or at least the difference is very difficult to see.

dprov commented 2 years ago

Thanks for your reply, sorry I did not see it earlier. Indeed, it makes next to no differences, it was mostly about understanding what's happening.