36 # define C_TYPEDEF(t,c)
38 # define C_TYPEDEF(t,c) typedef t c c;
54 #define LF_VERSION_MAJOR 0
56 #define LF_VERSION_MINOR 3
58 #define LF_VERSION_MICRO 2
60 #define LF_VERSION_BUGFIX 0
62 #define LF_VERSION ((LF_VERSION_MAJOR << 24) | (LF_VERSION_MINOR << 16) | (LF_VERSION_MICRO << 8) | LF_VERSION_BUGFIX)
66 #define LF_MAX_DATABASE_VERSION 2
68 #if defined CONF_LENSFUN_STATIC
72 # ifdef CONF_SYMBOL_VISIBILITY
73 # if defined PLATFORM_WINDOWS
74 # define LF_EXPORT __declspec(dllexport)
75 # elif defined CONF_COMPILER_GCC || __clang__
76 # define LF_EXPORT __attribute__((visibility("default")))
78 # error "I don't know how to change symbol visibility for your compiler"
81 # if defined PLATFORM_WINDOWS || defined _MSC_VER
82 # define LF_EXPORT __declspec(dllimport)
89 #ifndef CONF_LENSFUN_INTERNAL
92 # define DEPRECATED __attribute__((deprecated))
93 # elif defined(_MSC_VER)
94 # define DEPRECATED __declspec(deprecated)
96 # pragma message("WARNING: You need to implement DEPRECATED for this compiler")
227 lfMount (
const lfMount &other);
232 lfMount &operator = (
const lfMount &other);
249 void SetName (
const char *val,
const char *lang = NULL);
256 void AddCompat (
const char *val);
348 lfCamera (
const lfCamera &other);
358 lfCamera &operator = (
const lfCamera &other);
370 void SetMaker (
const char *val,
const char *lang = NULL);
382 void SetModel (
const char *val,
const char *lang = NULL);
394 void SetVariant (
const char *val,
const char *lang = NULL);
401 void SetMount (
const char *val);
918 lfLens (
const lfLens &other);
928 lfLens &operator = (
const lfLens &other);
940 void SetMaker (
const char *val,
const char *lang = NULL);
952 void SetModel (
const char *val,
const char *lang = NULL);
961 void AddMount (
const char *val);
978 bool RemoveCalibDistortion (
int idx);
996 bool RemoveCalibTCA (
int idx);
1013 bool RemoveCalibVignetting (
int idx);
1030 bool RemoveCalibCrop (
int idx);
1072 bool RemoveCalibRealFocal (
int idx);
1082 void GuessParameters ();
1106 static const char *GetDistortionModelDesc (
1123 static const char *GetTCAModelDesc (
1141 static const char *GetVignettingModelDesc (
1159 static const char *GetCropDesc (
1173 static const char *GetLensTypeDesc (
lfLensType type,
const char **details);
1206 bool InterpolateVignetting (
1456 bool LoadDirectory (
const char *dirname);
1480 lfError Load (
const char *filename);
1496 lfError Load (
const char *errcontext,
const char *data,
size_t data_size);
1505 lfError Save (
const char *filename)
const;
1520 lfError Save (
const char *filename,
1523 const lfLens *
const *lenses)
const;
1537 static char *Save (
const lfMount *
const *mounts,
1539 const lfLens *
const *lenses);
1565 const lfCamera **FindCameras (
const char *maker,
const char *model)
const;
1587 const lfCamera **FindCamerasExt (
const char *maker,
const char *model,
1588 int sflags = 0)
const;
1597 const lfCamera *
const *GetCameras ()
const;
1636 const lfLens **FindLenses (
const lfCamera *camera,
const char *maker,
1637 const char *model,
int sflags = 0)
const;
1656 const lfLens **FindLenses (
const lfLens *lens,
int sflags = 0)
const;
1665 const lfLens *
const *GetLenses ()
const;
1674 const lfMount *FindMount (
const char *mount)
const;
1683 const char *MountName (
const char *mount)
const;
1692 const lfMount *
const *GetMounts ()
const;
1699 void AddMount (
lfMount *mount);
1713 void AddLens (
lfLens *lens);
1758 const
char *data,
size_t data_size);
1767 const
lfLens *const *lenses);
1772 const
lfLens *const *lenses);
1776 const
lfDatabase *db, const
char *maker, const
char *model);
1780 const
lfDatabase *db, const
char *maker, const
char *model,
int sflags);
1788 const
char *lens,
int sflags);
1884 #define LF_CR_1(a) (LF_CR_ ## a)
1886 #define LF_CR_2(a,b) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4))
1888 #define LF_CR_3(a,b,c) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1889 ((LF_CR_ ## c) << 8))
1891 #define LF_CR_4(a,b,c,d) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1892 ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12))
1894 #define LF_CR_5(a,b,c,d,e) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1895 ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
1896 ((LF_CR_ ## e) << 16))
1898 #define LF_CR_6(a,b,c,d,e,f) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1899 ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
1900 ((LF_CR_ ## e) << 16) | ((LF_CR_ ## f) << 20))
1902 #define LF_CR_7(a,b,c,d,e,f,g) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1903 ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
1904 ((LF_CR_ ## e) << 16) | ((LF_CR_ ## f) << 20) | \
1905 ((LF_CR_ ## g) << 24))
1907 #define LF_CR_8(a,b,c,d,e,f,g,h) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1908 ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
1909 ((LF_CR_ ## e) << 16) | ((LF_CR_ ## f) << 20) | \
1910 ((LF_CR_ ## g) << 24) | ((LF_CR_ ## h) << 28))
1954 void *pixels,
int comp_role,
int count);
1973 struct lfCallbackData
1981 typedef struct {
float angle, dist; } lfPoint;
2125 DEPRECATED static lfModifier *Create (
const lfLens *lens,
float crop,
int width,
int height);
2174 float distance,
float scale,
lfLensType targeom,
int flags,
bool reverse);
2224 bool EnablePerspectiveCorrection (
fvector x,
fvector y,
float d);
2251 void *data,
size_t data_size);
2271 void *data,
size_t data_size);
2290 void *data,
size_t data_size);
2306 bool AddSubpixelCallbackTCA (
lfLensCalibTCA &model,
bool reverse =
false);
2323 bool reverse =
false);
2372 bool AddCoordCallbackScale (
float scale,
bool reverse =
false);
2387 float GetAutoScale (
bool reverse);
2418 bool ApplyColorModification (
void *pixels,
float x,
float y,
int width,
int height,
2419 int comp_role,
int row_stride)
const;
2451 bool ApplyGeometryDistortion (
float xu,
float yu,
int width,
int height,
2485 bool ApplySubpixelDistortion (
float xu,
float yu,
int width,
int height,
2518 bool ApplySubpixelGeometryDistortion (
float xu,
float yu,
int width,
int height,
2552 float GetRealFocalLength (
const lfLens *lens,
float focal);
2554 void AddCallback (
void *arr, lfCallbackData *d,
2555 int priority,
void *data,
size_t data_size);
2570 double AutoscaleResidualDistance (
float *coord)
const;
2585 float GetTransformedDistance (lfPoint point)
const;
2587 static void ModifyCoord_UnTCA_Linear (
void *data,
float *iocoord,
int count);
2588 static void ModifyCoord_TCA_Linear (
void *data,
float *iocoord,
int count);
2589 static void ModifyCoord_UnTCA_Poly3 (
void *data,
float *iocoord,
int count);
2590 static void ModifyCoord_TCA_Poly3 (
void *data,
float *iocoord,
int count);
2591 static void ModifyCoord_TCA_ACM (
void *data,
float *iocoord,
int count);
2593 static void ModifyCoord_UnDist_Poly3 (
void *data,
float *iocoord,
int count);
2594 static void ModifyCoord_Dist_Poly3 (
void *data,
float *iocoord,
int count);
2595 #ifdef VECTORIZATION_SSE
2596 static void ModifyCoord_Dist_Poly3_SSE (
void *data,
float *iocoord,
int count);
2598 static void ModifyCoord_UnDist_Poly5 (
void *data,
float *iocoord,
int count);
2599 static void ModifyCoord_Dist_Poly5 (
void *data,
float *iocoord,
int count);
2600 static void ModifyCoord_UnDist_PTLens (
void *data,
float *iocoord,
int count);
2601 static void ModifyCoord_Dist_PTLens (
void *data,
float *iocoord,
int count);
2602 #ifdef VECTORIZATION_SSE
2603 static void ModifyCoord_UnDist_PTLens_SSE (
void *data,
float *iocoord,
int count);
2604 static void ModifyCoord_Dist_PTLens_SSE (
void *data,
float *iocoord,
int count);
2606 static void ModifyCoord_Dist_ACM (
void *data,
float *iocoord,
int count);
2607 static void ModifyCoord_Geom_FishEye_Rect (
void *data,
float *iocoord,
int count);
2608 static void ModifyCoord_Geom_Panoramic_Rect (
void *data,
float *iocoord,
int count);
2609 static void ModifyCoord_Geom_ERect_Rect (
void *data,
float *iocoord,
int count);
2610 static void ModifyCoord_Geom_Rect_FishEye (
void *data,
float *iocoord,
int count);
2611 static void ModifyCoord_Geom_Panoramic_FishEye (
void *data,
float *iocoord,
int count);
2612 static void ModifyCoord_Geom_ERect_FishEye (
void *data,
float *iocoord,
int count);
2613 static void ModifyCoord_Geom_Rect_Panoramic (
void *data,
float *iocoord,
int count);
2614 static void ModifyCoord_Geom_FishEye_Panoramic (
void *data,
float *iocoord,
int count);
2615 static void ModifyCoord_Geom_ERect_Panoramic (
void *data,
float *iocoord,
int count);
2616 static void ModifyCoord_Geom_Rect_ERect (
void *data,
float *iocoord,
int count);
2617 static void ModifyCoord_Geom_FishEye_ERect (
void *data,
float *iocoord,
int count);
2618 static void ModifyCoord_Geom_Panoramic_ERect (
void *data,
float *iocoord,
int count);
2619 static void ModifyCoord_Geom_Orthographic_ERect (
void *data,
float *iocoord,
int count);
2620 static void ModifyCoord_Geom_ERect_Orthographic (
void *data,
float *iocoord,
int count);
2621 static void ModifyCoord_Geom_Stereographic_ERect (
void *data,
float *iocoord,
int count);
2622 static void ModifyCoord_Geom_ERect_Stereographic (
void *data,
float *iocoord,
int count);
2623 static void ModifyCoord_Geom_Equisolid_ERect (
void *data,
float *iocoord,
int count);
2624 static void ModifyCoord_Geom_ERect_Equisolid (
void *data,
float *iocoord,
int count);
2625 static void ModifyCoord_Geom_Thoby_ERect (
void *data,
float *iocoord,
int count);
2626 static void ModifyCoord_Geom_ERect_Thoby (
void *data,
float *iocoord,
int count);
2627 static void ModifyCoord_Perspective_Correction (
void *data,
float *iocoord,
int count);
2628 #ifdef VECTORIZATION_SSE
2629 static void ModifyColor_DeVignetting_PA_SSE (
2630 void *data,
float _x,
float _y,
lf_f32 *pixels,
int comp_role,
int count);
2632 #ifdef VECTORIZATION_SSE2
2633 static void ModifyColor_DeVignetting_PA_SSE2 (
2634 void *data,
float _x,
float _y,
lf_u16 *pixels,
int comp_role,
int count);
2637 template<
typename T>
static void ModifyColor_Vignetting_PA (
2638 void *data,
float x,
float y, T *rgb,
int comp_role,
int count);
2639 template<
typename T>
static void ModifyColor_DeVignetting_PA (
2640 void *data,
float x,
float y, T *rgb,
int comp_role,
int count);
2642 static void ModifyCoord_Scale (
void *data,
float *iocoord,
int count);
2644 double Width, Height;
2648 double CenterX, CenterY;
2650 double NormScale, NormUnScale;
2654 double NormalizedInMillimeters;
2657 double AspectRatioCorrection;
2660 void *SubpixelCallbacks;
2662 void *ColorCallbacks;
2664 void *CoordCallbacks;
2674 double FocalLengthNormalized;
2687 const
lfLens *lens,
float crop,
int width,
int height);
2695 float focal,
float aperture,
float distance,
float scale,
2700 lfModifier *modifier,
float *x,
float *y,
int count,
float d);
2705 void *data,
size_t data_size);
2710 void *data,
size_t data_size);
2715 void *data,
size_t data_size);
2744 lfModifier *modifier,
float xu,
float yu,
int width,
int height,
float *res);
2748 lfModifier *modifier,
void *pixels,
float x,
float y,
int width,
int height,
2749 int comp_role,
int row_stride);
2753 lfModifier *modifier,
float xu,
float yu,
int width,
int height,
float *res);
2757 lfModifier *modifier,
float xu,
float yu,
int width,
int height,
float *res);
Panoramic (cylindrical)
Definition: lensfun.h:827
lfError lf_db_load_file(lfDatabase *db, const char *filename)
lfDistortionModel
The Lensfun library implements several lens distortion models. This enum lists them.
Definition: lensfun.h:472
float MinAperture
Definition: lensfun.h:871
Definition: lensfun.h:1841
Definition: lensfun.h:1870
cbool lf_modifier_apply_subpixel_geometry_distortion(lfModifier *modifier, float xu, float yu, int width, int height, float *res)
Adobe Camera Model. The coordinate system is different here. Everything is measured in units of the f...
Definition: lensfun.h:517
unsigned int lf_u32
Definition: lensfun.h:134
void lf_lens_add_calib_tca(lfLens *lens, const lfLensCalibTCA *tcac)
const lfCamera ** lf_db_find_cameras(const lfDatabase *db, const char *maker, const char *model)
DEPRECATED void lf_lens_add_calib_fov(lfLens *lens, const lfLensCalibFov *cf)
lfMLstr Maker
Definition: lensfun.h:863
int lf_modifier_initialize(lfModifier *modifier, const lfLens *lens, lfPixelFormat format, float focal, float aperture, float distance, float scale, lfLensType targeom, int flags, cbool reverse)
lfLensCalibDistortion ** CalibDistortion
Definition: lensfun.h:895
float FieldOfView
Field of view for given images.
Definition: lensfun.h:757
Rectilinear lens.
Definition: lensfun.h:814
Definition: lensfun.h:1826
lfLensType Type
Definition: lensfun.h:893
cbool lf_modifier_enable_perspective_correction(lfModifier *modifier, float *x, float *y, int count, float d)
This flag makes Lensfun to sort the results by focal length, and remove all double lens names...
Definition: lensfun.h:1398
char ** Compat
Definition: lensfun.h:216
lfLensCalibVignetting ** CalibVignetting
Definition: lensfun.h:899
char * UserUpdatesDir
Home lens database directory for automatic updates (something like "~/.local/share/lensfun/updates") ...
Definition: lensfun.h:1426
no crop at all
Definition: lensfun.h:706
Definition: lensfun.h:1847
Definition: lensfun.h:1839
5th order polynomial model.
Definition: lensfun.h:492
lfError
Definition: lensfun.h:117
const char * lf_get_distortion_model_desc(enum lfDistortionModel model, const char **details, const lfParameter ***params)
void lf_lens_guess_parameters(lfLens *lens)
float CenterX
Definition: lensfun.h:885
float CropFactor
Definition: lensfun.h:889
float Focal
Focal length in mm at which this calibration data was taken.
Definition: lensfun.h:689
Laterlal chromatic aberrations calibration data.
Definition: lensfun.h:620
Definition: lensfun.h:124
Lens distortion calibration data.
Definition: lensfun.h:528
void lf_modifier_add_subpixel_callback(lfModifier *modifier, lfSubpixelCoordFunc callback, int priority, void *data, size_t data_size)
double lf_f64
Definition: lensfun.h:138
cbool lf_modifier_add_color_callback_vignetting(lfModifier *modifier, lfLensCalibVignetting *model, lfPixelFormat format, cbool reverse)
void lf_modifier_add_coord_callback(lfModifier *modifier, lfModifyCoordFunc callback, int priority, void *data, size_t data_size)
void lf_lens_copy(lfLens *dest, const lfLens *source)
Copy the data from one lfLens structure into another.
void lf_mount_destroy(lfMount *mount)
Destroy a lfMount object.
cbool lf_lens_remove_calib_tca(lfLens *lens, int idx)
cbool lf_lens_remove_calib_vignetting(lfLens *lens, int idx)
Lens data. Unknown fields are set to NULL or 0.
Definition: lensfun.h:860
cbool lf_lens_interpolate_distortion(const lfLens *lens, float focal, lfLensCalibDistortion *res)
lfPixelFormat
A list of pixel formats supported by internal colour callbacks.
Definition: lensfun.h:1836
Definition: lensfun.h:1830
float AspectRatio
Definition: lensfun.h:891
lfVignettingModel
The Lensfun library supports several models for lens vignetting correction.
Definition: lensfun.h:648
lfLensCalibTCA ** CalibTCA
Definition: lensfun.h:897
float CenterY
Definition: lensfun.h:887
Adobe camera model for TCA. The coordinate system is different here. Everything is measured in units ...
Definition: lensfun.h:608
cbool lf_modifier_add_coord_callback_scale(lfModifier *modifier, float scale, cbool reverse)
This structure contains everything specific to a camera mount.
Definition: lensfun.h:207
float MinFocal
Definition: lensfun.h:867
const char * lf_db_mount_name(const lfDatabase *db, const char *mount)
Stereographic fisheye.
Definition: lensfun.h:838
int Score
Definition: lensfun.h:907
Linear lateral chromatic aberrations model.
Definition: lensfun.h:568
Third order polynomial.
Definition: lensfun.h:580
Definition: lensfun.h:1828
use a circular crop, e.g. for circular fisheye images
Definition: lensfun.h:710
#define cbool
C-compatible bool type; don't bother to define Yet Another Boolean Type.
Definition: lensfun.h:104
lfMLstr Model
Definition: lensfun.h:865
float Focal
Focal length in mm at which this calibration data was taken.
Definition: lensfun.h:721
cbool lf_modifier_apply_subpixel_distortion(lfModifier *modifier, float xu, float yu, int width, int height, float *res)
const lfLens ** lf_db_find_lenses_hd(const lfDatabase *db, const lfCamera *camera, const char *maker, const char *lens, int sflags)
int Score
Camera matching score, used while searching: not actually a camera parameter.
Definition: lensfun.h:337
cbool lf_mount_check(lfMount *mount)
float lf_modifier_get_auto_scale(lfModifier *modifier, cbool reverse)
Orthographic fisheye.
Definition: lensfun.h:836
const lfCamera *const * lf_db_get_cameras(const lfDatabase *db)
lfModifier * lf_modifier_new(const lfLens *lens, float crop, int width, int height)
lfLensType
Lens type. See Change of projection for further information.
Definition: lensfun.h:806
Definition: lensfun.h:1823
cbool lf_lens_remove_calib_crop(lfLens *lens, int idx)
float Focal
Definition: lensfun.h:769
PTLens model, which is also used by Hugin.
Definition: lensfun.h:500
Definition: lensfun.h:1872
3rd order polynomial model, which is a subset of the PTLens model.
Definition: lensfun.h:483
use a rectangular crop
Definition: lensfun.h:708
std::vector< float > fvector
Definition: lensfun.h:32
const char * lf_get_tca_model_desc(enum lfTCAModel model, const char **details, const lfParameter ***params)
cbool lf_modifier_add_subpixel_callback_TCA(lfModifier *modifier, lfLensCalibTCA *model, cbool reverse)
const lfMount * lf_db_find_mount(const lfDatabase *db, const char *mount)
void(* lfSubpixelCoordFunc)(void *data, float *iocoord, int count)
A callback function which modifies the separate coordinates for all color components for every pixel ...
Definition: lensfun.h:1927
#define C_TYPEDEF(t, c)
Definition: lensfun.h:36
Equisolid fisheye.
Definition: lensfun.h:840
Fisheye as measured by Thoby (for Nikkor 10.5).
Definition: lensfun.h:846
const lfMount *const * lf_db_get_mounts(const lfDatabase *db)
float Focal
Focal length in mm at which this calibration data was taken.
Definition: lensfun.h:625
cbool lf_lens_interpolate_crop(const lfLens *lens, float focal, lfLensCalibCrop *res)
Definition: lensfun.h:1874
unsigned char lf_u8
Definition: lensfun.h:130
Definition: lensfun.h:1876
#define LF_EXPORT
This macro expands to an appropiate symbol visibility declaration.
Definition: lensfun.h:70
void lf_camera_destroy(lfCamera *camera)
Destroy a lfCamera object.
lfLens * lf_lens_new()
Create a new lens object.
float Min
Minimal value that has sense.
Definition: lensfun.h:794
float Max
Maximal value that has sense.
Definition: lensfun.h:796
Unknown lens type.
Definition: lensfun.h:809
Struct to save real focal length, which can depends on the (nominal) focal length.
Definition: lensfun.h:766
cbool lf_modifier_apply_color_modification(lfModifier *modifier, void *pixels, float x, float y, int width, int height, int comp_role, int row_stride)
const lfCamera ** lf_db_find_cameras_ext(const lfDatabase *db, const char *maker, const char *model, int sflags)
float RealFocal
Real focal length.
Definition: lensfun.h:781
A modifier object contains optimized data required to rectify a image.
Definition: lensfun.h:2072
cbool lf_camera_check(lfCamera *camera)
Definition: lensfun.h:1861
float CropFactor
Camera crop factor (ex: 1.0). Must be defined.
Definition: lensfun.h:335
const char * lf_mlstr_get(const lfMLstr str)
Get a string corresponding to current locale from a multi-language string.
void lf_camera_copy(lfCamera *dest, const lfCamera *source)
Copy the data from one lfCamera structure into another.
Definition: lensfun.h:122
This flag selects a looser search algorithm resulting in more results (still sorted by score)...
Definition: lensfun.h:1386
float Distance
Focus distance in meters.
Definition: lensfun.h:693
void lf_lens_add_calib_distortion(lfLens *lens, const lfLensCalibDistortion *dc)
void lf_modifier_destroy(lfModifier *modifier)
float Aperture
Aperture (f-number) at which this calibration data was taken.
Definition: lensfun.h:691
#define DEPRECATED
For marking deprecated functions, see http://stackoverflow.com/a/21265197.
Definition: lensfun.h:97
Definition: lensfun.h:1878
cbool lf_modifier_apply_geometry_distortion(lfModifier *modifier, float xu, float yu, int width, int height, float *res)
lfCamera * lf_camera_new()
Create a new camera object.
float MaxFocal
Definition: lensfun.h:869
Definition: lensfun.h:1821
void lf_mount_copy(lfMount *dest, const lfMount *source)
Copy the data from one lfMount structure into another.
unsigned short lf_u16
Definition: lensfun.h:132
lfComponentRole
These constants define the role of every pixel component, four bits each. "pixel" refers here to a se...
Definition: lensfun.h:1855
const char * lf_get_lens_type_desc(enum lfLensType type, const char **details)
char ** Mounts
Definition: lensfun.h:875
Equirectangular.
Definition: lensfun.h:834
Definition: lensfun.h:1868
float Focal
Focal length in mm at which this calibration data was taken.
Definition: lensfun.h:533
float Focal
Definition: lensfun.h:747
cbool lf_lens_interpolate_tca(const lfLens *lens, float focal, lfLensCalibTCA *res)
void lf_lens_destroy(lfLens *lens)
Destroy a lfLens object.
Definition: lensfun.h:1832
const lfLens ** lf_db_find_lenses(const lfDatabase *db, const lfLens *lens, int sflags)
void lf_db_destroy(lfDatabase *db)
Destroy the database object.
Equidistant fisheye.
Definition: lensfun.h:820
lfError lf_db_load_data(lfDatabase *db, const char *errcontext, const char *data, size_t data_size)
void lf_modifier_add_color_callback(lfModifier *modifier, lfModifyColorFunc callback, int priority, void *data, size_t data_size)
Definition: lensfun.h:1843
No TCA correction data is known.
Definition: lensfun.h:556
lfMLstr Model
Model name (ex: "Rolleiflex SL35") – same as in EXIF.
Definition: lensfun.h:329
const char * lf_get_crop_desc(enum lfCropMode mode, const char **details, const lfParameter ***params)
lfLensCalibFov ** CalibFov
Definition: lensfun.h:903
lfMLstr Maker
Camera maker (ex: "Rollei") – same as in EXIF.
Definition: lensfun.h:327
DEPRECATED cbool lf_lens_remove_calib_fov(lfLens *lens, int idx)
Definition: lensfun.h:120
lfDatabase * lf_db_new(void)
Create a new empty database object.
cbool lf_lens_check(lfLens *lens)
const char * lf_get_vignetting_model_desc(enum lfVignettingModel model, const char **details, const lfParameter ***params)
char * Mount
Camera mount type (ex: "QBM")
Definition: lensfun.h:333
char * lfMLstr
Definition: lensfun.h:114
A lens database object.
Definition: lensfun.h:1420
cbool lf_lens_interpolate_real_focal(const lfLens *lens, float focal, lfLensCalibRealFocal *res)
void lf_lens_add_calib_crop(lfLens *lens, const lfLensCalibCrop *cc)
const lfLens *const * lf_db_get_lenses(const lfDatabase *db)
Pablo D'Angelo vignetting model (which is a more general variant of the law).
Definition: lensfun.h:661
Distortion parameters are unknown.
Definition: lensfun.h:475
lfMLstr Name
Camera mount name.
Definition: lensfun.h:214
Lens vignetting calibration data.
Definition: lensfun.h:684
cbool lf_lens_remove_calib_real_focal(lfLens *lens, int idx)
float lf_f32
Definition: lensfun.h:136
DEPRECATED cbool lf_lens_interpolate_fov(const lfLens *lens, float focal, lfLensCalibFov *res)
lfMLstr lf_mlstr_add(lfMLstr str, const char *lang, const char *trstr)
Add a new translated string to a multi-language string.
No vignetting correction data is known.
Definition: lensfun.h:651
void lf_lens_add_calib_vignetting(lfLens *lens, const lfLensCalibVignetting *vc)
lfError lf_db_save_all(const lfDatabase *db, const char *filename)
cbool lf_lens_interpolate_vignetting(const lfLens *lens, float focal, float aperture, float distance, lfLensCalibVignetting *res)
lfTCAModel
The Lensfun library supports several models for lens lateral chromatic aberrations (also called trans...
Definition: lensfun.h:553
cbool lf_modifier_add_coord_callback_distortion(lfModifier *modifier, lfLensCalibDistortion *model, cbool reverse)
float Default
Default value for the parameter.
Definition: lensfun.h:798
Adobe's vignetting model. It differs from D'Angelo's model only in the coordinate system...
Definition: lensfun.h:672
void(* lfModifyColorFunc)(void *data, float x, float y, void *pixels, int comp_role, int count)
A callback function which modifies the colors of a strip of pixels.
Definition: lensfun.h:1953
void lf_lens_add_calib_real_focal(lfLens *lens, const lfLensCalibRealFocal *cf)
lfMount * lf_mount_new()
Create a new mount object.
lfCropMode
Different crop modes.
Definition: lensfun.h:703
Struct to save calibrated field of view, which can depends on the focal length (DEPRECATED) ...
Definition: lensfun.h:744
lfLensCalibCrop ** CalibCrop
Definition: lensfun.h:901
Camera data. Unknown fields are set to NULL.
Definition: lensfun.h:324
char * lf_db_save(const lfMount *const *mounts, const lfCamera *const *cameras, const lfLens *const *lenses)
lfMLstr lf_mlstr_dup(const lfMLstr str)
Create a complete copy of a multi-language string.
lfMLstr Variant
Camera variant. Some cameras use same EXIF id for different models.
Definition: lensfun.h:331
void(* lfModifyCoordFunc)(void *data, float *iocoord, int count)
A callback function which modifies the coordinates of a strip of pixels.
Definition: lensfun.h:1968
Struct to save image crop, which can depend on the focal length.
Definition: lensfun.h:718
cbool lf_modifier_add_coord_callback_geometry(lfModifier *modifier, lfLensType from, lfLensType to)
Definition: lensfun.h:1845
lfError lf_db_save_file(const lfDatabase *db, const char *filename, const lfMount *const *mounts, const lfCamera *const *cameras, const lfLens *const *lenses)
const char * Name
Parameter name (something like 'k', 'k3', 'omega' etc.)
Definition: lensfun.h:792
This structure describes a single parameter for some lens model.
Definition: lensfun.h:789
lfError lf_db_load(lfDatabase *db)
cbool lf_lens_remove_calib_distortion(lfLens *lens, int idx)
char * HomeDataDir
Home lens database directory (something like "~/.local/share/lensfun")
Definition: lensfun.h:1423
cbool lf_db_load_directory(lfDatabase *db, const char *dirname)
lfLensCalibRealFocal ** CalibRealFocal
Definition: lensfun.h:905
float MaxAperture
Definition: lensfun.h:873