AliceVision
Photogrammetric Computer Vision Framework
Public Member Functions | List of all members
LCPinfo Class Reference

LCPinfo loads and hosts the content of a Lens Correction Profile (LCP) file, parameters of distortion, vignetting and chromatic aberration models for different set of camera settings (focal length, focus distance, aperture value). Detailed information on LCP file content can be found in the Adobe technical report "Adobe Camera Model" part of the documentation of the Adobe free tool Lens Profile Creator. More...

#include <lcp.hpp>

Public Member Functions

 LCPinfo (const std::string &filename, bool fullParsing=true)
 LCPinfo constructor. More...
 
void load (const std::string &filename, bool fullParsing=true)
 LCPinfo loader. More...
 
void getDistortionParams (const float &focalLength, const float &focusDistance, LensParam &lparam)
 Get distortion parameters for a given couple focal length, focus distance. Focus distance can set to zero. More...
 
void getVignettingParams (const float &focalLength, const float &aperture, LensParam &lparam)
 Get vignetting parameters for a given couple focal length, aperture value. Aperture value can set to zero. More...
 
void getChromaticParams (const float &focalLength, const float &focusDistance, LensParam &lparam)
 Get defringing parameters for a given couple focal length, focus distance. Focus distance can set to zero. More...
 
bool isEmpty () const
 Indicate that no lens parameter set is available. More...
 
const std::string & getAuthor () const
 Get profile author. More...
 
const std::string & getProfileName () const
 Get profile name. More...
 
const std::string & getCameraMaker () const
 Get camera maker. More...
 
const std::string & getCameraModel () const
 Get camera model. More...
 
const std::string & getUniqueCameraModel () const
 Get unique camera model. More...
 
const std::string & getCameraPrettyName () const
 Get camera pretty name. More...
 
const std::string & getLensPrettyName () const
 Get lens pretty name. More...
 
const std::string & getLensInfo () const
 Get lens information. More...
 
void getLensIDs (std::vector< int > &lensIDs) const
 Get all known IDs for the lens. More...
 
void getLensModels (std::vector< std::string > &lensModels) const
 Get all known model names for the lens. More...
 
int getImageWidth () const
 Get image width. More...
 
int getImageLength () const
 Get image length. More...
 
float getSensorFormatFactor () const
 Get sensor format factor. More...
 
bool isRawProfile () const
 Get raw profile status. More...
 
int getModelNumber () const
 Get lens information. More...
 
void setAuthor (const std::string &str)
 Set profile author. More...
 
void setAuthor ()
 Set profile author with current text value.
 
void setProfileName (const std::string &str)
 Set profile name. More...
 
void setCameraMaker (const std::string &str)
 Set camera maker. More...
 
void setCameraModel (const std::string &str)
 Set camera model. More...
 
void setUniqueCameraModel (const std::string &str)
 Set unique camera model. More...
 
void setCameraPrettyName (const std::string &str)
 Set camera pretty name. More...
 
void setLensPrettyName (const std::string &str)
 Set lens pretty name. More...
 
void setLensInfo (const std::string &str)
 Set lens information. More...
 
void addLensID (int lensID)
 Set an alternate lens ID for the lens. More...
 
void addLensModel (std::string lensModel)
 Set an alternate model name for the lens. More...
 
void setImageWidth (int w)
 Set image width. More...
 
void setImageLength (int l)
 Set image length. More...
 
void setSensorFormatFactor (float f)
 Set sensor format factor. More...
 
void setAsRawProfile ()
 Set raw profile status. More...
 

Detailed Description

LCPinfo loads and hosts the content of a Lens Correction Profile (LCP) file, parameters of distortion, vignetting and chromatic aberration models for different set of camera settings (focal length, focus distance, aperture value). Detailed information on LCP file content can be found in the Adobe technical report "Adobe Camera Model" part of the documentation of the Adobe free tool Lens Profile Creator.

Constructor & Destructor Documentation

◆ LCPinfo()

LCPinfo::LCPinfo ( const std::string &  filename,
bool  fullParsing = true 
)

LCPinfo constructor.

Parameters
[in]filenameThe lcp path on disk
[in]fullParsingLoad only common camera and lens info and skip all models when set to false (default = true)

Member Function Documentation

◆ addLensID()

void LCPinfo::addLensID ( int  lensID)
inline

Set an alternate lens ID for the lens.

Parameters
[in]alternatelens ID

◆ addLensModel()

void LCPinfo::addLensModel ( std::string  lensModel)
inline

Set an alternate model name for the lens.

Parameters
[in]alternatemodel name

◆ getAuthor()

const std::string& LCPinfo::getAuthor ( ) const
inline

Get profile author.

Returns
author

◆ getCameraMaker()

const std::string& LCPinfo::getCameraMaker ( ) const
inline

Get camera maker.

Returns
camera maker

◆ getCameraModel()

const std::string& LCPinfo::getCameraModel ( ) const
inline

Get camera model.

Returns
camera model

◆ getCameraPrettyName()

const std::string& LCPinfo::getCameraPrettyName ( ) const
inline

Get camera pretty name.

Returns
camera pretty name

◆ getChromaticParams()

void LCPinfo::getChromaticParams ( const float &  focalLength,
const float &  focusDistance,
LensParam lparam 
)

Get defringing parameters for a given couple focal length, focus distance. Focus distance can set to zero.

Parameters
[in]focalLengthFocal length in mm
[in]focusDistanceFocus distance in meters
[out]lparamLens parameters to be populated with the R, G and B defringing models

◆ getDistortionParams()

void LCPinfo::getDistortionParams ( const float &  focalLength,
const float &  focusDistance,
LensParam lparam 
)

Get distortion parameters for a given couple focal length, focus distance. Focus distance can set to zero.

Parameters
[in]focalLengthFocal length in mm
[in]focusDistanceFocus distance in meters
[out]lparamLens parameters to be populated with the distortion model

◆ getImageLength()

int LCPinfo::getImageLength ( ) const
inline

Get image length.

Returns
image length

◆ getImageWidth()

int LCPinfo::getImageWidth ( ) const
inline

Get image width.

Returns
image width

◆ getLensIDs()

void LCPinfo::getLensIDs ( std::vector< int > &  lensIDs) const
inline

Get all known IDs for the lens.

Returns
lens known IDs

◆ getLensInfo()

const std::string& LCPinfo::getLensInfo ( ) const
inline

Get lens information.

Returns
lens information

◆ getLensModels()

void LCPinfo::getLensModels ( std::vector< std::string > &  lensModels) const
inline

Get all known model names for the lens.

Returns
lens model known names

◆ getLensPrettyName()

const std::string& LCPinfo::getLensPrettyName ( ) const
inline

Get lens pretty name.

Returns
lens pretty name

◆ getModelNumber()

int LCPinfo::getModelNumber ( ) const
inline

Get lens information.

Returns
lens information

◆ getProfileName()

const std::string& LCPinfo::getProfileName ( ) const
inline

Get profile name.

Returns
profile name

◆ getSensorFormatFactor()

float LCPinfo::getSensorFormatFactor ( ) const
inline

Get sensor format factor.

Returns
sensor format factor

◆ getUniqueCameraModel()

const std::string& LCPinfo::getUniqueCameraModel ( ) const
inline

Get unique camera model.

Returns
unique camera model

◆ getVignettingParams()

void LCPinfo::getVignettingParams ( const float &  focalLength,
const float &  aperture,
LensParam lparam 
)

Get vignetting parameters for a given couple focal length, aperture value. Aperture value can set to zero.

Parameters
[in]focalLengthFocal length in mm
[in]apertureAperture value
[out]lparamLens parameters to be populated with the vignetting model

◆ isEmpty()

bool LCPinfo::isEmpty ( ) const
inline

Indicate that no lens parameter set is available.

Returns
true if no lens parameter set is available

◆ isRawProfile()

bool LCPinfo::isRawProfile ( ) const
inline

Get raw profile status.

Returns
true if profile is dedicated to a raw image

◆ load()

void LCPinfo::load ( const std::string &  filename,
bool  fullParsing = true 
)

LCPinfo loader.

Parameters
[in]filenameThe lcp path on disk
[in]fullParsingLoad only common camera and lens info and skip all models when set to false (default = true)

◆ setAsRawProfile()

void LCPinfo::setAsRawProfile ( )
inline

Set raw profile status.

Parameters
[in]rawprofile status

◆ setAuthor()

void LCPinfo::setAuthor ( const std::string &  str)
inline

Set profile author.

Parameters
[in]profileauthor

◆ setCameraMaker()

void LCPinfo::setCameraMaker ( const std::string &  str)
inline

Set camera maker.

Parameters
[in]cameramaker

◆ setCameraModel()

void LCPinfo::setCameraModel ( const std::string &  str)
inline

Set camera model.

Parameters
[in]cameramodel

◆ setCameraPrettyName()

void LCPinfo::setCameraPrettyName ( const std::string &  str)
inline

Set camera pretty name.

Parameters
[in]camerapretty name

◆ setImageLength()

void LCPinfo::setImageLength ( int  l)
inline

Set image length.

Parameters
[in]imagelength

◆ setImageWidth()

void LCPinfo::setImageWidth ( int  w)
inline

Set image width.

Parameters
[in]imagewidth

◆ setLensInfo()

void LCPinfo::setLensInfo ( const std::string &  str)
inline

Set lens information.

Parameters
[in]lensinformation

◆ setLensPrettyName()

void LCPinfo::setLensPrettyName ( const std::string &  str)
inline

Set lens pretty name.

Parameters
[in]lenspretty name

◆ setProfileName()

void LCPinfo::setProfileName ( const std::string &  str)
inline

Set profile name.

Parameters
[in]profilename

◆ setSensorFormatFactor()

void LCPinfo::setSensorFormatFactor ( float  f)
inline

Set sensor format factor.

Parameters
[in]sensorformat factor

◆ setUniqueCameraModel()

void LCPinfo::setUniqueCameraModel ( const std::string &  str)
inline

Set unique camera model.

Parameters
[in]uniquecamera model

The documentation for this class was generated from the following files: