131#define LS_ENABLE_DISTORTION (1 << 0)
132#define LS_ENABLE_TCA (1 << 1)
133#define LS_ENABLE_VIGNETTING (1 << 2)
134#define LS_ENABLE_SCALE (1 << 3)
135#define LS_ENABLE_GEOMETRY (1 << 4)
254 float crop,
int width,
int height,
255 float focal,
float aperture,
float distance,
256 float scale,
int target_type,
int flags,
int reverse);
318 int width,
int height,
float scale,
int flags,
int reverse);
384 float focal_mm,
float crop_factor);
430 float xu,
float yu,
int width,
int height,
438 float xu,
float yu,
int width,
int height,
439 float *rgba,
int row_stride_bytes);
int ls_eval_from_modifier(const ls_modifier_t *mod, ls_eval_t *out)
Flatten a resolved modifier into the scalar block a kernel can take by value.
float ls_modifier_autoscale(const ls_modifier_t *mod)
The scale that just removes the black borders a correction leaves behind.
struct ls_calib_real_focal_t ls_calib_real_focal_t
struct ls_modifier_t ls_modifier_t
A modifier: the lens resolved at one shooting configuration.
int ls_modifier_init_knots(ls_modifier_t *mod, const ls_knots_t *knots, int width, int height, float scale, int flags, int reverse)
Resolve a maker's embedded profile, in place of a database lens.
int ls_modifier_apply_vignetting(const ls_modifier_t *mod, float xu, float yu, int width, int height, float *rgba, int row_stride_bytes)
pa vignetting, multiplied in place over RGBA float rows. Contract of lfModifier::ApplyColorModificati...
struct ls_knots_t ls_knots_t
A lens correction the camera maker measured and wrote into the file, as knots.
struct ls_lens_t ls_lens_t
struct ls_calib_tca_t ls_calib_tca_t
int ls_modifier_set_projection(ls_modifier_t *mod, int from_type, int to_type, float focal_mm, float crop_factor)
Add a projection change to an already-resolved modifier.
@ LS_LENS_EQUIRECTANGULAR
@ LS_LENS_FISHEYE_ORTHOGRAPHIC
@ LS_LENS_FISHEYE_EQUISOLID
@ LS_LENS_FISHEYE_STEREOGRAPHIC
int ls_modifier_init(ls_modifier_t *mod, const ls_lens_t *lens, float crop, int width, int height, float focal, float aperture, float distance, float scale, int target_type, int flags, int reverse)
Resolve a lens at one (crop, geometry, focal, aperture, distance, scale).
int ls_modifier_apply_subpixel_geometry(const ls_modifier_t *mod, float xu, float yu, int width, int height, float *res)
The geometry map: for count output pixels starting at (xu, yu), write 6 floats per pixel — source coo...
struct ls_calib_vig_t ls_calib_vig_t
struct ls_calib_dist_t ls_calib_dist_t
int ls_eval_adopt_vignetting(ls_eval_t *dst, const ls_eval_t *src)
Move src's vignetting into dst, leaving dst's geometry untouched.
The closed forms, written once, compiled as C99 and as OpenCL C.
One lens resolved at one shooting configuration, as a flat block of scalars.
A lens correction the camera maker measured and wrote into the file, as knots.
ls_calib_vig_t vig[LS_MAX_CALIB]
ls_calib_real_focal_t real_focal[LS_MAX_CALIB]
ls_calib_tca_t tca[LS_MAX_CALIB]
ls_calib_dist_t dist[LS_MAX_CALIB]
A modifier: the lens resolved at one shooting configuration.
float aspect_ratio_correction