lensfun: lensfun.h Source File

lensfun 0.2.7.0

- Main Page
- Related Pages
- Modules
- Classes
- Files
- Examples

- File List
- File Members

lensfun.h
Go to the documentation of this file.
1 /*
2 LensFun - a library for maintaining a database of photographical lenses,
3 and providing the means to correct some of the typical lens distortions.
4 Copyright (C) 2007 by Andrew Zabolotny
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public
17 License along with this library; if not, write to the Free
18 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21 #ifndef __LENSFUN_H__
22 #define __LENSFUN_H__
23
24 #include <stddef.h>
25
26 #ifdef __cplusplus
27 extern "C" {
29 # define C_TYPEDEF(t,c)
30 #else
31 # define C_TYPEDEF(t,c) typedef t c c;
32 #endif
33
39 /*----------------------------------------------------------------------------*/
40
47 #define LF_VERSION_MAJOR 0
49 #define LF_VERSION_MINOR 2
51 #define LF_VERSION_MICRO 7
53 #define LF_VERSION_BUGFIX 0
55 #define LF_VERSION ((LF_VERSION_MAJOR << 24) | (LF_VERSION_MINOR << 16) | (LF_VERSION_MICRO << 8) | LF_VERSION_BUGFIX)
57
58 #if defined CONF_LENSFUN_STATIC
59 # define LF_EXPORT
61 #else
62 # ifdef CONF_SYMBOL_VISIBILITY
63 # if defined PLATFORM_WINDOWS
64 # define LF_EXPORT __declspec(dllexport)
65 # elif defined CONF_COMPILER_GCC
66 # define LF_EXPORT __attribute__((visibility("default")))
67 # else
68 # error "I don't know how to change symbol visibility for your compiler"
69 # endif
70 # else
71 # if defined PLATFORM_WINDOWS || defined _MSC_VER
72 # define LF_EXPORT __declspec(dllimport)
73 # else
74 # define LF_EXPORT
75 # endif
76 # endif
77 #endif
78
80 #define cbool int
81
90 typedef char *lfMLstr;
91
93 enum lfError
94 {
96 LF_NO_ERROR = 0,
98 LF_WRONG_FORMAT
99 };
100
101 C_TYPEDEF (enum, lfError)
102
103
111 LF_EXPORT void lf_free (void *data);
112
119 LF_EXPORT const char *lf_mlstr_get (const lfMLstr str);
120
136 LF_EXPORT lfMLstr lf_mlstr_add (lfMLstr str, const char *lang, const char *trstr);
137
145 LF_EXPORT lfMLstr lf_mlstr_dup (const lfMLstr str);
146
149 /*----------------------------------------------------------------------------*/
150
166 struct LF_EXPORT lfMount
167 {
169 lfMLstr Name;
171 char **Compat;
172
173 #ifdef __cplusplus
174
177 lfMount ();
178
182 lfMount &operator = (const lfMount &other);
183
187 ~lfMount ();
188
197 void SetName (const char *val, const char *lang = NULL);
198
204 void AddCompat (const char *val);
205
211 bool Check ();
212 #endif
213 };
214
215 C_TYPEDEF (struct, lfMount)
216
217
224 LF_EXPORT lfMount *lf_mount_new ();
225
234 LF_EXPORT void lf_mount_destroy (lfMount *mount);
235
245 LF_EXPORT void lf_mount_copy (lfMount *dest, const lfMount *source);
246
248 LF_EXPORT cbool lf_mount_check (lfMount *mount);
249
252 /*----------------------------------------------------------------------------*/
253
272 struct LF_EXPORT lfCamera
273 {
275 lfMLstr Maker;
277 lfMLstr Model;
279 lfMLstr Variant;
281 char *Mount;
283 float CropFactor;
285 int Score;
286
287 #ifdef __cplusplus
288
291 lfCamera ();
292
296 lfCamera (const lfCamera &other);
297
301 ~lfCamera ();
302
306 lfCamera &operator = (const lfCamera &other);
307
316 void SetMaker (const char *val, const char *lang = NULL);
317
326 void SetModel (const char *val, const char *lang = NULL);
327
336 void SetVariant (const char *val, const char *lang = NULL);
337
343 void SetMount (const char *val);
344
350 bool Check ();
351 #endif
352 };
353
354 C_TYPEDEF (struct, lfCamera)
355
356
363 LF_EXPORT lfCamera *lf_camera_new ();
364
373 LF_EXPORT void lf_camera_destroy (lfCamera *camera);
374
384 LF_EXPORT void lf_camera_copy (lfCamera *dest, const lfCamera *source);
385
387 LF_EXPORT cbool lf_camera_check (lfCamera *camera);
388
391 /*----------------------------------------------------------------------------*/
392
408 enum lfDistortionModel
409 {
411 LF_DIST_MODEL_NONE,
417 LF_DIST_MODEL_POLY3,
422 LF_DIST_MODEL_POLY5,
428 LF_DIST_MODEL_FOV1,
433 LF_DIST_MODEL_PTLENS,
434 };
435
436 C_TYPEDEF (enum, lfDistortionModel)
437
438
443 struct lfLensCalibDistortion
444 {
446 enum lfDistortionModel Model;
448 float Focal;
450 float Terms [3];
451 };
452
453 C_TYPEDEF (struct, lfLensCalibDistortion)
454
455
464 enum lfTCAModel
465 {
467 LF_TCA_MODEL_NONE,
474 LF_TCA_MODEL_LINEAR,
475
482 LF_TCA_MODEL_POLY3
483 };
484
485 C_TYPEDEF (enum, lfTCAModel)
486
487
493 struct lfLensCalibTCA
494 {
496 enum lfTCAModel Model;
498 float Focal;
500 float Terms [6];
501 };
502
503 C_TYPEDEF (struct, lfLensCalibTCA)
504
505
516 enum lfVignettingModel
517 {
519 LF_VIGNETTING_MODEL_NONE,
526 LF_VIGNETTING_MODEL_PA
527 };
528
529 C_TYPEDEF (enum, lfVignettingModel)
530
531
538 struct lfLensCalibVignetting
539 {
541 enum lfVignettingModel Model;
543 float Focal;
545 float Aperture;
547 float Distance;
549 float Terms [3];
550 };
551
552 C_TYPEDEF (struct, lfLensCalibVignetting)
553
554
557 enum lfCropMode
558 {
560 LF_NO_CROP,
562 LF_CROP_RECTANGLE,
564 LF_CROP_CIRCLE
565 };
566
567 C_TYPEDEF(enum, lfCropMode)
568
569
572 struct lfLensCalibCrop
573 {
575 float Focal;
577 enum lfCropMode CropMode;
586 float Crop [4];
587 };
588
589 C_TYPEDEF (struct, lfLensCalibCrop)
590
591
594 struct lfLensCalibFov
595 {
597 float Focal;
604 float FieldOfView;
605 };
606
607 C_TYPEDEF (struct, lfLensCalibFov)
608
609
612 struct lfParameter
613 {
615 const char *Name;
617 float Min;
619 float Max;
621 float Default;
622 };
623
624 C_TYPEDEF (struct, lfParameter)
625
626
629 enum lfLensType
630 {
632 LF_UNKNOWN,
634 LF_RECTILINEAR,
639 LF_FISHEYE,
641 LF_PANORAMIC,
646 LF_EQUIRECTANGULAR,
648 LF_FISHEYE_ORTHOGRAPHIC,
650 LF_FISHEYE_STEREOGRAPHIC,
652 LF_FISHEYE_EQUISOLID,
654 LF_FISHEYE_THOBY
655 };
656
657 C_TYPEDEF (enum, lfLensType)
658
659
669 struct LF_EXPORT lfLens
670 {
672 lfMLstr Maker;
674 lfMLstr Model;
676 float MinFocal;
678 float MaxFocal;
680 float MinAperture;
682 float MaxAperture;
684 char **Mounts;
694 float CenterX;
696 float CenterY;
698 float RedCCI;
700 float GreenCCI;
702 float BlueCCI;
704 float CropFactor;
706 lfLensType Type;
708 lfLensCalibDistortion **CalibDistortion;
710 lfLensCalibTCA **CalibTCA;
712 lfLensCalibVignetting **CalibVignetting;
714 lfLensCalibCrop **CalibCrop;
716 lfLensCalibFov **CalibFov;
718 int Score;
719
720 #ifdef __cplusplus
721
724 lfLens ();
725
729 lfLens (const lfLens &other);
730
734 ~lfLens ();
735
739 lfLens &operator = (const lfLens &other);
740
749 void SetMaker (const char *val, const char *lang = NULL);
750
759 void SetModel (const char *val, const char *lang = NULL);
760
767 void AddMount (const char *val);
768
776 void AddCalibDistortion (const lfLensCalibDistortion *dc);
777
783 bool RemoveCalibDistortion (int idx);
784
792 void AddCalibTCA (const lfLensCalibTCA *tcac);
793
799 bool RemoveCalibTCA (int idx);
800
808 void AddCalibVignetting (const lfLensCalibVignetting *vc);
809
815 bool RemoveCalibVignetting (int idx);
816
824 void AddCalibCrop (const lfLensCalibCrop *cc);
825
831 bool RemoveCalibCrop (int idx);
832
840 void AddCalibFov (const lfLensCalibFov *cf);
841
847 bool RemoveCalibFov (int idx);
848
856 void GuessParameters ();
857
863 bool Check ();
864
880 static const char *GetDistortionModelDesc (
881 lfDistortionModel model, const char **details, const lfParameter ***params);
897 static const char *GetTCAModelDesc (
898 lfTCAModel model, const char **details, const lfParameter ***params);
899
915 static const char *GetVignettingModelDesc (
916 lfVignettingModel model, const char **details, const lfParameter ***params);
917
933 static const char *GetCropDesc (
934 lfCropMode mode, const char **details, const lfParameter ***params);
935
947 static const char *GetLensTypeDesc (lfLensType type, const char **details);
948
956 bool InterpolateDistortion (float focal, lfLensCalibDistortion &res) const;
957
965 bool InterpolateTCA (float focal, lfLensCalibTCA &res) const;
966
979 bool InterpolateVignetting (
980 float focal, float aperture, float distance, lfLensCalibVignetting &res) const;
981
989 bool InterpolateCrop (float focal, lfLensCalibCrop &res) const;
990
998 bool InterpolateFov (float focal, lfLensCalibFov &res) const;
999 #endif
1000 };
1001
1002 C_TYPEDEF (struct, lfLens)
1003
1004
1011 LF_EXPORT lfLens *lf_lens_new ();
1012
1021 LF_EXPORT void lf_lens_destroy (lfLens *lens);
1022
1032 LF_EXPORT void lf_lens_copy (lfLens *dest, const lfLens *source);
1033
1035 LF_EXPORT cbool lf_lens_check (lfLens *lens);
1036
1038 LF_EXPORT void lf_lens_guess_parameters (lfLens *lens);
1039
1041 LF_EXPORT const char *lf_get_distortion_model_desc (
1042 enum lfDistortionModel model, const char **details, const lfParameter ***params);
1043
1045 LF_EXPORT const char *lf_get_tca_model_desc (
1046 enum lfTCAModel model, const char **details, const lfParameter ***params);
1047
1049 LF_EXPORT const char *lf_get_vignetting_model_desc (
1050 enum lfVignettingModel model, const char **details, const lfParameter ***params);
1051
1053 LF_EXPORT const char *lf_get_crop_desc (
1054 enum lfCropMode mode, const char **details, const lfParameter ***params);
1055
1057 LF_EXPORT const char *lf_get_lens_type_desc (
1058 enum lfLensType type, const char **details);
1059
1061 LF_EXPORT cbool lf_lens_interpolate_distortion (const lfLens *lens, float focal,
1062 lfLensCalibDistortion *res);
1063
1065 LF_EXPORT cbool lf_lens_interpolate_tca (const lfLens *lens, float focal, lfLensCalibTCA *res);
1066
1068 LF_EXPORT cbool lf_lens_interpolate_vignetting (const lfLens *lens, float focal, float aperture,
1069 float distance, lfLensCalibVignetting *res);
1070
1072 LF_EXPORT cbool lf_lens_interpolate_crop (const lfLens *lens, float focal,
1073 lfLensCalibCrop *res);
1074
1076 LF_EXPORT cbool lf_lens_interpolate_fov (const lfLens *lens, float focal,
1077 lfLensCalibFov *res);
1078
1080 LF_EXPORT void lf_lens_add_calib_distortion (lfLens *lens, const lfLensCalibDistortion *dc);
1081
1083 LF_EXPORT cbool lf_lens_remove_calib_distortion (lfLens *lens, int idx);
1084
1086 LF_EXPORT void lf_lens_add_calib_tca (lfLens *lens, const lfLensCalibTCA *tcac);
1087
1089 LF_EXPORT cbool lf_lens_remove_calib_tca (lfLens *lens, int idx);
1090
1092 LF_EXPORT void lf_lens_add_calib_vignetting (lfLens *lens, const lfLensCalibVignetting *vc);
1093
1095 LF_EXPORT cbool lf_lens_remove_calib_vignetting (lfLens *lens, int idx);
1096
1098 LF_EXPORT void lf_lens_add_calib_crop (lfLens *lens, const lfLensCalibCrop *cc);
1099
1101 LF_EXPORT cbool lf_lens_remove_calib_crop (lfLens *lens, int idx);
1102
1104 LF_EXPORT void lf_lens_add_calib_fov (lfLens *lens, const lfLensCalibFov *cf);
1105
1107 LF_EXPORT cbool lf_lens_remove_calib_fov (lfLens *lens, int idx);
1108
1111 /*----------------------------------------------------------------------------*/
1112
1122 enum
1123 {
1129 LF_SEARCH_LOOSE = 1
1130 };
1131
1154 struct LF_EXPORT lfDatabase
1155 {
1157 char *HomeDataDir;
1158
1159 #ifdef __cplusplus
1160
1163 static lfDatabase *Create ();
1164
1168 void Destroy ();
1169
1178 lfError Load ();
1179
1191 lfError Load (const char *filename);
1192
1206 lfError Load (const char *errcontext, const char *data, size_t data_size);
1207
1215 lfError Save (const char *filename) const;
1216
1230 lfError Save (const char *filename,
1231 const lfMount *const *mounts,
1232 const lfCamera *const *cameras,
1233 const lfLens *const *lenses) const;
1234
1247 static char *Save (const lfMount *const *mounts,
1248 const lfCamera *const *cameras,
1249 const lfLens *const *lenses);
1250
1274 const lfCamera **FindCameras (const char *maker, const char *model) const;
1275
1295 const lfCamera **FindCamerasExt (const char *maker, const char *model,
1296 int sflags = 0) const;
1297
1305 const lfCamera *const *GetCameras () const;
1306
1343 const lfLens **FindLenses (const lfCamera *camera, const char *maker,
1344 const char *model, int sflags = 0) const;
1345
1363 const lfLens **FindLenses (const lfLens *lens, int sflags = 0) const;
1364
1372 const lfLens *const *GetLenses () const;
1373
1381 const lfMount *FindMount (const char *mount) const;
1382
1390 const char *MountName (const char *mount) const;
1391
1399 const lfMount *const *GetMounts () const;
1400
1401 protected:
1402 /* Prevent user from creating and destroying such objects */
1403 lfDatabase () {}
1404 ~lfDatabase () {}
1405 #endif
1406 };
1407
1408 C_TYPEDEF (struct, lfDatabase)
1409
1410
1419 LF_EXPORT lfDatabase *lf_db_new (void);
1420
1429 LF_EXPORT void lf_db_destroy (lfDatabase *db);
1430
1432 LF_EXPORT lfError lf_db_load (lfDatabase *db);
1433
1435 LF_EXPORT lfError lf_db_load_file (lfDatabase *db, const char *filename);
1436
1438 LF_EXPORT lfError lf_db_load_data (lfDatabase *db, const char *errcontext,
1439 const char *data, size_t data_size);
1440
1442 LF_EXPORT lfError lf_db_save_all (const lfDatabase *db, const char *filename);
1443
1445 LF_EXPORT lfError lf_db_save_file (const lfDatabase *db, const char *filename,
1446 const lfMount *const *mounts,
1447 const lfCamera *const *cameras,
1448 const lfLens *const *lenses);
1449
1451 LF_EXPORT char *lf_db_save (const lfMount *const *mounts,
1452 const lfCamera *const *cameras,
1453 const lfLens *const *lenses);
1454
1456 LF_EXPORT const lfCamera **lf_db_find_cameras (
1457 const lfDatabase *db, const char *maker, const char *model);
1458
1460 LF_EXPORT const lfCamera **lf_db_find_cameras_ext (
1461 const lfDatabase *db, const char *maker, const char *model, int sflags);
1462
1464 LF_EXPORT const lfCamera *const *lf_db_get_cameras (const lfDatabase *db);
1465
1467 LF_EXPORT const lfLens **lf_db_find_lenses_hd (
1468 const lfDatabase *db, const lfCamera *camera, const char *maker,
1469 const char *lens, int sflags);
1470
1472 LF_EXPORT const lfLens **lf_db_find_lenses (
1473 const lfDatabase *db, const lfLens *lens, int sflags);
1474
1476 LF_EXPORT const lfLens *const *lf_db_get_lenses (const lfDatabase *db);
1477
1479 LF_EXPORT const lfMount *lf_db_find_mount (const lfDatabase *db, const char *mount);
1480
1482 LF_EXPORT const char *lf_db_mount_name (const lfDatabase *db, const char *mount);
1483
1485 LF_EXPORT const lfMount *const *lf_db_get_mounts (const lfDatabase *db);
1486
1489 /*----------------------------------------------------------------------------*/
1490
1499 enum
1500 {
1502 LF_MODIFY_TCA = 0x00000001,
1504 LF_MODIFY_VIGNETTING = 0x00000002,
1506 LF_MODIFY_CCI = 0x00000004,
1508 LF_MODIFY_DISTORTION = 0x00000008,
1510 LF_MODIFY_GEOMETRY = 0x00000010,
1512 LF_MODIFY_SCALE = 0x00000020,
1514 LF_MODIFY_ALL = ~0
1515 };
1516
1518 enum lfPixelFormat
1519 {
1521 LF_PF_U8,
1523 LF_PF_U16,
1525 LF_PF_U32,
1527 LF_PF_F32,
1529 LF_PF_F64
1530 };
1531
1532 C_TYPEDEF (enum, lfPixelFormat)
1533
1534
1535 enum lfComponentRole
1536 {
1541 LF_CR_END = 0,
1548 LF_CR_NEXT,
1550 LF_CR_UNKNOWN,
1552 LF_CR_INTENSITY,
1554 LF_CR_RED,
1556 LF_CR_GREEN,
1558 LF_CR_BLUE
1559 };
1560
1561 C_TYPEDEF (enum, lfComponentRole)
1562
1563
1564 #define LF_CR_1(a) (LF_CR_ ## a)
1565
1566 #define LF_CR_2(a,b) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4))
1567
1568 #define LF_CR_3(a,b,c) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1569 ((LF_CR_ ## c) << 8))
1570
1571 #define LF_CR_4(a,b,c,d) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1572 ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12))
1573
1574 #define LF_CR_5(a,b,c,d,e) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1575 ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
1576 ((LF_CR_ ## e) << 16))
1577
1578 #define LF_CR_6(a,b,c,d,e,f) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1579 ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
1580 ((LF_CR_ ## e) << 16) | ((LF_CR_ ## f) << 20))
1581
1582 #define LF_CR_7(a,b,c,d,e,f,g) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1583 ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
1584 ((LF_CR_ ## e) << 16) | ((LF_CR_ ## f) << 20) | \
1585 ((LF_CR_ ## g) << 24))
1586
1587 #define LF_CR_8(a,b,c,d,e,f,g,h) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
1588 ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
1589 ((LF_CR_ ## e) << 16) | ((LF_CR_ ## f) << 20) | \
1590 ((LF_CR_ ## g) << 24) | ((LF_CR_ ## h) << 28))
1591
1606 typedef void (*lfSubpixelCoordFunc) (void *data, float *iocoord, int count);
1607
1631 typedef void (*lfModifyColorFunc) (void *data, float x, float y,
1632 void *pixels, int comp_role, int count);
1633
1645 typedef void (*lfModifyCoordFunc) (void *data, float *iocoord, int count);
1646
1706 struct LF_EXPORT lfModifier
1707 {
1708 #ifdef __cplusplus
1709
1729 static lfModifier *Create (const lfLens *lens, float crop, int width, int height);
1730
1771 int Initialize (
1772 const lfLens *lens, lfPixelFormat format, float focal, float aperture,
1773 float distance, float scale, lfLensType targeom, int flags, bool reverse);
1774
1779 void Destroy ();
1780
1797 void AddCoordCallback (lfModifyCoordFunc callback, int priority,
1798 void *data, size_t data_size);
1799
1817 void AddSubpixelCallback (lfSubpixelCoordFunc callback, int priority,
1818 void *data, size_t data_size);
1819
1836 void AddColorCallback (lfModifyColorFunc callback, int priority,
1837 void *data, size_t data_size);
1838
1852 bool AddSubpixelCallbackTCA (lfLensCalibTCA &model, bool reverse = false);
1853
1868 bool AddColorCallbackVignetting (lfLensCalibVignetting &model, lfPixelFormat format,
1869 bool reverse = false);
1870
1885 bool AddColorCallbackCCI (const lfLens *lens, lfPixelFormat format,
1886 bool reverse = false);
1887
1900 bool AddCoordCallbackDistortion (lfLensCalibDistortion &model, bool reverse = false);
1901
1914 bool AddCoordCallbackGeometry (lfLensType from, lfLensType to, float focal);
1915
1931 bool AddCoordCallbackScale (float scale, bool reverse = false);
1932
1945 float GetAutoScale (bool reverse);
1946
1975 bool ApplySubpixelDistortion (float xu, float yu, int width, int height,
1976 float *res) const;
1977
2006 bool ApplyColorModification (void *pixels, float x, float y, int width, int height,
2007 int comp_role, int row_stride) const;
2008
2035 bool ApplyGeometryDistortion (float xu, float yu, int width, int height,
2036 float *res) const;
2037
2065 bool ApplySubpixelGeometryDistortion (float xu, float yu, int width, int height,
2066 float *res) const;
2067
2068 protected:
2069 /* Prevent user from creating and destroying such objects */
2070 lfModifier () {}
2071 ~lfModifier () {}
2072 #elif defined _MSC_VER
2073 /* Sucks, like always */
2074 void *dummy;
2075 #endif
2076 };
2077
2078 C_TYPEDEF (struct, lfModifier)
2079
2080
2081 LF_EXPORT lfModifier *lf_modifier_new (
2082 const lfLens *lens, float crop, int width, int height);
2083
2085 LF_EXPORT void lf_modifier_destroy (lfModifier *modifier);
2086
2088 LF_EXPORT int lf_modifier_initialize (
2089 lfModifier *modifier, const lfLens *lens, lfPixelFormat format,
2090 float focal, float aperture, float distance, float scale,
2091 lfLensType targeom, int flags, cbool reverse);
2092
2094 LF_EXPORT void lf_modifier_add_coord_callback (
2095 lfModifier *modifier, lfModifyCoordFunc callback, int priority,
2096 void *data, size_t data_size);
2097
2099 LF_EXPORT void lf_modifier_add_subpixel_callback (
2100 lfModifier *modifier, lfSubpixelCoordFunc callback, int priority,
2101 void *data, size_t data_size);
2102
2104 LF_EXPORT void lf_modifier_add_color_callback (
2105 lfModifier *modifier, lfModifyColorFunc callback, int priority,
2106 void *data, size_t data_size);
2107
2109 LF_EXPORT cbool lf_modifier_add_subpixel_callback_TCA (
2110 lfModifier *modifier, lfLensCalibTCA *model, cbool reverse);
2111
2113 LF_EXPORT cbool lf_modifier_add_color_callback_vignetting (
2114 lfModifier *modifier, lfLensCalibVignetting *model,
2115 lfPixelFormat format, cbool reverse);
2116
2118 LF_EXPORT cbool lf_modifier_add_color_callback_CCI (
2119 lfModifier *modifier, const lfLens *lens,
2120 lfPixelFormat format, cbool reverse);
2121
2123 LF_EXPORT cbool lf_modifier_add_coord_callback_distortion (
2124 lfModifier *modifier, lfLensCalibDistortion *model, cbool reverse);
2125
2127 LF_EXPORT cbool lf_modifier_add_coord_callback_geometry (
2128 lfModifier *modifier, lfLensType from, lfLensType to, float focal);
2129
2131 LF_EXPORT cbool lf_modifier_add_coord_callback_scale (
2132 lfModifier *modifier, float scale, cbool reverse);
2133
2135 LF_EXPORT float lf_modifier_get_auto_scale (
2136 lfModifier *modifier, cbool reverse);
2137
2139 LF_EXPORT cbool lf_modifier_apply_subpixel_distortion (
2140 lfModifier *modifier, float xu, float yu, int width, int height, float *res);
2141
2143 LF_EXPORT cbool lf_modifier_apply_color_modification (
2144 lfModifier *modifier, void *pixels, float x, float y, int width, int height,
2145 int comp_role, int row_stride);
2146
2148 LF_EXPORT cbool lf_modifier_apply_geometry_distortion (
2149 lfModifier *modifier, float xu, float yu, int width, int height, float *res);
2150
2152 LF_EXPORT cbool lf_modifier_apply_subpixel_geometry_distortion (
2153 lfModifier *modifier, float xu, float yu, int width, int height, float *res);
2154
2157 #undef cbool
2158
2159 #ifdef __cplusplus
2160 }
2161 #endif
2162
2163 #endif /* __LENSFUN_H__ */
lfLens::RedCCI
float RedCCI
Lens colour contribution index (ISO/CCI, ISO 6728:1983).
Definition: lensfun.h:698
LF_PANORAMIC
Panoramic (cylindrical)
Definition: lensfun.h:641
lf_db_load_file
lfError lf_db_load_file(lfDatabase *db, const char *filename)
LF_DIST_MODEL_FOV1
Field-of-view lens model: Ru = tg (Rd * omega) / (2 * tg (omega/2)) Ref: ftp://ftp-sop.inria.fr/chir/publis/devernay-faugeras:01.pdf.
Definition: lensfun.h:428
lfDistortionModel
lfDistortionModel
The lensdb library implements several lens distortion models.
Definition: lensfun.h:408
lfLens::MinAperture
float MinAperture
Aperture at minimum focal length (ex: 3.5).
Definition: lensfun.h:680
lfModifyCoordFunc
void(* lfModifyCoordFunc)(void *data, float *iocoord, int count)
A callback function which modifies the coordinates of a strip of pixels.
Definition: lensfun.h:1645
LF_PF_U16
Unsigned 16-bit R,G,B.
Definition: lensfun.h:1523
LF_CR_UNKNOWN
This component has an unknown/doesn&#39;t matter role.
Definition: lensfun.h:1550
lf_modifier_apply_subpixel_geometry_distortion
cbool lf_modifier_apply_subpixel_geometry_distortion(lfModifier *modifier, float xu, float yu, int width, int height, float *res)
lf_lens_add_calib_tca
void lf_lens_add_calib_tca(lfLens *lens, const lfLensCalibTCA *tcac)
lf_db_find_cameras
const lfCamera ** lf_db_find_cameras(const lfDatabase *db, const char *maker, const char *model)
lfLens::Maker
lfMLstr Maker
Lens maker (ex: "Rollei")
Definition: lensfun.h:672
lf_modifier_initialize
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)
lfLens::CalibDistortion
lfLensCalibDistortion ** CalibDistortion
Lens distortion calibration data, NULL-terminated (unsorted)
Definition: lensfun.h:708
lfLensCalibFov::FieldOfView
float FieldOfView
Field of view for given images.
Definition: lensfun.h:604
LF_RECTILINEAR
A rectilinear lens - 99% of all lenses are of this type.
Definition: lensfun.h:634
LF_MODIFY_DISTORTION
Correct (or apply) lens distortion.
Definition: lensfun.h:1508
lfLens::Type
lfLensType Type
Lens type.
Definition: lensfun.h:706
lfMount::Compat
char ** Compat
A list of compatible mounts.
Definition: lensfun.h:171
lfLens::CalibVignetting
lfLensCalibVignetting ** CalibVignetting
Lens vignetting calibration data, NULL-terminated (unsorted)
Definition: lensfun.h:712
LF_NO_CROP
no crop at all
Definition: lensfun.h:560
LF_PF_F64
64-bit floating-point R,G,B
Definition: lensfun.h:1529
LF_PF_U8
Unsigned 8-bit R,G,B.
Definition: lensfun.h:1521
LF_DIST_MODEL_POLY5
5th order polynomial model: Ru = Rd * (1 + k1 * Rd^2 + k2 * Rd^4)
Definition: lensfun.h:422
lfError
lfError
liblensdb error codes: negative codes are -errno, positive are here
Definition: lensfun.h:93
lf_get_distortion_model_desc
const char * lf_get_distortion_model_desc(enum lfDistortionModel model, const char **details, const lfParameter ***params)
lf_lens_guess_parameters
void lf_lens_guess_parameters(lfLens *lens)
lfLens::CenterX
float CenterX
The horizontal shift of all lens distortions.
Definition: lensfun.h:694
lfLens::CropFactor
float CropFactor
Crop factor at which calibration measurements were taken.
Definition: lensfun.h:704
lfLensCalibVignetting::Focal
float Focal
Focal length at which this calibration data was taken (0 - unspecified)
Definition: lensfun.h:543
lfLensCalibTCA
Laterlal chromatic aberrations calibration data.
Definition: lensfun.h:493
lfLensCalibDistortion
Lens distortion calibration data.
Definition: lensfun.h:443
lfSubpixelCoordFunc
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:1606
lf_modifier_add_subpixel_callback
void lf_modifier_add_subpixel_callback(lfModifier *modifier, lfSubpixelCoordFunc callback, int priority, void *data, size_t data_size)
lfLens::BlueCCI
float BlueCCI
Blue component of lens CCI.
Definition: lensfun.h:702
lf_modifier_add_color_callback_vignetting
cbool lf_modifier_add_color_callback_vignetting(lfModifier *modifier, lfLensCalibVignetting *model, lfPixelFormat format, cbool reverse)
lf_modifier_add_coord_callback
void lf_modifier_add_coord_callback(lfModifier *modifier, lfModifyCoordFunc callback, int priority, void *data, size_t data_size)
lf_lens_copy
void lf_lens_copy(lfLens *dest, const lfLens *source)
Copy the data from one lfLens structure into another.
lf_mount_destroy
void lf_mount_destroy(lfMount *mount)
Destroy a lfMount object.
lf_lens_remove_calib_tca
cbool lf_lens_remove_calib_tca(lfLens *lens, int idx)
lf_lens_remove_calib_vignetting
cbool lf_lens_remove_calib_vignetting(lfLens *lens, int idx)
lfLens
Lens data.
Definition: lensfun.h:669
lf_lens_interpolate_distortion
cbool lf_lens_interpolate_distortion(const lfLens *lens, float focal, lfLensCalibDistortion *res)
lfPixelFormat
lfPixelFormat
A list of pixel formats supported by internal colour callbacks.
Definition: lensfun.h:1518
LF_MODIFY_SCALE
Additional resize of image.
Definition: lensfun.h:1512
lfVignettingModel
lfVignettingModel
The lensdb library supports several models for lens vignetting correction.
Definition: lensfun.h:516
lfLens::CalibTCA
lfLensCalibTCA ** CalibTCA
Lens TCA calibration data, NULL-terminated (unsorted)
Definition: lensfun.h:710
lfLens::CenterY
float CenterY
The vertical shift of all lens distortions.
Definition: lensfun.h:696
lfLens::GreenCCI
float GreenCCI
Green component of lens CCI.
Definition: lensfun.h:700
lf_modifier_add_coord_callback_scale
cbool lf_modifier_add_coord_callback_scale(lfModifier *modifier, float scale, cbool reverse)
lfMount
This structure contains everything specific to a camera mount.
Definition: lensfun.h:166
lfLens::MinFocal
float MinFocal
Minimum focal length, mm (ex: 35).
Definition: lensfun.h:676
lf_db_mount_name
const char * lf_db_mount_name(const lfDatabase *db, const char *mount)
LF_FISHEYE_STEREOGRAPHIC
stereographic fisheye
Definition: lensfun.h:650
lfLens::Score
int Score
Lens matching score, used while searching: not actually a lens parameter.
Definition: lensfun.h:718
LF_TCA_MODEL_LINEAR
Linear lateral chromatic aberrations model: Cd(R) = Cs(R) * kr Cd(B) = Cs(B) * kb Ref: http://cipa...
Definition: lensfun.h:474
LF_TCA_MODEL_POLY3
Third order polynomial: Cd(R) = Cs(R)^3 * br + Cs(R)^2 * cr + Cs(R) * vr Cd(B) = Cs(B)^3 * bb + Cs(B)...
Definition: lensfun.h:482
LF_MODIFY_GEOMETRY
Convert image geometry.
Definition: lensfun.h:1510
LF_CROP_CIRCLE
use a circular crop, e.g.
Definition: lensfun.h:564
cbool
#define cbool
C-compatible bool type; don&#39;t bother to define Yet Another Boolean Type.
Definition: lensfun.h:80
lfLens::Model
lfMLstr Model
Lens model (ex: "Zoom-Rolleinar")
Definition: lensfun.h:674
lfLensCalibCrop::Focal
float Focal
Focal length at which this calibration data was taken (0 - unspecified)
Definition: lensfun.h:575
lf_modifier_apply_subpixel_distortion
cbool lf_modifier_apply_subpixel_distortion(lfModifier *modifier, float xu, float yu, int width, int height, float *res)
lf_db_find_lenses_hd
const lfLens ** lf_db_find_lenses_hd(const lfDatabase *db, const lfCamera *camera, const char *maker, const char *lens, int sflags)
lfCamera::Score
int Score
Camera matching score, used while searching: not actually a camera parameter.
Definition: lensfun.h:285
lf_free
void lf_free(void *data)
The basics of memory allocation: never free objects allocated by the library yourselves, instead use this function.
lf_mount_check
cbool lf_mount_check(lfMount *mount)
lf_modifier_get_auto_scale
float lf_modifier_get_auto_scale(lfModifier *modifier, cbool reverse)
LF_FISHEYE_ORTHOGRAPHIC
orthographic fisheye
Definition: lensfun.h:648
lf_db_get_cameras
const lfCamera *const * lf_db_get_cameras(const lfDatabase *db)
lf_modifier_new
lfModifier * lf_modifier_new(const lfLens *lens, float crop, int width, int height)
lfLensType
lfLensType
Lens type.
Definition: lensfun.h:629
LF_MODIFY_VIGNETTING
Correct (or apply) lens vignetting.
Definition: lensfun.h:1504
lf_lens_remove_calib_crop
cbool lf_lens_remove_calib_crop(lfLens *lens, int idx)
lf_lens_interpolate_fov
cbool lf_lens_interpolate_fov(const lfLens *lens, float focal, lfLensCalibFov *res)
LF_DIST_MODEL_PTLENS
PTLens rectilinear: Ru = Rd * (a * Rd^3 + b * Rd^2 + c * Rd + 1 - a - b - c)
Definition: lensfun.h:433
LF_CR_INTENSITY
This is the pixel intensity (grayscale)
Definition: lensfun.h:1552
LF_DIST_MODEL_POLY3
3rd order polynomial model: Ru = Rd * (1 - k1 + k1 * Rd^2) Ref: http://www.imatest.com/docs/distortion.html
Definition: lensfun.h:417
LF_CROP_RECTANGLE
use a rectangular crop
Definition: lensfun.h:562
lf_get_tca_model_desc
const char * lf_get_tca_model_desc(enum lfTCAModel model, const char **details, const lfParameter ***params)
lf_modifier_add_subpixel_callback_TCA
cbool lf_modifier_add_subpixel_callback_TCA(lfModifier *modifier, lfLensCalibTCA *model, cbool reverse)
lf_db_find_mount
const lfMount * lf_db_find_mount(const lfDatabase *db, const char *mount)
C_TYPEDEF
#define C_TYPEDEF(t, c)
Helper macro to make C/C++ work similarly.
Definition: lensfun.h:29
LF_FISHEYE_EQUISOLID
equisolid fisheye
Definition: lensfun.h:652
LF_FISHEYE_THOBY
fisheye Thoby (for Nikkor 10.5)
Definition: lensfun.h:654
lf_db_get_mounts
const lfMount *const * lf_db_get_mounts(const lfDatabase *db)
lfLensCalibTCA::Focal
float Focal
Focal length at which this calibration data was taken (0 - unspecified)
Definition: lensfun.h:498
lf_lens_interpolate_crop
cbool lf_lens_interpolate_crop(const lfLens *lens, float focal, lfLensCalibCrop *res)
LF_CR_RED
This is the Red pixel component.
Definition: lensfun.h:1554
LF_CR_GREEN
This is the Green pixel component.
Definition: lensfun.h:1556
LF_EXPORT
#define LF_EXPORT
This macro expands to an appropiate symbol visibility declaration.
Definition: lensfun.h:60
lf_camera_destroy
void lf_camera_destroy(lfCamera *camera)
Destroy a lfCamera object.
lf_lens_new
lfLens * lf_lens_new()
Create a new lens object.
lfParameter::Min
float Min
Minimal value that has sense.
Definition: lensfun.h:617
lfParameter::Max
float Max
Maximal value that has sense.
Definition: lensfun.h:619
LF_UNKNOWN
Unknown lens type.
Definition: lensfun.h:632
lf_modifier_apply_color_modification
cbool lf_modifier_apply_color_modification(lfModifier *modifier, void *pixels, float x, float y, int width, int height, int comp_role, int row_stride)
lf_db_find_cameras_ext
const lfCamera ** lf_db_find_cameras_ext(const lfDatabase *db, const char *maker, const char *model, int sflags)
lfModifier
A modifier object contains optimized data required to rectify a image.
Definition: lensfun.h:1706
lf_camera_check
cbool lf_camera_check(lfCamera *camera)
LF_CR_END
This marks the end of the role list.
Definition: lensfun.h:1541
lfCamera::CropFactor
float CropFactor
Camera crop factor (ex: 1.0).
Definition: lensfun.h:283
lf_mlstr_get
const char * lf_mlstr_get(const lfMLstr str)
Get a string corresponding to current locale from a multi-language string.
lf_camera_copy
void lf_camera_copy(lfCamera *dest, const lfCamera *source)
Copy the data from one lfCamera structure into another.
LF_WRONG_FORMAT
Wrong XML data format.
Definition: lensfun.h:98
LF_SEARCH_LOOSE
This flag selects a looser search algorithm resulting in more results (still sorted by score)...
Definition: lensfun.h:1129
lfLensCalibVignetting::Distance
float Distance
Distance to subject (important only for vignetting)
Definition: lensfun.h:547
lf_lens_add_calib_distortion
void lf_lens_add_calib_distortion(lfLens *lens, const lfLensCalibDistortion *dc)
lf_lens_remove_calib_fov
cbool lf_lens_remove_calib_fov(lfLens *lens, int idx)
lf_modifier_destroy
void lf_modifier_destroy(lfModifier *modifier)
lfLensCalibVignetting::Aperture
float Aperture
Aperture at which this calibration data was taken (0 - unspecified)
Definition: lensfun.h:545
LF_CR_BLUE
This is the Blue pixel component.
Definition: lensfun.h:1558
lf_modifier_apply_geometry_distortion
cbool lf_modifier_apply_geometry_distortion(lfModifier *modifier, float xu, float yu, int width, int height, float *res)
lf_camera_new
lfCamera * lf_camera_new()
Create a new camera object.
lfLens::MaxFocal
float MaxFocal
Maximum focal length, mm (ex: 105).
Definition: lensfun.h:678
LF_MODIFY_TCA
Correct (or apply) lens transversal chromatic aberrations.
Definition: lensfun.h:1502
lf_mount_copy
void lf_mount_copy(lfMount *dest, const lfMount *source)
Copy the data from one lfMount structure into another.
lfComponentRole
lfComponentRole
These constants define the role of every pixel component, four bits each.
Definition: lensfun.h:1535
lf_get_lens_type_desc
const char * lf_get_lens_type_desc(enum lfLensType type, const char **details)
lfLens::Mounts
char ** Mounts
Available mounts (NULL-terminated list) (ex: { "QBM", NULL })
Definition: lensfun.h:684
LF_EQUIRECTANGULAR
Equirectangular (not that there are such lenses, but useful to convert images TO this type...
Definition: lensfun.h:646
LF_MODIFY_CCI
Correct (or apply) lens color contribution index.
Definition: lensfun.h:1506
LF_CR_NEXT
This value tells that what follows applies to next pixel.
Definition: lensfun.h:1548
lfLensCalibDistortion::Focal
float Focal
Focal length at which this calibration data was taken (0 - unspecified)
Definition: lensfun.h:448
lfLensCalibFov::Focal
float Focal
Focal length at which this calibration data was taken (0 - unspecified)
Definition: lensfun.h:597
lf_lens_interpolate_tca
cbool lf_lens_interpolate_tca(const lfLens *lens, float focal, lfLensCalibTCA *res)
lf_lens_destroy
void lf_lens_destroy(lfLens *lens)
Destroy a lfLens object.
LF_MODIFY_ALL
Apply all possible corrections.
Definition: lensfun.h:1514
lf_db_find_lenses
const lfLens ** lf_db_find_lenses(const lfDatabase *db, const lfLens *lens, int sflags)
lf_db_destroy
void lf_db_destroy(lfDatabase *db)
Destroy the database object.
lf_modifier_add_color_callback_CCI
cbool lf_modifier_add_color_callback_CCI(lfModifier *modifier, const lfLens *lens, lfPixelFormat format, cbool reverse)
LF_FISHEYE
Fisheye lens Ref: http://wiki.panotools.org/Fisheye_Projection.
Definition: lensfun.h:639
lf_db_load_data
lfError lf_db_load_data(lfDatabase *db, const char *errcontext, const char *data, size_t data_size)
lf_modifier_add_coord_callback_geometry
cbool lf_modifier_add_coord_callback_geometry(lfModifier *modifier, lfLensType from, lfLensType to, float focal)
lf_modifier_add_color_callback
void lf_modifier_add_color_callback(lfModifier *modifier, lfModifyColorFunc callback, int priority, void *data, size_t data_size)
LF_PF_U32
Unsigned 32-bit R,G,B.
Definition: lensfun.h:1525
LF_TCA_MODEL_NONE
No TCA correction data is known.
Definition: lensfun.h:467
lfCamera::Model
lfMLstr Model
Model name (ex: "Rolleiflex SL35") – same as in EXIF.
Definition: lensfun.h:277
lf_get_crop_desc
const char * lf_get_crop_desc(enum lfCropMode mode, const char **details, const lfParameter ***params)
lfLens::CalibFov
lfLensCalibFov ** CalibFov
Field of view calibration data, NULL-terminated (unsorted)
Definition: lensfun.h:716
lfCamera::Maker
lfMLstr Maker
Camera maker (ex: "Rollei") – same as in EXIF.
Definition: lensfun.h:275
LF_NO_ERROR
No error occured.
Definition: lensfun.h:96
lf_db_new
lfDatabase * lf_db_new(void)
Create a new empty database object.
lf_lens_check
cbool lf_lens_check(lfLens *lens)
lf_get_vignetting_model_desc
const char * lf_get_vignetting_model_desc(enum lfVignettingModel model, const char **details, const lfParameter ***params)
lfCamera::Mount
char * Mount
Camera mount type (ex: "QBM")
Definition: lensfun.h:281
lfMLstr
char * lfMLstr
The storage of "multi-language" strings is simple yet flexible, handy and effective.
Definition: lensfun.h:90
lfDatabase
A lens database object.
Definition: lensfun.h:1154
lf_lens_add_calib_crop
void lf_lens_add_calib_crop(lfLens *lens, const lfLensCalibCrop *cc)
lf_db_get_lenses
const lfLens *const * lf_db_get_lenses(const lfDatabase *db)
LF_VIGNETTING_MODEL_PA
Pablo D&#39;Angelo vignetting model (which is a more general variant of the cos^4 law): Cd = Cs * (1 + k1...
Definition: lensfun.h:526
LF_DIST_MODEL_NONE
Distortion parameters are unknown.
Definition: lensfun.h:411
lfMount::Name
lfMLstr Name
Camera mount name.
Definition: lensfun.h:169
lfLensCalibVignetting
Lens vignetting calibration data.
Definition: lensfun.h:538
lf_mlstr_add
lfMLstr lf_mlstr_add(lfMLstr str, const char *lang, const char *trstr)
Add a new translated string to a multi-language string.
LF_VIGNETTING_MODEL_NONE
No vignetting correction data is known.
Definition: lensfun.h:519
lf_lens_add_calib_vignetting
void lf_lens_add_calib_vignetting(lfLens *lens, const lfLensCalibVignetting *vc)
lf_db_save_all
lfError lf_db_save_all(const lfDatabase *db, const char *filename)
lf_lens_interpolate_vignetting
cbool lf_lens_interpolate_vignetting(const lfLens *lens, float focal, float aperture, float distance, lfLensCalibVignetting *res)
lfTCAModel
lfTCAModel
The lensdb library supports several models for lens lateral chromatic aberrations (also called transv...
Definition: lensfun.h:464
lf_modifier_add_coord_callback_distortion
cbool lf_modifier_add_coord_callback_distortion(lfModifier *modifier, lfLensCalibDistortion *model, cbool reverse)
lfParameter::Default
float Default
Default value for the parameter.
Definition: lensfun.h:621
lf_mount_new
lfMount * lf_mount_new()
Create a new mount object.
lfCropMode
lfCropMode
Different crop modes.
Definition: lensfun.h:557
lfLensCalibFov
Struct to save calibrated field of view, which can depends on the focal length.
Definition: lensfun.h:594
lfLens::CalibCrop
lfLensCalibCrop ** CalibCrop
Crop data, NULL-terminated (unsorted)
Definition: lensfun.h:714
lfCamera
Camera data.
Definition: lensfun.h:272
lf_db_save
char * lf_db_save(const lfMount *const *mounts, const lfCamera *const *cameras, const lfLens *const *lenses)
lf_mlstr_dup
lfMLstr lf_mlstr_dup(const lfMLstr str)
Create a complete copy of a multi-language string.
lfCamera::Variant
lfMLstr Variant
Camera variant.
Definition: lensfun.h:279
lfModifyColorFunc
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 This kind of callbacks are used in...
Definition: lensfun.h:1631
lfLensCalibCrop
Struct to save image crop, which can depend on the focal length.
Definition: lensfun.h:572
lf_lens_add_calib_fov
void lf_lens_add_calib_fov(lfLens *lens, const lfLensCalibFov *cf)
LF_PF_F32
32-bit floating-point R,G,B
Definition: lensfun.h:1527
lf_db_save_file
lfError lf_db_save_file(const lfDatabase *db, const char *filename, const lfMount *const *mounts, const lfCamera *const *cameras, const lfLens *const *lenses)
lfParameter::Name
const char * Name
Parameter name (something like &#39;k&#39;, &#39;k3&#39;, &#39;omega&#39; etc.
Definition: lensfun.h:615
lfParameter
This structure describes a single parameter for some lens model.
Definition: lensfun.h:612
lf_db_load
lfError lf_db_load(lfDatabase *db)
lf_lens_remove_calib_distortion
cbool lf_lens_remove_calib_distortion(lfLens *lens, int idx)
lfDatabase::HomeDataDir
char * HomeDataDir
Home lens database directory (something like "~/.local/share/lensfun")
Definition: lensfun.h:1157
lfLens::MaxAperture
float MaxAperture
Aperture at maximum focal length (ex: 4.3).
Definition: lensfun.h:682