|
lensfun 0.3.95.0
|
This group of functions will allow you to apply a image transform that will correct some lens defects. More...
Classes | |
| struct | lfModifier |
| A modifier object contains optimized data required to rectify a image. More... | |
Macros | |
| #define | LF_CR_1(a) (LF_CR_ ## a) |
| This macro defines a pixel format consisting of one component. | |
| #define | LF_CR_2(a, b) ((LF_CR_ ## a) | ((LF_CR_ ## b) << 4)) |
| This macro defines a pixel format consisting of two components. | |
| #define | LF_CR_3(a, b, c) |
| This macro defines a pixel format consisting of three components. | |
| #define | LF_CR_4(a, b, c, d) |
| This macro defines a pixel format consisting of four components. | |
| #define | LF_CR_5(a, b, c, d, e) |
| This macro defines a pixel format consisting of five components. | |
| #define | LF_CR_6(a, b, c, d, e, f) |
| This macro defines a pixel format consisting of six components. | |
| #define | LF_CR_7(a, b, c, d, e, f, g) |
| This macro defines a pixel format consisting of seven components. | |
| #define | LF_CR_8(a, b, c, d, e, f, g, h) |
| This macro defines a pixel format consisting of eight components. | |
Enumerations | |
| enum | { LF_MODIFY_TCA = 0x00000001 , LF_MODIFY_VIGNETTING = 0x00000002 , LF_MODIFY_DISTORTION = 0x00000008 , LF_MODIFY_GEOMETRY = 0x00000010 , LF_MODIFY_SCALE = 0x00000020 , LF_MODIFY_PERSPECTIVE = 0x00000040 , LF_MODIFY_ALL = ~0 } |
| A list of bitmask flags used for ordering various image corrections. More... | |
| enum | lfPixelFormat { LF_PF_U8 , LF_PF_U16 , LF_PF_U32 , LF_PF_F32 , LF_PF_F64 } |
| A list of pixel formats supported by internal colour callbacks. More... | |
| enum | lfComponentRole { LF_CR_END = 0 , LF_CR_NEXT , LF_CR_UNKNOWN , LF_CR_INTENSITY , LF_CR_RED , LF_CR_GREEN , LF_CR_BLUE } |
| These constants define the role of every pixel component, four bits each. "pixel" refers here to a set of values which share the same (x, y) coordinates. More... | |
Functions | |
| DEPRECATED lfModifier * | lf_modifier_new (const lfLens *lens, float crop, int width, int height) |
| lfModifier * | lf_modifier_create (float imgcrop, int imgwidth, int imgheight, lfPixelFormat pixel_format, bool reverse) |
| void | lf_modifier_destroy (lfModifier *modifier) |
| DEPRECATED 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) |
| int | lf_modifier_enable_scaling (lfModifier *modifier, float scale) |
| int | lf_modifier_enable_distortion_correction (lfModifier *modifier, const lfLens *lens, float focal) |
| int | lf_modifier_enable_tca_correction (lfModifier *modifier, const lfLens *lens, float focal) |
| int | lf_modifier_enable_vignetting_correction (lfModifier *modifier, const lfLens *lens, float focal, float aperture, float distance) |
| cbool | lf_modifier_enable_projection_transform (lfModifier *modifier, const lfLens *lens, float focal, lfLensType target_projection) |
| int | lf_modifier_enable_perspective_correction (lfModifier *modifier, const lfLens *lens, float focal, float *x, float *y, int count, float d) |
| float | lf_modifier_get_auto_scale (lfModifier *modifier, cbool reverse) |
| cbool | lf_modifier_apply_subpixel_distortion (lfModifier *modifier, float xu, float yu, int width, int height, float *res) |
| cbool | lf_modifier_apply_color_modification (lfModifier *modifier, void *pixels, float x, float y, int width, int height, int comp_role, int row_stride) |
| cbool | lf_modifier_apply_geometry_distortion (lfModifier *modifier, float xu, float yu, int width, int height, float *res) |
| cbool | lf_modifier_apply_subpixel_geometry_distortion (lfModifier *modifier, float xu, float yu, int width, int height, float *res) |
This group of functions will allow you to apply a image transform that will correct some lens defects.
| #define LF_CR_3 | ( | a, | |
| b, | |||
| c | |||
| ) |
This macro defines a pixel format consisting of three components.
| #define LF_CR_4 | ( | a, | |
| b, | |||
| c, | |||
| d | |||
| ) |
This macro defines a pixel format consisting of four components.
| #define LF_CR_5 | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e | |||
| ) |
This macro defines a pixel format consisting of five components.
| #define LF_CR_6 | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f | |||
| ) |
This macro defines a pixel format consisting of six components.
| #define LF_CR_7 | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f, | |||
| g | |||
| ) |
This macro defines a pixel format consisting of seven components.
| #define LF_CR_8 | ( | a, | |
| b, | |||
| c, | |||
| d, | |||
| e, | |||
| f, | |||
| g, | |||
| h | |||
| ) |
This macro defines a pixel format consisting of eight components.
| anonymous enum |
A list of bitmask flags used for ordering various image corrections.
| enum lfComponentRole |
These constants define the role of every pixel component, four bits each. "pixel" refers here to a set of values which share the same (x, y) coordinates.
| Enumerator | |
|---|---|
| LF_CR_END | This marks the end of the role list. It doesn't have to be specified explicitly, since LF_CR_X macros always pad the value with zeros |
| LF_CR_NEXT | This value tells that what follows applies to next pixel. This can be used to define Bayer images, e.g. use LF_CR_3(LF_CR_RED, LF_CR_NEXT, LF_CR_GREEN) for even rows and LF_CR_3(LF_CR_GREEN, LF_CR_NEXT, LF_CR_BLUE) for odd rows. |
| LF_CR_UNKNOWN | This component has an unknown/doesn't matter role |
| LF_CR_INTENSITY | This is the pixel intensity (grayscale) |
| LF_CR_RED | This is the Red pixel component |
| LF_CR_GREEN | This is the Green pixel component |
| LF_CR_BLUE | This is the Blue pixel component |
| enum lfPixelFormat |
| cbool lf_modifier_apply_color_modification | ( | lfModifier * | modifier, |
| void * | pixels, | ||
| float | x, | ||
| float | y, | ||
| int | width, | ||
| int | height, | ||
| int | comp_role, | ||
| int | row_stride | ||
| ) |
| cbool lf_modifier_apply_geometry_distortion | ( | lfModifier * | modifier, |
| float | xu, | ||
| float | yu, | ||
| int | width, | ||
| int | height, | ||
| float * | res | ||
| ) |
| cbool lf_modifier_apply_subpixel_distortion | ( | lfModifier * | modifier, |
| float | xu, | ||
| float | yu, | ||
| int | width, | ||
| int | height, | ||
| float * | res | ||
| ) |
| cbool lf_modifier_apply_subpixel_geometry_distortion | ( | lfModifier * | modifier, |
| float | xu, | ||
| float | yu, | ||
| int | width, | ||
| int | height, | ||
| float * | res | ||
| ) |
| lfModifier * lf_modifier_create | ( | float | imgcrop, |
| int | imgwidth, | ||
| int | imgheight, | ||
| lfPixelFormat | pixel_format, | ||
| bool | reverse | ||
| ) |
| void lf_modifier_destroy | ( | lfModifier * | modifier | ) |
| int lf_modifier_enable_distortion_correction | ( | lfModifier * | modifier, |
| const lfLens * | lens, | ||
| float | focal | ||
| ) |
| int lf_modifier_enable_perspective_correction | ( | lfModifier * | modifier, |
| const lfLens * | lens, | ||
| float | focal, | ||
| float * | x, | ||
| float * | y, | ||
| int | count, | ||
| float | d | ||
| ) |
| cbool lf_modifier_enable_projection_transform | ( | lfModifier * | modifier, |
| const lfLens * | lens, | ||
| float | focal, | ||
| lfLensType | target_projection | ||
| ) |
| int lf_modifier_enable_scaling | ( | lfModifier * | modifier, |
| float | scale | ||
| ) |
| int lf_modifier_enable_tca_correction | ( | lfModifier * | modifier, |
| const lfLens * | lens, | ||
| float | focal | ||
| ) |
| int lf_modifier_enable_vignetting_correction | ( | lfModifier * | modifier, |
| const lfLens * | lens, | ||
| float | focal, | ||
| float | aperture, | ||
| float | distance | ||
| ) |
| float lf_modifier_get_auto_scale | ( | lfModifier * | modifier, |
| cbool | reverse | ||
| ) |
| DEPRECATED 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 | ||
| ) |
| DEPRECATED lfModifier * lf_modifier_new | ( | const lfLens * | lens, |
| float | crop, | ||
| int | width, | ||
| int | height | ||
| ) |