lensfun: lensfun.h Source File

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

# lensfun.h

Go to the documentation of this file.

    00001 /*
    00002     LensFun - a library for maintaining a database of photographical lenses,
    00003     and providing the means to correct some of the typical lens distortions.
    00004     Copyright (C) 2007 by Andrew Zabolotny
    00005
    00006     This library is free software; you can redistribute it and/or
    00007     modify it under the terms of the GNU Library General Public
    00008     License as published by the Free Software Foundation; either
    00009     version 2 of the License, or (at your option) any later version.
    00010
    00011     This library is distributed in the hope that it will be useful,
    00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014     Library General Public License for more details.
    00015
    00016     You should have received a copy of the GNU Library General Public
    00017     License along with this library; if not, write to the Free
    00018     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00019 */
    00020
    00021 #ifndef __LENSFUN_H__
    00022 #define __LENSFUN_H__
    00023
    00024 #include <stddef.h>
    00025
    00026 #ifdef __cplusplus
    00027 extern "C" {
    00029 #  define C_TYPEDEF(t,c)
    00030 #else
    00031 #  define C_TYPEDEF(t,c) typedef t c c;
    00032 #endif
    00033
    00039 /*----------------------------------------------------------------------------*/
    00040
    00047 #ifdef CONF_SYMBOL_VISIBILITY
    00048 #   if defined CONF_COMPILER_gcc
    00049 #       define LF_EXPORT    __attribute__((visibility("default")))
    00050 #   elif defined CONF_COMPILER_msvc
    00051 #       define LF_EXPORT    __declspec(dllexport)
    00052 #   else
    00053 #       error "I don't know how to change symbol visibility for your compiler"
    00054 #   endif
    00055 #else
    00056 #   if defined CONF_COMPILER_msvc
    00057 #       define LF_EXPORT    __declspec(dllimport)
    00058 #   else
    00060 #       define LF_EXPORT
    00061 #   endif
    00062 #endif
    00063
    00065 #define cbool int
    00066
    00075 typedef char *lfMLstr;
    00076
    00078 enum lfError
    00079 {
    00081     LF_NO_ERROR = 0,
    00083     LF_WRONG_FORMAT
    00084 };
    00085
    00086 C_TYPEDEF (enum, lfError)
    00087
    00088
    00096 LF_EXPORT void lf_free (void *data);
    00097
    00104 LF_EXPORT const char *lf_mlstr_get (const lfMLstr str);
    00105
    00121 LF_EXPORT lfMLstr lf_mlstr_add (lfMLstr str, const char *lang, const char *trstr);
    00122
    00130 LF_EXPORT lfMLstr lf_mlstr_dup (const lfMLstr str);
    00131
    00134 /*----------------------------------------------------------------------------*/
    00135
    00151 struct LF_EXPORT lfMount
    00152 {
    00154     lfMLstr Name;
    00156     char **Compat;
    00157
    00158 #ifdef __cplusplus
    00159
    00162     lfMount ();
    00163
    00167     lfMount &operator = (const lfMount &other);
    00168
    00172     ~lfMount ();
    00173
    00182     void SetName (const char *val, const char *lang = NULL);
    00183
    00189     void AddCompat (const char *val);
    00190
    00196     bool Check ();
    00197 #endif
    00198 };
    00199
    00200 C_TYPEDEF (struct, lfMount)
    00201
    00202
    00209 LF_EXPORT lfMount *lf_mount_new ();
    00210
    00219 LF_EXPORT void lf_mount_destroy (lfMount *mount);
    00220
    00230 LF_EXPORT void lf_mount_copy (lfMount *dest, const lfMount *source);
    00231
    00233 LF_EXPORT cbool lf_mount_check (lfMount *mount);
    00234
    00237 /*----------------------------------------------------------------------------*/
    00238
    00257 struct LF_EXPORT lfCamera
    00258 {
    00260     lfMLstr Maker;
    00262     lfMLstr Model;
    00264     lfMLstr Variant;
    00266     char *Mount;
    00268     float CropFactor;
    00270     int Score;
    00271
    00272 #ifdef __cplusplus
    00273
    00276     lfCamera ();
    00277
    00281     lfCamera (const lfCamera &other);
    00282
    00286     ~lfCamera ();
    00287
    00291     lfCamera &operator = (const lfCamera &other);
    00292
    00301     void SetMaker (const char *val, const char *lang = NULL);
    00302
    00311     void SetModel (const char *val, const char *lang = NULL);
    00312
    00321     void SetVariant (const char *val, const char *lang = NULL);
    00322
    00328     void SetMount (const char *val);
    00329
    00335     bool Check ();
    00336 #endif
    00337 };
    00338
    00339 C_TYPEDEF (struct, lfCamera)
    00340
    00341
    00348 LF_EXPORT lfCamera *lf_camera_new ();
    00349
    00358 LF_EXPORT void lf_camera_destroy (lfCamera *camera);
    00359
    00369 LF_EXPORT void lf_camera_copy (lfCamera *dest, const lfCamera *source);
    00370
    00372 LF_EXPORT cbool lf_camera_check (lfCamera *camera);
    00373
    00376 /*----------------------------------------------------------------------------*/
    00377
    00393 enum lfDistortionModel
    00394 {
    00396     LF_DIST_MODEL_NONE,
    00402     LF_DIST_MODEL_POLY3,
    00407     LF_DIST_MODEL_POLY5,
    00413     LF_DIST_MODEL_FOV1,
    00418     LF_DIST_MODEL_PTLENS,
    00419 };
    00420
    00421 C_TYPEDEF (enum, lfDistortionModel)
    00422
    00423
    00428 struct lfLensCalibDistortion
    00429 {
    00431     enum lfDistortionModel Model;
    00433     float Focal;
    00435     float Terms [3];
    00436 };
    00437
    00438 C_TYPEDEF (struct, lfLensCalibDistortion)
    00439
    00440
    00449 enum lfTCAModel
    00450 {
    00452     LF_TCA_MODEL_NONE,
    00458     LF_TCA_MODEL_LINEAR
    00459 };
    00460
    00461 C_TYPEDEF (enum, lfTCAModel)
    00462
    00463
    00469 struct lfLensCalibTCA
    00470 {
    00472     enum lfTCAModel Model;
    00474     float Focal;
    00476     float Terms [2];
    00477 };
    00478
    00479 C_TYPEDEF (struct, lfLensCalibTCA)
    00480
    00481
    00492 enum lfVignettingModel
    00493 {
    00495     LF_VIGNETTING_MODEL_NONE,
    00502     LF_VIGNETTING_MODEL_PA
    00503 };
    00504
    00505 C_TYPEDEF (enum, lfVignettingModel)
    00506
    00507
    00514 struct lfLensCalibVignetting
    00515 {
    00517     enum lfVignettingModel Model;
    00519     float Focal;
    00521     float Aperture;
    00523     float Distance;
    00525     float Terms [3];
    00526 };
    00527
    00528 C_TYPEDEF (struct, lfLensCalibVignetting)
    00529
    00530
    00533 struct lfParameter
    00534 {
    00536     const char *Name;
    00538     float Min;
    00540     float Max;
    00542     float Default;
    00543 };
    00544
    00545 C_TYPEDEF (struct, lfParameter)
    00546
    00547
    00550 enum lfLensType
    00551 {
    00553     LF_UNKNOWN,
    00555     LF_RECTILINEAR,
    00560     LF_FISHEYE,
    00562     LF_PANORAMIC,
    00567     LF_EQUIRECTANGULAR
    00568 };
    00569
    00570 C_TYPEDEF (enum, lfLensType)
    00571
    00572
    00582 struct LF_EXPORT lfLens
    00583 {
    00585     lfMLstr Maker;
    00587     lfMLstr Model;
    00589     float MinFocal;
    00591     float MaxFocal;
    00593     float MinAperture;
    00595     float MaxAperture;
    00597     char **Mounts;
    00607     float CenterX;
    00609     float CenterY;
    00611     float RedCCI;
    00613     float GreenCCI;
    00615     float BlueCCI;
    00617     float CropFactor;
    00619     lfLensType Type;
    00621     lfLensCalibDistortion **CalibDistortion;
    00623     lfLensCalibTCA **CalibTCA;
    00625     lfLensCalibVignetting **CalibVignetting;
    00627     int Score;
    00628
    00629 #ifdef __cplusplus
    00630
    00633     lfLens ();
    00634
    00638     lfLens (const lfLens &other);
    00639
    00643     ~lfLens ();
    00644
    00648     lfLens &operator = (const lfLens &other);
    00649
    00658     void SetMaker (const char *val, const char *lang = NULL);
    00659
    00668     void SetModel (const char *val, const char *lang = NULL);
    00669
    00676     void AddMount (const char *val);
    00677
    00685     void AddCalibDistortion (const lfLensCalibDistortion *dc);
    00686
    00692     bool RemoveCalibDistortion (int idx);
    00693
    00701     void AddCalibTCA (const lfLensCalibTCA *tcac);
    00702
    00708     bool RemoveCalibTCA (int idx);
    00709
    00717     void AddCalibVignetting (const lfLensCalibVignetting *vc);
    00718
    00724     bool RemoveCalibVignetting (int idx);
    00725
    00733     void GuessParameters ();
    00734
    00740     bool Check ();
    00741
    00757     static const char *GetDistortionModelDesc (
    00758         lfDistortionModel model, const char **details, const lfParameter ***params);
    00774     static const char *GetTCAModelDesc (
    00775         lfTCAModel model, const char **details, const lfParameter ***params);
    00776
    00792     static const char *GetVignettingModelDesc (
    00793         lfVignettingModel model, const char **details, const lfParameter ***params);
    00794
    00806     static const char *GetLensTypeDesc (lfLensType type, const char **details);
    00807
    00815     bool InterpolateDistortion (float focal, lfLensCalibDistortion &res) const;
    00816
    00824     bool InterpolateTCA (float focal, lfLensCalibTCA &res) const;
    00825
    00838     bool InterpolateVignetting (
    00839         float focal, float aperture, float distance, lfLensCalibVignetting &res) const;
    00840 #endif
    00841 };
    00842
    00843 C_TYPEDEF (struct, lfLens)
    00844
    00845
    00852 LF_EXPORT lfLens *lf_lens_new ();
    00853
    00862 LF_EXPORT void lf_lens_destroy (lfLens *lens);
    00863
    00873 LF_EXPORT void lf_lens_copy (lfLens *dest, const lfLens *source);
    00874
    00876 LF_EXPORT cbool lf_lens_check (lfLens *lens);
    00877
    00879 LF_EXPORT void lf_lens_guess_parameters (lfLens *lens);
    00880
    00882 LF_EXPORT const char *lf_get_distortion_model_desc (
    00883     enum lfDistortionModel model, const char **details, const lfParameter ***params);
    00884
    00886 LF_EXPORT const char *lf_get_tca_model_desc (
    00887     enum lfTCAModel model, const char **details, const lfParameter ***params);
    00888
    00890 LF_EXPORT const char *lf_get_vignetting_model_desc (
    00891     enum lfVignettingModel model, const char **details, const lfParameter ***params);
    00892
    00894 LF_EXPORT const char *lf_get_lens_type_desc (
    00895     enum lfLensType type, const char **details);
    00896
    00898 LF_EXPORT cbool lf_lens_interpolate_distortion (const lfLens *lens, float focal,
    00899     lfLensCalibDistortion *res);
    00900
    00902 LF_EXPORT cbool lf_lens_interpolate_tca (const lfLens *lens, float focal, lfLensCalibTCA *res);
    00903
    00905 LF_EXPORT cbool lf_lens_interpolate_vignetting (const lfLens *lens, float focal, float aperture,
    00906     float distance, lfLensCalibVignetting *res);
    00907
    00909 LF_EXPORT void lf_lens_add_calib_distortion (lfLens *lens, const lfLensCalibDistortion *dc);
    00910
    00912 LF_EXPORT cbool lf_lens_remove_calib_distortion (lfLens *lens, int idx);
    00913
    00915 LF_EXPORT void lf_lens_add_calib_tca (lfLens *lens, const lfLensCalibTCA *tcac);
    00916
    00918 LF_EXPORT cbool lf_lens_remove_calib_tca (lfLens *lens, int idx);
    00919
    00921 LF_EXPORT void lf_lens_add_calib_vignetting (lfLens *lens, const lfLensCalibVignetting *vc);
    00922
    00924 LF_EXPORT cbool lf_lens_remove_calib_vignetting (lfLens *lens, int idx);
    00925
    00928 /*----------------------------------------------------------------------------*/
    00929
    00939 enum
    00940 {
    00946     LF_SEARCH_LOOSE = 1
    00947 };
    00948
    00971 struct LF_EXPORT lfDatabase
    00972 {
    00974     char *HomeDataDir;
    00975
    00976 #ifdef __cplusplus
    00977
    00980     static lfDatabase *Create ();
    00981
    00985     void Destroy ();
    00986
    00995     lfError Load ();
    00996
    01008     lfError Load (const char *filename);
    01009
    01023     lfError Load (const char *errcontext, const char *data, size_t data_size);
    01024
    01032     lfError Save (const char *filename) const;
    01033
    01047     lfError Save (const char *filename,
    01048                   const lfMount *const *mounts,
    01049                   const lfCamera *const *cameras,
    01050                   const lfLens *const *lenses) const;
    01051
    01064     static char *Save (const lfMount *const *mounts,
    01065                        const lfCamera *const *cameras,
    01066                        const lfLens *const *lenses);
    01067
    01091     const lfCamera **FindCameras (const char *maker, const char *model) const;
    01092
    01112     const lfCamera **FindCamerasExt (const char *maker, const char *model,
    01113                                      int sflags = 0) const;
    01114
    01122     const lfCamera *const *GetCameras () const;
    01123
    01160     const lfLens **FindLenses (const lfCamera *camera, const char *maker,
    01161                                const char *model, int sflags = 0) const;
    01162
    01180     const lfLens **FindLenses (const lfLens *lens, int sflags = 0) const;
    01181
    01189     const lfLens *const *GetLenses () const;
    01190
    01198     const lfMount *FindMount (const char *mount) const;
    01199
    01207     const char *MountName (const char *mount) const;
    01208
    01216     const lfMount *const *GetMounts () const;
    01217
    01218 protected:
    01219     /* Prevent user from creating and destroying such objects */
    01220     lfDatabase () {}
    01221     ~lfDatabase () {}
    01222 #endif
    01223 };
    01224
    01225 C_TYPEDEF (struct, lfDatabase)
    01226
    01227
    01236 LF_EXPORT lfDatabase *lf_db_new (void);
    01237
    01246 LF_EXPORT void lf_db_destroy (lfDatabase *db);
    01247
    01249 LF_EXPORT lfError lf_db_load (lfDatabase *db);
    01250
    01252 LF_EXPORT lfError lf_db_load_file (lfDatabase *db, const char *filename);
    01253
    01255 LF_EXPORT lfError lf_db_load_data (lfDatabase *db, const char *errcontext,
    01256                                    const char *data, size_t data_size);
    01257
    01259 LF_EXPORT lfError lf_db_save_all (const lfDatabase *db, const char *filename);
    01260
    01262 LF_EXPORT lfError lf_db_save_file (const lfDatabase *db, const char *filename,
    01263                                    const lfMount *const *mounts,
    01264                                    const lfCamera *const *cameras,
    01265                                    const lfLens *const *lenses);
    01266
    01268 LF_EXPORT char *lf_db_save (const lfMount *const *mounts,
    01269                             const lfCamera *const *cameras,
    01270                             const lfLens *const *lenses);
    01271
    01273 LF_EXPORT const lfCamera **lf_db_find_cameras (
    01274     const lfDatabase *db, const char *maker, const char *model);
    01275
    01277 LF_EXPORT const lfCamera **lf_db_find_cameras_ext (
    01278     const lfDatabase *db, const char *maker, const char *model, int sflags);
    01279
    01281 LF_EXPORT const lfCamera *const *lf_db_get_cameras (const lfDatabase *db);
    01282
    01284 LF_EXPORT const lfLens **lf_db_find_lenses_hd (
    01285     const lfDatabase *db, const lfCamera *camera, const char *maker,
    01286     const char *lens, int sflags);
    01287
    01289 LF_EXPORT const lfLens **lf_db_find_lenses (
    01290     const lfDatabase *db, const lfLens *lens, int sflags);
    01291
    01293 LF_EXPORT const lfLens *const *lf_db_get_lenses (const lfDatabase *db);
    01294
    01296 LF_EXPORT const lfMount *lf_db_find_mount (const lfDatabase *db, const char *mount);
    01297
    01299 LF_EXPORT const char *lf_db_mount_name (const lfDatabase *db, const char *mount);
    01300
    01302 LF_EXPORT const lfMount *const *lf_db_get_mounts (const lfDatabase *db);
    01303
    01306 /*----------------------------------------------------------------------------*/
    01307
    01316 enum
    01317 {
    01319     LF_MODIFY_TCA        = 0x00000001,
    01321     LF_MODIFY_VIGNETTING = 0x00000002,
    01323     LF_MODIFY_CCI        = 0x00000004,
    01325     LF_MODIFY_DISTORTION = 0x00000008,
    01327     LF_MODIFY_GEOMETRY   = 0x00000010,
    01329     LF_MODIFY_SCALE      = 0x00000020,
    01331     LF_MODIFY_ALL        = ~0
    01332 };
    01333
    01335 enum lfPixelFormat
    01336 {
    01338     LF_PF_U8,
    01340     LF_PF_U16,
    01342     LF_PF_U32,
    01344     LF_PF_F32,
    01346     LF_PF_F64
    01347 };
    01348
    01349 C_TYPEDEF (enum, lfPixelFormat)
    01350
    01351
    01352 enum lfComponentRole
    01353 {
    01358     LF_CR_END = 0,
    01365     LF_CR_NEXT,
    01367     LF_CR_UNKNOWN,
    01369     LF_CR_INTENSITY,
    01371     LF_CR_RED,
    01373     LF_CR_GREEN,
    01375     LF_CR_BLUE
    01376 };
    01377
    01378 C_TYPEDEF (enum, lfComponentRole)
    01379
    01380
    01381 #define LF_CR_1(a)              (LF_CR_ ## a)
    01382
    01383 #define LF_CR_2(a,b)            ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4))
    01384
    01385 #define LF_CR_3(a,b,c)          ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
    01386                                  ((LF_CR_ ## c) << 8))
    01387
    01388 #define LF_CR_4(a,b,c,d)        ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
    01389                                  ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12))
    01390
    01391 #define LF_CR_5(a,b,c,d,e)      ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
    01392                                  ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
    01393                                  ((LF_CR_ ## e) << 16))
    01394
    01395 #define LF_CR_6(a,b,c,d,e,f)    ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
    01396                                  ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
    01397                                  ((LF_CR_ ## e) << 16) | ((LF_CR_ ## f) << 20))
    01398
    01399 #define LF_CR_7(a,b,c,d,e,f,g)   ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
    01400                                  ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
    01401                                  ((LF_CR_ ## e) << 16) | ((LF_CR_ ## f) << 20) | \
    01402                                  ((LF_CR_ ## g) << 24))
    01403
    01404 #define LF_CR_8(a,b,c,d,e,f,g,h) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4) | \
    01405                                  ((LF_CR_ ## c) << 8) | ((LF_CR_ ## d) << 12) | \
    01406                                  ((LF_CR_ ## e) << 16) | ((LF_CR_ ## f) << 20) | \
    01407                                  ((LF_CR_ ## g) << 24) | ((LF_CR_ ## h) << 28))
    01408
    01423 typedef void (*lfSubpixelCoordFunc) (void *data, float *iocoord, int count);
    01424
    01448 typedef void (*lfModifyColorFunc) (void *data, float x, float y,
    01449                                    void *pixels, int comp_role, int count);
    01450
    01462 typedef void (*lfModifyCoordFunc) (void *data, float *iocoord, int count);
    01463
    01523 struct LF_EXPORT lfModifier
    01524 {
    01525 #ifdef __cplusplus
    01526
    01546     static lfModifier *Create (const lfLens *lens, float crop, int width, int height);
    01547
    01588     int Initialize (
    01589         const lfLens *lens, lfPixelFormat format, float focal, float aperture,
    01590         float distance, float scale, lfLensType targeom, int flags, bool reverse);
    01591
    01596     void Destroy ();
    01597
    01614     void AddCoordCallback (lfModifyCoordFunc callback, int priority,
    01615                            void *data, size_t data_size);
    01616
    01634     void AddSubpixelCallback (lfSubpixelCoordFunc callback, int priority,
    01635                               void *data, size_t data_size);
    01636
    01653     void AddColorCallback (lfModifyColorFunc callback, int priority,
    01654                            void *data, size_t data_size);
    01655
    01669     bool AddSubpixelCallbackTCA (lfLensCalibTCA &model, bool reverse = false);
    01670
    01685     bool AddColorCallbackVignetting (lfLensCalibVignetting &model, lfPixelFormat format,
    01686                                      bool reverse = false);
    01687
    01702     bool AddColorCallbackCCI (const lfLens *lens, lfPixelFormat format,
    01703                               bool reverse = false);
    01704
    01717     bool AddCoordCallbackDistortion (lfLensCalibDistortion &model, bool reverse = false);
    01718
    01731     bool AddCoordCallbackGeometry (lfLensType from, lfLensType to, float focal);
    01732
    01748     bool AddCoordCallbackScale (float scale, bool reverse = false);
    01749
    01762     float GetAutoScale (bool reverse);
    01763
    01792     bool ApplySubpixelDistortion (float xu, float yu, int width, int height,
    01793                                   float *res) const;
    01794
    01823     bool ApplyColorModification (void *pixels, float x, float y, int width, int height,
    01824                                  int comp_role, int row_stride) const;
    01825
    01852     bool ApplyGeometryDistortion (float xu, float yu, int width, int height,
    01853                                   float *res) const;
    01854
    01882     bool ApplySubpixelGeometryDistortion (float xu, float yu, int width, int height,
    01883                                           float *res) const;
    01884
    01885 protected:
    01886     /* Prevent user from creating and destroying such objects */
    01887     lfModifier () {}
    01888     ~lfModifier () {}
    01889 #endif
    01890 };
    01891
    01892 C_TYPEDEF (struct, lfModifier)
    01893
    01894
    01895 LF_EXPORT lfModifier *lf_modifier_new (
    01896     const lfLens *lens, float crop, int width, int height);
    01897
    01899 LF_EXPORT void lf_modifier_destroy (lfModifier *modifier);
    01900
    01902 LF_EXPORT int lf_modifier_initialize (
    01903     lfModifier *modifier, const lfLens *lens, lfPixelFormat format,
    01904     float focal, float aperture, float distance, float scale,
    01905     lfLensType targeom, int flags, cbool reverse);
    01906
    01908 LF_EXPORT void lf_modifier_add_coord_callback (
    01909     lfModifier *modifier, lfModifyCoordFunc callback, int priority,
    01910     void *data, size_t data_size);
    01911
    01913 LF_EXPORT void lf_modifier_add_subpixel_callback (
    01914     lfModifier *modifier, lfSubpixelCoordFunc callback, int priority,
    01915     void *data, size_t data_size);
    01916
    01918 LF_EXPORT void lf_modifier_add_color_callback (
    01919     lfModifier *modifier, lfModifyColorFunc callback, int priority,
    01920     void *data, size_t data_size);
    01921
    01923 LF_EXPORT cbool lf_modifier_add_subpixel_callback_TCA (
    01924     lfModifier *modifier, lfLensCalibTCA *model, cbool reverse);
    01925
    01927 LF_EXPORT cbool lf_modifier_add_color_callback_vignetting (
    01928     lfModifier *modifier, lfLensCalibVignetting *model,
    01929     lfPixelFormat format, cbool reverse);
    01930
    01932 LF_EXPORT cbool lf_modifier_add_color_callback_CCI (
    01933     lfModifier *modifier, const lfLens *lens,
    01934     lfPixelFormat format, cbool reverse);
    01935
    01937 LF_EXPORT cbool lf_modifier_add_coord_callback_distortion (
    01938     lfModifier *modifier, lfLensCalibDistortion *model, cbool reverse);
    01939
    01941 LF_EXPORT cbool lf_modifier_add_coord_callback_geometry (
    01942     lfModifier *modifier, lfLensType from, lfLensType to, float focal);
    01943
    01945 LF_EXPORT cbool lf_modifier_add_coord_callback_scale (
    01946     lfModifier *modifier, float scale, cbool reverse);
    01947
    01949 LF_EXPORT float lf_modifier_get_auto_scale (
    01950     lfModifier *modifier, cbool reverse);
    01951
    01953 LF_EXPORT cbool lf_modifier_apply_subpixel_distortion (
    01954     lfModifier *modifier, float xu, float yu, int width, int height, float *res);
    01955
    01957 LF_EXPORT cbool lf_modifier_apply_color_modification (
    01958     lfModifier *modifier, void *pixels, float x, float y, int width, int height,
    01959     int comp_role, int row_stride);
    01960
    01962 LF_EXPORT cbool lf_modifier_apply_geometry_distortion (
    01963     lfModifier *modifier, float xu, float yu, int width, int height, float *res);
    01964
    01966 LF_EXPORT cbool lf_modifier_apply_subpixel_geometry_distortion (
    01967     lfModifier *modifier, float xu, float yu, int width, int height, float *res);
    01968
    01971 #undef cbool
    01972
    01973 #ifdef __cplusplus
    01974 }
    01975 #endif
    01976
    01977 #endif /* __LENSFUN_H__ */