  Recent methods for 3D reconstruction and rendering increasingly benefit from
end-to-end optimization of the entire image formation process. However, this
approach is currently limited: effects of the optical hardware stack and in
particular lenses are hard to model in a unified way. This limits the quality
that can be achieved for camera calibration and the fidelity of the results of
3D reconstruction. In this paper, we propose NeuroLens, a neural lens model for
distortion and vignetting that can be used for point projection and ray casting
and can be optimized through both operations. This means that it can
(optionally) be used to perform pre-capture calibration using classical
calibration targets, and can later be used to perform calibration or refinement
during 3D reconstruction, e.g., while optimizing a radiance field. To evaluate
the performance of our proposed model, we create a comprehensive dataset
assembled from the Lensfun database with a multitude of lenses. Using this and
other real-world datasets, we show that the quality of our proposed lens model
outperforms standard packages as well as recent approaches while being much
easier to use and extend. The model generalizes across many lens types and is
trivial to integrate into existing 3D reconstruction and rendering systems.
