AliceVision
Photogrammetric Computer Vision Framework
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
aliceVision::image::DCPProfile Class Referencefinal

DCPProfile contains a Dng Color Profile as specified by Adobe DNG specification can be found here: https://helpx.adobe.com/content/dam/help/en/photoshop/pdf/dng_spec_1_6_0_0.pdf Profiles with more than 2 illuminants are not supported. More...

#include <dcp.hpp>

Public Types

using Triple = std::array< double, 3 >
 
using Matrix = std::array< Triple, 3 >
 

Public Member Functions

 DCPProfile (const std::string &filename)
 DCPProfile constructor. More...
 
void Load (const std::string &filename)
 DCPProfile loader. More...
 
void Load (const std::map< std::string, std::string > &metadata)
 DCPProfile loader. More...
 
void getMatrices (const std::string &type, std::vector< Matrix > &v_Mat) const
 getMatrices gets some matrices contained in the profile param[in] type The matrices to get, "color" or "forward" param[in] v_Mat A vector of matrices to be populated
 
void getMatricesAsStrings (const std::string &type, std::vector< std::string > &v_strMat) const
 getMatricesAsStrings gets some matrices contained in the profile in a string format (one string per matrix) param[in] type The matrices to get, "color" or "forward" param[in] v_strMat A vector of std::string to be populated
 
void setMatrices (const std::string &type, std::vector< Matrix > &v_Mat)
 setMatrices sets some matrices contained in the profile param[in] type The matrices to set, "color" or "forward" param[in] v_Mat A vector of matrices
 
void setMatricesFromStrings (const std::string &type, std::vector< std::string > &v_strMat)
 setMatricesFromStrings sets some matrices contained in the profile from strings (one string per matrix) param[in] type The matrices to set, "color" or "forward" param[in] v_strMat A vector of std::string
 
void applyLinear (OIIO::ImageBuf &image, const Triple &neutral, double &cct, const bool sourceIsRaw=false, const bool useColorMatrixOnly=true) const
 applyLinear applies the linear part of a DCP profile on an OIIO image buffer param[in] image The OIIO image on which the profile must be applied param[in] neutral The neutral value calculated from the camera multiplicators contained in the cam_mul OIIO metadata param[in] cct indicates the scene illuminant Correlated Color Temperature in Kelvin (if <= 0.0, the value extracted from metadata is used) param[in] sourceIsRaw indicates that the image buffer contains data in raw space (no neutralization <=> cam_mul not applied) param[in] useColorMatrixOnly indicates to apply a DCP profile computed only from the color matrices
 
void applyLinear (Image< image::RGBAfColor > &image, const Triple &neutral, double &cct, const bool sourceIsRaw=false, const bool useColorMatrixOnly=false) const
 applyLinear applies the linear part of a DCP profile on an aliceVision image param[in] image The aliceVision image on which the profile must be applied param[in] neutral The neutral value calculated from the camera multiplicators contained in the cam_mul OIIO metadata param[in] cct indicates the scene illuminant Correlated Color Temperature in Kelvin (if <= 0.0, the value extracted from metadata is used) param[in] sourceIsRaw indicates that the image buffer contains data in raw space (no neutralization <=> cam_mul not applied) param[in] useColorMatrixOnly indicates to apply a DCP profile computed only from the color matrices
 
void apply (OIIO::ImageBuf &image, const DCPProfileApplyParams &params)
 apply applies the non linear part of a DCP profile on an OIIO image buffer param[in] image The OIIO image on which the profile must be applied param[in] params contains the application parameters indicating which parts of the profile must be applied
 
void apply (float *rgb, const DCPProfileApplyParams &params) const
 apply applies the non linear part of a DCP profile on a rgb pixel param[in] rgb The pixel values on which the profile must be applied param[in] params contains the application parameters indicating which parts of the profile must be applied
 
void getColorTemperatureAndTintFromNeutral (const Triple &neutral, double &cct, double &tint) const
 compute color temperature and tint from neutral param[in] neutral The neutral triplet value param[out] cct The computed correlated color temperature value in Kelvin param[out] tint The computed tint value
 

Public Attributes

DCPProfileInfo info
 

Detailed Description

DCPProfile contains a Dng Color Profile as specified by Adobe DNG specification can be found here: https://helpx.adobe.com/content/dam/help/en/photoshop/pdf/dng_spec_1_6_0_0.pdf Profiles with more than 2 illuminants are not supported.

Constructor & Destructor Documentation

◆ DCPProfile()

aliceVision::image::DCPProfile::DCPProfile ( const std::string &  filename)
explicit

DCPProfile constructor.

Parameters
[in]filenameThe dcp path on disk

Member Function Documentation

◆ Load() [1/2]

void aliceVision::image::DCPProfile::Load ( const std::map< std::string, std::string > &  metadata)

DCPProfile loader.

Parameters
[in]mapof metadata

◆ Load() [2/2]

void aliceVision::image::DCPProfile::Load ( const std::string &  filename)

DCPProfile loader.

Parameters
[in]filenameThe dcp path on disk

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