|
LensSerious 0.1
Lens-correction mathematics as data, not as a library of callbacks
|
#include <lensserious.h>
Collaboration diagram for ls_lens_t:Data Fields | |
| ls_lens_type_t | type |
| float | crop_factor |
| float | aspect_ratio |
| float | min_focal |
| float | max_focal |
| float | center_x |
| float | center_y |
| int | n_dist |
| ls_calib_dist_t | dist [LS_MAX_CALIB] |
| int | n_tca |
| ls_calib_tca_t | tca [LS_MAX_CALIB] |
| int | n_vig |
| ls_calib_vig_t | vig [LS_MAX_CALIB] |
| int | n_real_focal |
| ls_calib_real_focal_t | real_focal [LS_MAX_CALIB] |
A lens as data: coefficients plus the calibration sensor's identity.
Definition at line 108 of file lensserious.h.
| float ls_lens_t::aspect_ratio |
of the calibration sensor, e.g. 1.5
Definition at line 112 of file lensserious.h.
Referenced by ls_db_lens_by_id(), and ls_modifier_init().
| float ls_lens_t::center_x |
Definition at line 114 of file lensserious.h.
Referenced by ls_db_lens_by_id(), and ls_modifier_init().
| float ls_lens_t::center_y |
optical centre shift, lensfun convention (fraction of size)
Definition at line 114 of file lensserious.h.
Referenced by ls_db_lens_by_id(), and ls_modifier_init().
| float ls_lens_t::crop_factor |
of the CALIBRATION sensor: coefficient rescaling depends on it
Definition at line 111 of file lensserious.h.
Referenced by ls_db_lens_by_id(), and ls_modifier_init().
| ls_calib_dist_t ls_lens_t::dist[LS_MAX_CALIB] |
Definition at line 115 of file lensserious.h.
Referenced by _fill_calibrations(), and _interp_dist().
| float ls_lens_t::max_focal |
the lens's whole range: the vignetting metric needs it
Definition at line 113 of file lensserious.h.
Referenced by _vig_dist(), and ls_db_lens_by_id().
| float ls_lens_t::min_focal |
Definition at line 113 of file lensserious.h.
Referenced by _vig_dist(), and ls_db_lens_by_id().
| int ls_lens_t::n_dist |
Definition at line 115 of file lensserious.h.
Referenced by _fill_calibrations(), and _interp_dist().
| int ls_lens_t::n_real_focal |
<real-focal-length>, which FEEDS the projection stage rather than gating it.
lensfun's geometry callback runs on GetRealFocalLength(focal) divided by get_hugin_focal_correction(focal), and those two cancel to exactly the nominal focal when a lens carries no real-focal data – the correction is multiplied in and divided straight back out (modifier.cpp, and measured as a ratio of 1.0000 across every fisheye in the database). When a lens DOES carry it, they do not cancel: the geometry focal is real_focal / hugin, which on the Sigma 4.5mm circular fisheye is 0.4727x the nominal one. Correcting such a lens with its nominal focal is 28 px out at the centre of the frame and 135 px at the edge, which is why these points have to be carried.
Definition at line 128 of file lensserious.h.
Referenced by _fill_calibrations(), and _interp_real_focal().
| int ls_lens_t::n_tca |
Definition at line 116 of file lensserious.h.
Referenced by _fill_calibrations(), and _interp_tca().
| int ls_lens_t::n_vig |
Definition at line 117 of file lensserious.h.
Referenced by _fill_calibrations(), and _interp_vig().
| ls_calib_real_focal_t ls_lens_t::real_focal[LS_MAX_CALIB] |
Definition at line 128 of file lensserious.h.
Referenced by _fill_calibrations(), and _interp_real_focal().
| ls_calib_tca_t ls_lens_t::tca[LS_MAX_CALIB] |
Definition at line 116 of file lensserious.h.
Referenced by _fill_calibrations(), and _interp_tca().
| ls_lens_type_t ls_lens_t::type |
Definition at line 110 of file lensserious.h.
Referenced by ls_db_lens_by_id(), and ls_modifier_init().
| ls_calib_vig_t ls_lens_t::vig[LS_MAX_CALIB] |
Definition at line 117 of file lensserious.h.
Referenced by _fill_calibrations(), and _interp_vig().