xcyan / nips16_PTN

Torch Implementation of NIPS'16 paper: Perspective Transformer Nets
MIT License
142 stars 31 forks source link

What is "disf" in "PerspectiveGridGenerator.lua" #13

Open tianYue1988 opened 3 years ago

tianYue1988 commented 3 years ago

Hi, I'm trying to replicate your projection work with PyTorch. But I'm confused about the definition of "focal length" and "disf" in your code. That is:


focal_length = math.sqrt(3)/2 ? dmin = 1/(focal_length + math.sqrt(3)) dmax = 1/(focal_length) for k=1,depth do disf = dmin + (k-1)/(depth-1) * (dmax-dmin) baseGrid[k][i][j][1] = 1/disf


Please forgive my offense, I have followed your advice and read the appropriate books. I still don't understand how focal length is defined. And in the paper your point that "the minimum and maximum disparity in the camera frame are denoted as dmin and dmax", So who is a disparty, disf or 1/disf? Your help means a lot to me.