zhou13 / neurvps

Neural Vanishing Point Scanning via Conic Convolution
MIT License
178 stars 22 forks source link

How is the focal length calculated? #9

Closed ylxbyy closed 4 years ago

ylxbyy commented 4 years ago

Hello~ There is parameter of focal length in the config file, but it seems that the value is not the true focal length. I noticed a function 'to_pixel(w)', which seems to be used to transform 3D coordinates to 2D pixel coordinates, in the 'neurvps/neurvps/models/vanishing_net.py' file, and the focal length is used like this 'x = w[0] / w[2] C.io.focal_length 256 + 256, y = -w[1] / w[2] C.io.focal_length 256 + 256'. Is the focal length here (also in the config file) equal to 1/tan(fov/2)?

zhou13 commented 4 years ago

See the FAQ.