The CameraResponseFunction class.
More...
#include <camera_response_function.hpp>
|
| CameraResponseFunction () |
| CameraResponseFunction. More...
|
|
| ~CameraResponseFunction () |
|
float | remove (float x, int channel) |
| remove linearizes a camera value using the inverse CRF. More...
|
|
float | apply (float x, int channel) |
| apply More...
|
|
void | setCRFtoGamma2_2 () |
| setCRFtoGamma2_2 More...
|
|
void | setCRFtoLinear () |
| setCRFtoLinear More...
|
|
void | fromRAWJPEG (Image *img_raw, Image *img_jpg, int filteringSize=11) |
| FromRAWJPEG computes the CRF by exploiting the couple RAW/JPEG from cameras. More...
|
|
void | DebevecMalik (ImageVec stack, CRF_WEIGHT type=CW_DEB97, int nSamples=256, float lambda=20.0f) |
| DebevecMalik computes the CRF of a camera using multiple exposures value following Debevec and Malik 1997's method. More...
|
|
bool | MitsunagaNayar (ImageVec &stack, int polynomial_degree=-3, int nSamples=256, const bool full=false, const float alpha=0.04f, const bool computeRatios=false, const float eps=0.0001f, const std::size_t max_iterations=100) |
| MitsunagaNayar computes the inverse CRF of a camera as a polynomial function. More...
|
|
void | Robertson (ImageVec &stack, const size_t maxIterations=50) |
| Robertson computes the CRF of a camera using all multiple exposures value Robertson et al 1999's method (Dynamic range improvement through multiple exposures). More...
|
|
◆ CameraResponseFunction()
pic::CameraResponseFunction::CameraResponseFunction |
( |
| ) |
|
|
inline |
◆ ~CameraResponseFunction()
pic::CameraResponseFunction::~CameraResponseFunction |
( |
| ) |
|
|
inline |
◆ apply()
float pic::CameraResponseFunction::apply |
( |
float |
x, |
|
|
int |
channel |
|
) |
| |
|
inline |
apply
- Parameters
-
x | a value in [0, 1] |
channel | |
- Returns
◆ createTabledICRF()
void pic::CameraResponseFunction::createTabledICRF |
( |
| ) |
|
|
inlineprotected |
◆ DebevecMalik()
void pic::CameraResponseFunction::DebevecMalik |
( |
ImageVec |
stack, |
|
|
CRF_WEIGHT |
type = CW_DEB97 , |
|
|
int |
nSamples = 256 , |
|
|
float |
lambda = 20.0f |
|
) |
| |
|
inline |
DebevecMalik computes the CRF of a camera using multiple exposures value following Debevec and Malik 1997's method.
- Parameters
-
stack | |
exposure | |
type | |
nSamples | |
lambda | |
◆ fromRAWJPEG()
void pic::CameraResponseFunction::fromRAWJPEG |
( |
Image * |
img_raw, |
|
|
Image * |
img_jpg, |
|
|
int |
filteringSize = 11 |
|
) |
| |
|
inline |
FromRAWJPEG computes the CRF by exploiting the couple RAW/JPEG from cameras.
- Parameters
-
img_raw | is a RAW image. |
img_jpg | is a JPEG compressed image. |
filteringSize | |
◆ gsolve()
float* pic::CameraResponseFunction::gsolve |
( |
int * |
samples, |
|
|
std::vector< float > & |
log_exposure, |
|
|
float |
lambda, |
|
|
int |
nSamples |
|
) |
| |
|
inlineprotected |
gsolve computes the inverse CRF of a camera.
◆ MitsunagaNayar()
bool pic::CameraResponseFunction::MitsunagaNayar |
( |
ImageVec & |
stack, |
|
|
int |
polynomial_degree = -3 , |
|
|
int |
nSamples = 256 , |
|
|
const bool |
full = false , |
|
|
const float |
alpha = 0.04f , |
|
|
const bool |
computeRatios = false , |
|
|
const float |
eps = 0.0001f , |
|
|
const std::size_t |
max_iterations = 100 |
|
) |
| |
|
inline |
MitsunagaNayar computes the inverse CRF of a camera as a polynomial function.
- Parameters
-
stack | Array of images with associated exposure. Note that this array will be sorted with increasing exposure. |
polynomial_degree | Degree of the polynomial. If negative, the best degree will be selected in [1, -polynomial_degree] for each channel. |
nSamples | Number of samples to extract from each image. |
full | true for computing all exposure ratios (as in book "High Dynamic Range Imaging", second edition, Reinhard et al.), false as in the original paper (only among successive exposures). |
alpha | Threshold for removing samples with values not in [alpha, 1-alpha]. |
computeRatios | false if exact exposures are passed, true to approximate exposure ratios as in the paper. |
eps | Threshold on the difference among successive approximations for stopping the computation. |
max_iterations | Stop the computation after this number of iterations. |
- Returns
- true if successfully computed, false otherwise.
◆ release()
void pic::CameraResponseFunction::release |
( |
| ) |
|
|
inlineprotected |
◆ remove()
float pic::CameraResponseFunction::remove |
( |
float |
x, |
|
|
int |
channel |
|
) |
| |
|
inline |
remove linearizes a camera value using the inverse CRF.
- Parameters
-
x | is an intensity value in [0,1]. |
channel | |
- Returns
- It returns x in the linear domain.
◆ Robertson()
void pic::CameraResponseFunction::Robertson |
( |
ImageVec & |
stack, |
|
|
const size_t |
maxIterations = 50 |
|
) |
| |
|
inline |
Robertson computes the CRF of a camera using all multiple exposures value Robertson et al 1999's method (Dynamic range improvement through multiple exposures).
- Parameters
-
◆ setCRFtoGamma2_2()
void pic::CameraResponseFunction::setCRFtoGamma2_2 |
( |
| ) |
|
|
inline |
◆ setCRFtoLinear()
void pic::CameraResponseFunction::setCRFtoLinear |
( |
| ) |
|
|
inline |
◆ crf
std::vector<float *> pic::CameraResponseFunction::crf |
◆ icrf
std::vector<float *> pic::CameraResponseFunction::icrf |
◆ poly
std::vector< Polynomial > pic::CameraResponseFunction::poly |
◆ stackOut
◆ type_linearization
IMG_LIN pic::CameraResponseFunction::type_linearization |
|
protected |
float pic::CameraResponseFunction::w[256] |
|
protected |
The documentation for this class was generated from the following file: