Function to normalize, colorize and add background to images.
NumericMatrix.
NumericVector, whose members are h,s,v color. This vector has to be named with 1st name being the name of this color.
IntegerMatrix.
a length 2 IntegerVector, of final dimensions (height,width) of the image. Default is 0,0
for no change.
string, color mode export. Either "rgb"
, "gray"
or "raw"
. Default is "raw"
.
uint16_t image object type. Default is 2
.
a finite NumericVector, only apply when 'mode'
is not "raw"
, sets the range of the input intensity values. Values outside this range are clipped. Default is [0.0,4095.0]
.
bool, whether to add normal noise or not. Default is true
.
double, mean value of the background added if 'add_noise'
is true
. Default is 0.0
.
double, standard deviation of the background added if 'add_noise'
is true
. Default is 0.0
.
bool, only apply when 'mode'
is not "raw"
, if 'full_range'
is true
, then 'input_range'
will be set to [0.0,4095.0]
and 'gamma'
forced to 1.0
. Default is false
.
bool, only apply when 'mode'
is not "raw"
, if 'force_range'
is true
, then 'input_range'
will be adjusted to object range in [-4095.0, +inf]
and 'gamma'
forced to 1.0
. Default is false
.
Note that this parameter takes the precedence over 'input_range'
and 'full_range'
.
correction. Default is 1.0
, for no correction.
X offset correction. Default is 0.0
for no change.
Y offset correction. Default is 0.0
for no change.
When a mask is detected, 'add_noise'
, 'full_range'
and 'force_range'
are set to false
, 'bg'
and 'sd'
to 0.0
, 'input_range'
to [0.0,3.0]
and 'gamma'
to 1.0
.
Experimental (as of v0.2.0.501): when 'mode'
is not "raw"
, if 'input_range'
is within ]0,1[
, it will be used as 'probs'
argument to quantile to determine clipping range from image object, in addition, 'gamma'
will be forced to 1.0
.