Parameters (cdl.param
)#
The cdl.param
module aims at providing all the dataset parameters that are used
by the cdl.computation
and cdl.core.gui.processor
packages.
Those datasets are defined in other modules:
The cdl.param
module is thus a convenient way to import all the sets of
parameters at once.
As a matter of fact, the following import statement is equivalent to the previous one:
# Original import statement
from cdl.computation.base import MovingAverageParam
from cdl.computation.signal import PolynomialFitParam
from cdl.computation.image.exposure import EqualizeHistParam
# Equivalent import statement
from cdl.param import MovingAverageParam, PolynomialFitParam, EqualizeHistParam
Introduction to DataSet parameters#
The datasets listed in the following sections are used to define the parameters necessary for the various computations and processing operations available in DataLab.
Each dataset is a subclass of guidata.dataset.datatypes.DataSet
and thus
needs to be instantiated before being used.
Here is a complete example of how to instantiate a dataset and access its parameters
with the cdl.param.BinningParam
dataset:
- class cdl.param.BinningParam[source]
Binning parameters
- sx
Cluster size (X). Number of adjacent pixels to be combined together along x-axis. Integer higher than 2. Default: 2.
- sy
Cluster size (Y). Number of adjacent pixels to be combined together along y-axis. Integer higher than 2. Default: 2.
- operation
Single choice from: ‘sum’, ‘average’, ‘median’, ‘min’, ‘max’. Default: ‘sum’.
- dtype_str
Data type. Output image data type. Single choice from: ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
- change_pixel_size
Change pixel size so that overall image size remains the same. Default: False.
- classmethod create(sx: int, sy: int, operation: str, dtype_str: str, change_pixel_size: bool) cdl.computation.image.BinningParam
Returns a new instance of
BinningParam
with the fields set to the given values.
- Parameters:
sx (int) – Cluster size (X). Number of adjacent pixels to be combined together along x-axis. Integer higher than 2. Default: 2.
sy (int) – Cluster size (Y). Number of adjacent pixels to be combined together along y-axis. Integer higher than 2. Default: 2.
operation (str) – Single choice from: ‘sum’, ‘average’, ‘median’, ‘min’, ‘max’. Default: ‘sum’.
dtype_str (str) – Data type. Output image data type. Single choice from: ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
change_pixel_size (bool) – Change pixel size so that overall image size remains the same. Default: False.
- Returns:
New instance of
BinningParam
.Note
To instanciate a new
BinningParam
dataset, you can use the classmethodBinningParam.create()
like this:BinningParam.create(sx=2, sy=2, operation='sum', dtype_str='dtype', change_pixel_size=False)You can also first instanciate a default
BinningParam
and then set the fields like this:param = BinningParam() param.sx = 2 param.sy = 2 param.operation = 'sum' param.dtype_str = 'dtype' param.change_pixel_size = False
Common parameters#
- class cdl.param.ArithmeticParam[source]
Arithmetic parameters
- operator
Single choice from: ‘+’, ‘-’, ‘×’, ‘/’. Default: ‘+’.
- factor
Default: 1.0.
- constant
Default: 0.0.
- operation
Default: ‘’.
- restore_dtype
Result. Default: True.
- classmethod create(operator: str, factor: float, constant: float, operation: str, restore_dtype: bool) cdl.computation.base.ArithmeticParam
Returns a new instance of
ArithmeticParam
with the fields set to the given values.
- update_operation(_item, _value)[source]
Update the operation item
- class cdl.param.ClipParam[source]
Data clipping parameters
- lower
Lower clipping value. Default: None.
- upper
Upper clipping value. Default: None.
- classmethod create(lower: float, upper: float) cdl.computation.base.ClipParam
Returns a new instance of
ClipParam
with the fields set to the given values.
- class cdl.param.FFTParam[source]
FFT parameters
- shift
Shift zero frequency to center. Default: None.
- classmethod create(shift: bool) cdl.computation.base.FFTParam
Returns a new instance of
FFTParam
with the fields set to the given values.- Parameters:
shift (bool) – Shift zero frequency to center. Default: None.
- Returns:
New instance of
FFTParam
.
- class cdl.param.SpectrumParam[source]
Spectrum parameters
- log
Default: False.
- classmethod create(log: bool) cdl.computation.base.SpectrumParam
Returns a new instance of
SpectrumParam
with the fields set to the given values.- Parameters:
log (bool) – Default: False.
- Returns:
New instance of
SpectrumParam
.
- class cdl.param.GaussianParam[source]
Gaussian filter parameters
- sigma
σ. Default: 1.0.
- classmethod create(sigma: float) cdl.computation.base.GaussianParam
Returns a new instance of
GaussianParam
with the fields set to the given values.- Parameters:
sigma (float) – σ. Default: 1.0.
- Returns:
New instance of
GaussianParam
.
- class cdl.param.MovingAverageParam[source]
Moving average parameters
- n
Size of the moving window. Integer higher than 1. Default: 3.
- mode
Mode of the filter: - ‘reflect’: reflect the data at the boundary - ‘constant’: pad with a constant value - ‘nearest’: pad with the nearest value - ‘mirror’: reflect the data at the boundary with the data itself - ‘wrap’: circular boundary. Single choice from: ‘reflect’, ‘constant’, ‘nearest’, ‘mirror’, ‘wrap’. Default: ‘reflect’.
- classmethod create(n: int, mode: str) cdl.computation.base.MovingAverageParam
Returns a new instance of
MovingAverageParam
with the fields set to the given values.- Parameters:
n (int) – Size of the moving window. Integer higher than 1. Default: 3.
mode (str) – Mode of the filter: - ‘reflect’: reflect the data at the boundary - ‘constant’: pad with a constant value - ‘nearest’: pad with the nearest value - ‘mirror’: reflect the data at the boundary with the data itself - ‘wrap’: circular boundary. Single choice from: ‘reflect’, ‘constant’, ‘nearest’, ‘mirror’, ‘wrap’. Default: ‘reflect’.
- Returns:
New instance of
MovingAverageParam
.
- class cdl.param.MovingMedianParam[source]
Moving median parameters
- n
Size of the moving window. Integer higher than 1, odd. Default: 3.
- mode
Mode of the filter: - ‘reflect’: reflect the data at the boundary - ‘constant’: pad with a constant value - ‘nearest’: pad with the nearest value - ‘mirror’: reflect the data at the boundary with the data itself - ‘wrap’: circular boundary. Single choice from: ‘reflect’, ‘constant’, ‘nearest’, ‘mirror’, ‘wrap’. Default: ‘nearest’.
- classmethod create(n: int, mode: str) cdl.computation.base.MovingMedianParam
Returns a new instance of
MovingMedianParam
with the fields set to the given values.- Parameters:
n (int) – Size of the moving window. Integer higher than 1, odd. Default: 3.
mode (str) – Mode of the filter: - ‘reflect’: reflect the data at the boundary - ‘constant’: pad with a constant value - ‘nearest’: pad with the nearest value - ‘mirror’: reflect the data at the boundary with the data itself - ‘wrap’: circular boundary. Single choice from: ‘reflect’, ‘constant’, ‘nearest’, ‘mirror’, ‘wrap’. Default: ‘nearest’.
- Returns:
New instance of
MovingMedianParam
.
- class cdl.param.ConstantParam[source]
Parameter used to set a constant value to used in operations
- value
Constant value. Default: None.
- classmethod create(value: float) cdl.computation.base.ConstantParam
Returns a new instance of
ConstantParam
with the fields set to the given values.- Parameters:
value (float) – Constant value. Default: None.
- Returns:
New instance of
ConstantParam
.
Signal parameters#
- class cdl.param.DataTypeSParam[source]
Convert signal data type parameters
- dtype_str
Destination data type. Output image data type. Single choice from: ‘float32’, ‘float64’, ‘complex128’. Default: ‘float32’.
- classmethod create(dtype_str: str) cdl.computation.signal.DataTypeSParam
Returns a new instance of
DataTypeSParam
with the fields set to the given values.- Parameters:
dtype_str (str) – Destination data type. Output image data type. Single choice from: ‘float32’, ‘float64’, ‘complex128’. Default: ‘float32’.
- Returns:
New instance of
DataTypeSParam
.
- class cdl.param.FWHMParam[source]
FWHM parameters
- method
Single choice from: ‘zero-crossing’, ‘gauss’, ‘lorentz’, ‘voigt’. Default: ‘zero-crossing’.
- xmin
XMIN. Lower x boundary (empty for no limit, i.e. Start of the signal). Default: None.
- xmax
XMAX. Upper x boundary (empty for no limit, i.e. End of the signal). Default: None.
- classmethod create(method: str, xmin: float, xmax: float) cdl.computation.signal.FWHMParam
Returns a new instance of
FWHMParam
with the fields set to the given values.- Parameters:
method (str) – Single choice from: ‘zero-crossing’, ‘gauss’, ‘lorentz’, ‘voigt’. Default: ‘zero-crossing’.
xmin (float) – XMIN. Lower x boundary (empty for no limit, i.e. Start of the signal). Default: None.
xmax (float) – XMAX. Upper x boundary (empty for no limit, i.e. End of the signal). Default: None.
- Returns:
New instance of
FWHMParam
.
- class cdl.param.NormalizeParam[source]
Normalize parameters
- method
Normalize with respect to. Single choice from: ‘maximum’, ‘amplitude’, ‘area’, ‘energy’, ‘rms’. Default: ‘maximum’.
- classmethod create(method: str) cdl.computation.base.NormalizeParam
Returns a new instance of
NormalizeParam
with the fields set to the given values.- Parameters:
method (str) – Normalize with respect to. Single choice from: ‘maximum’, ‘amplitude’, ‘area’, ‘energy’, ‘rms’. Default: ‘maximum’.
- Returns:
New instance of
NormalizeParam
.
- class cdl.param.PeakDetectionParam[source]
Peak detection parameters
- threshold
Integer between 0 and 100, unit: %. Default: 30.
- min_dist
Minimum distance. Integer higher than 1, unit: points. Default: 1.
- classmethod create(threshold: int, min_dist: int) cdl.computation.signal.PeakDetectionParam
Returns a new instance of
PeakDetectionParam
with the fields set to the given values.
- class cdl.param.PolynomialFitParam[source]
Polynomial fitting parameters
- degree
Integer between 1 and 10. Default: 3.
- classmethod create(degree: int) cdl.computation.signal.PolynomialFitParam
Returns a new instance of
PolynomialFitParam
with the fields set to the given values.- Parameters:
degree (int) – Integer between 1 and 10. Default: 3.
- Returns:
New instance of
PolynomialFitParam
.
- class cdl.param.XYCalibrateParam[source]
Signal calibration parameters
- axis
Calibrate. Single choice from: ‘x’, ‘y’. Default: ‘y’.
- a
Default: 1.0.
- b
Default: 0.0.
- classmethod create(axis: str, a: float, b: float) cdl.computation.signal.XYCalibrateParam
Returns a new instance of
XYCalibrateParam
with the fields set to the given values.
- class cdl.param.InterpolationParam[source]
Interpolation parameters
- method
Interpolation method. Single choice from: ‘linear’, ‘spline’, ‘quadratic’, ‘cubic’, ‘barycentric’, ‘pchip’. Default: ‘linear’.
- fill_value
Value to use for points outside the interpolation domain (used only with linear, cubic and pchip methods). Default: None.
- classmethod create(method: str, fill_value: float) cdl.computation.signal.InterpolationParam
Returns a new instance of
InterpolationParam
with the fields set to the given values.- Parameters:
- Returns:
New instance of
InterpolationParam
.
- class cdl.param.ResamplingParam[source]
Resample parameters
- method
Interpolation method. Single choice from: ‘linear’, ‘spline’, ‘quadratic’, ‘cubic’, ‘barycentric’, ‘pchip’. Default: ‘linear’.
- fill_value
Value to use for points outside the interpolation domain (used only with linear, cubic and pchip methods). Default: None.
- xmin
Xmin. Default: None.
- xmax
Xmax. Default: None.
- mode
Single choice from: ‘dx’, ‘nbpts’. Default: ‘nbpts’.
- dx
ΔX. Default: None.
- nbpts
Number of points. Default: None.
- classmethod create(method: str, fill_value: float, xmin: float, xmax: float, mode: str, dx: float, nbpts: int) cdl.computation.signal.ResamplingParam
Returns a new instance of
ResamplingParam
with the fields set to the given values.- Parameters:
method (str) – Interpolation method. Single choice from: ‘linear’, ‘spline’, ‘quadratic’, ‘cubic’, ‘barycentric’, ‘pchip’. Default: ‘linear’.
fill_value (float) – Value to use for points outside the interpolation domain (used only with linear, cubic and pchip methods). Default: None.
xmin (float) – Xmin. Default: None.
xmax (float) – Xmax. Default: None.
mode (str) – Single choice from: ‘dx’, ‘nbpts’. Default: ‘nbpts’.
dx (float) – ΔX. Default: None.
nbpts (int) – Number of points. Default: None.
- Returns:
New instance of
ResamplingParam
.
- class cdl.param.DetrendingParam[source]
Detrending parameters
- method
Detrending method. Single choice from: ‘linear’, ‘constant’. Default: ‘linear’.
- classmethod create(method: str) cdl.computation.signal.DetrendingParam
Returns a new instance of
DetrendingParam
with the fields set to the given values.- Parameters:
method (str) – Detrending method. Single choice from: ‘linear’, ‘constant’. Default: ‘linear’.
- Returns:
New instance of
DetrendingParam
.
- class cdl.param.PowerParam[source]
Power parameters
- power
Default: 2.0.
- classmethod create(power: float) cdl.computation.signal.PowerParam
Returns a new instance of
PowerParam
with the fields set to the given values.- Parameters:
power (float) – Default: 2.0.
- Returns:
New instance of
PowerParam
.
- class cdl.param.WindowingParam[source]
Windowing parameters
- method
Single choice from: ‘barthann’, ‘bartlett’, ‘blackman’, ‘blackman-harris’, ‘bohman’, ‘boxcar’, ‘cosine’, ‘exponential’, ‘flat-top’, ‘gaussian’, ‘hamming’, ‘hanning’, ‘kaiser’, ‘lanczos’, ‘nuttall’, ‘parzen’, ‘rectangular’, ‘taylor’, ‘tukey’. Default: ‘hamming’.
- alpha
Shape parameter of the tukey windowing function. Default: 0.5.
- beta
Shape parameter of the kaiser windowing function. Default: 14.0.
- sigma
Shape parameter of the gaussian windowing function. Default: 0.5.
- classmethod create(method: str, alpha: float, beta: float, sigma: float) cdl.computation.signal.WindowingParam
Returns a new instance of
WindowingParam
with the fields set to the given values.- Parameters:
method (str) – Single choice from: ‘barthann’, ‘bartlett’, ‘blackman’, ‘blackman-harris’, ‘bohman’, ‘boxcar’, ‘cosine’, ‘exponential’, ‘flat-top’, ‘gaussian’, ‘hamming’, ‘hanning’, ‘kaiser’, ‘lanczos’, ‘nuttall’, ‘parzen’, ‘rectangular’, ‘taylor’, ‘tukey’. Default: ‘hamming’.
alpha (float) – Shape parameter of the tukey windowing function. Default: 0.5.
beta (float) – Shape parameter of the kaiser windowing function. Default: 14.0.
sigma (float) – Shape parameter of the gaussian windowing function. Default: 0.5.
- Returns:
New instance of
WindowingParam
.
- class cdl.param.LowPassFilterParam[source]
Low-pass filter parameters
- method
Filter method. Single choice from: ‘bessel’, ‘butter’, ‘cheby1’, ‘cheby2’, ‘ellip’. Default: ‘bessel’.
- order
Filter order. Integer higher than 1. Default: 3.
- f_cut0
Low cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
- f_cut1
High cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
- rp
Passband ripple. Float higher than 0, non zero, unit: db. Default: 1.
- rs
Stopband attenuation. Float higher than 0, non zero, unit: db. Default: 1.
- classmethod create(method: str, order: int, f_cut0: float, f_cut1: float, rp: float, rs: float) cdl.computation.signal.LowPassFilterParam
Returns a new instance of
LowPassFilterParam
with the fields set to the given values.- Parameters:
method (str) – Filter method. Single choice from: ‘bessel’, ‘butter’, ‘cheby1’, ‘cheby2’, ‘ellip’. Default: ‘bessel’.
order (int) – Filter order. Integer higher than 1. Default: 3.
f_cut0 (float) – Low cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
f_cut1 (float) – High cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
rp (float) – Passband ripple. Float higher than 0, non zero, unit: db. Default: 1.
rs (float) – Stopband attenuation. Float higher than 0, non zero, unit: db. Default: 1.
- Returns:
New instance of
LowPassFilterParam
.
- class cdl.param.HighPassFilterParam[source]
High-pass filter parameters
- method
Filter method. Single choice from: ‘bessel’, ‘butter’, ‘cheby1’, ‘cheby2’, ‘ellip’. Default: ‘bessel’.
- order
Filter order. Integer higher than 1. Default: 3.
- f_cut0
Low cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
- f_cut1
High cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
- rp
Passband ripple. Float higher than 0, non zero, unit: db. Default: 1.
- rs
Stopband attenuation. Float higher than 0, non zero, unit: db. Default: 1.
- classmethod create(method: str, order: int, f_cut0: float, f_cut1: float, rp: float, rs: float) cdl.computation.signal.HighPassFilterParam
Returns a new instance of
HighPassFilterParam
with the fields set to the given values.- Parameters:
method (str) – Filter method. Single choice from: ‘bessel’, ‘butter’, ‘cheby1’, ‘cheby2’, ‘ellip’. Default: ‘bessel’.
order (int) – Filter order. Integer higher than 1. Default: 3.
f_cut0 (float) – Low cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
f_cut1 (float) – High cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
rp (float) – Passband ripple. Float higher than 0, non zero, unit: db. Default: 1.
rs (float) – Stopband attenuation. Float higher than 0, non zero, unit: db. Default: 1.
- Returns:
New instance of
HighPassFilterParam
.
- class cdl.param.BandPassFilterParam[source]
Band-pass filter parameters
- method
Filter method. Single choice from: ‘bessel’, ‘butter’, ‘cheby1’, ‘cheby2’, ‘ellip’. Default: ‘bessel’.
- order
Filter order. Integer higher than 1. Default: 3.
- f_cut0
Low cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
- f_cut1
High cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
- rp
Passband ripple. Float higher than 0, non zero, unit: db. Default: 1.
- rs
Stopband attenuation. Float higher than 0, non zero, unit: db. Default: 1.
- classmethod create(method: str, order: int, f_cut0: float, f_cut1: float, rp: float, rs: float) cdl.computation.signal.BandPassFilterParam
Returns a new instance of
BandPassFilterParam
with the fields set to the given values.- Parameters:
method (str) – Filter method. Single choice from: ‘bessel’, ‘butter’, ‘cheby1’, ‘cheby2’, ‘ellip’. Default: ‘bessel’.
order (int) – Filter order. Integer higher than 1. Default: 3.
f_cut0 (float) – Low cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
f_cut1 (float) – High cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
rp (float) – Passband ripple. Float higher than 0, non zero, unit: db. Default: 1.
rs (float) – Stopband attenuation. Float higher than 0, non zero, unit: db. Default: 1.
- Returns:
New instance of
BandPassFilterParam
.
- class cdl.param.BandStopFilterParam[source]
Band-stop filter parameters
- method
Filter method. Single choice from: ‘bessel’, ‘butter’, ‘cheby1’, ‘cheby2’, ‘ellip’. Default: ‘bessel’.
- order
Filter order. Integer higher than 1. Default: 3.
- f_cut0
Low cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
- f_cut1
High cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
- rp
Passband ripple. Float higher than 0, non zero, unit: db. Default: 1.
- rs
Stopband attenuation. Float higher than 0, non zero, unit: db. Default: 1.
- classmethod create(method: str, order: int, f_cut0: float, f_cut1: float, rp: float, rs: float) cdl.computation.signal.BandStopFilterParam
Returns a new instance of
BandStopFilterParam
with the fields set to the given values.- Parameters:
method (str) – Filter method. Single choice from: ‘bessel’, ‘butter’, ‘cheby1’, ‘cheby2’, ‘ellip’. Default: ‘bessel’.
order (int) – Filter order. Integer higher than 1. Default: 3.
f_cut0 (float) – Low cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
f_cut1 (float) – High cutoff frequency. Float higher than 0, non zero, unit: hz. Default: None.
rp (float) – Passband ripple. Float higher than 0, non zero, unit: db. Default: 1.
rs (float) – Stopband attenuation. Float higher than 0, non zero, unit: db. Default: 1.
- Returns:
New instance of
BandStopFilterParam
.
- class cdl.param.DynamicParam[source]
Parameters for dynamic range computation (ENOB, SNR, SINAD, THD, SFDR)
- full_scale
Float higher than 0.0, unit: v. Default: 0.16.
- unit
Unit for sinad. Single choice from: ‘dBc’, ‘dBFS’. Default: ‘dBc’.
- nb_harm
Number of harmonics. Number of harmonics to consider for thd. Integer higher than 1. Default: 5.
- classmethod create(full_scale: float, unit: str, nb_harm: int) cdl.computation.signal.DynamicParam
Returns a new instance of
DynamicParam
with the fields set to the given values.- Parameters:
- Returns:
New instance of
DynamicParam
.
Image parameters#
Base image parameters#
- class cdl.param.BinningParam[source]
Binning parameters
- sx
Cluster size (X). Number of adjacent pixels to be combined together along x-axis. Integer higher than 2. Default: 2.
- sy
Cluster size (Y). Number of adjacent pixels to be combined together along y-axis. Integer higher than 2. Default: 2.
- operation
Single choice from: ‘sum’, ‘average’, ‘median’, ‘min’, ‘max’. Default: ‘sum’.
- dtype_str
Data type. Output image data type. Single choice from: ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
- change_pixel_size
Change pixel size so that overall image size remains the same. Default: False.
- classmethod create(sx: int, sy: int, operation: str, dtype_str: str, change_pixel_size: bool) cdl.computation.image.BinningParam
Returns a new instance of
BinningParam
with the fields set to the given values.- Parameters:
sx (int) – Cluster size (X). Number of adjacent pixels to be combined together along x-axis. Integer higher than 2. Default: 2.
sy (int) – Cluster size (Y). Number of adjacent pixels to be combined together along y-axis. Integer higher than 2. Default: 2.
operation (str) – Single choice from: ‘sum’, ‘average’, ‘median’, ‘min’, ‘max’. Default: ‘sum’.
dtype_str (str) – Data type. Output image data type. Single choice from: ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
change_pixel_size (bool) – Change pixel size so that overall image size remains the same. Default: False.
- Returns:
New instance of
BinningParam
.
- class cdl.param.ButterworthParam[source]
Butterworth filter parameters
- cut_off
Cut-off frequency ratio. Cut-off frequency ratio. Float between 0.0 and 0.5. Default: 0.005.
- high_pass
If true, apply high-pass filter instead of low-pass. Default: False.
- order
Order of the butterworth filter. Integer higher than 1. Default: 2.
- classmethod create(cut_off: float, high_pass: bool, order: int) cdl.computation.image.ButterworthParam
Returns a new instance of
ButterworthParam
with the fields set to the given values.- Parameters:
- Returns:
New instance of
ButterworthParam
.
- class cdl.param.DataTypeIParam[source]
Convert image data type parameters
- dtype_str
Destination data type. Output image data type. Single choice from: ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘float32’.
- classmethod create(dtype_str: str) cdl.computation.image.DataTypeIParam
Returns a new instance of
DataTypeIParam
with the fields set to the given values.- Parameters:
dtype_str (str) – Destination data type. Output image data type. Single choice from: ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘float32’.
- Returns:
New instance of
DataTypeIParam
.
- class cdl.param.FlatFieldParam[source]
Flat-field parameters
- threshold
Default: 0.0.
- classmethod create(threshold: float) cdl.computation.image.FlatFieldParam
Returns a new instance of
FlatFieldParam
with the fields set to the given values.- Parameters:
threshold (float) – Default: 0.0.
- Returns:
New instance of
FlatFieldParam
.
- class cdl.param.GridParam[source]
Grid parameters
- direction
Distribute over. Single choice from: ‘col’, ‘row’. Default: ‘col’.
- cols
Columns. Integer, non zero. Default: 1.
- rows
Integer, non zero. Default: 1.
- colspac
Column spacing. Float higher than 0.0. Default: 0.0.
- rowspac
Row spacing. Float higher than 0.0. Default: 0.0.
- classmethod create(direction: str, cols: int, rows: int, colspac: float, rowspac: float) cdl.computation.image.GridParam
Returns a new instance of
GridParam
with the fields set to the given values.- Parameters:
direction (str) – Distribute over. Single choice from: ‘col’, ‘row’. Default: ‘col’.
cols (int) – Columns. Integer, non zero. Default: 1.
rows (int) – Integer, non zero. Default: 1.
colspac (float) – Column spacing. Float higher than 0.0. Default: 0.0.
rowspac (float) – Row spacing. Float higher than 0.0. Default: 0.0.
- Returns:
New instance of
GridParam
.
- class cdl.param.HoughCircleParam[source]
Circle Hough transform parameters
- min_radius
Radiusmin. Integer higher than 0, non zero, unit: pixels. Default: None.
- max_radius
Radiusmax. Integer higher than 0, non zero, unit: pixels. Default: None.
- min_distance
Minimal distance. Integer higher than 0. Default: None.
- classmethod create(min_radius: int, max_radius: int, min_distance: int) cdl.computation.image.HoughCircleParam
Returns a new instance of
HoughCircleParam
with the fields set to the given values.- Parameters:
- Returns:
New instance of
HoughCircleParam
.
- class cdl.param.LogP1Param[source]
Log10 parameters
- n
Default: None.
- classmethod create(n: float) cdl.computation.image.LogP1Param
Returns a new instance of
LogP1Param
with the fields set to the given values.- Parameters:
n (float) – Default: None.
- Returns:
New instance of
LogP1Param
.
- class cdl.param.LineProfileParam[source]
Horizontal or vertical profile parameters
- direction
Single choice from: ‘horizontal’, ‘vertical’. Default: ‘horizontal’.
- row
Integer higher than 0. Default: 0.
- col
Column. Integer higher than 0. Default: 0.
- classmethod create(direction: str, row: int, col: int) cdl.computation.image.LineProfileParam
Returns a new instance of
LineProfileParam
with the fields set to the given values.
- class cdl.param.SegmentProfileParam[source]
Segment profile parameters
- row1
Start row. Integer higher than 0. Default: 0.
- col1
Start column. Integer higher than 0. Default: 0.
- row2
End row. Integer higher than 0. Default: 0.
- col2
End column. Integer higher than 0. Default: 0.
- classmethod create(row1: int, col1: int, row2: int, col2: int) cdl.computation.image.SegmentProfileParam
Returns a new instance of
SegmentProfileParam
with the fields set to the given values.
- class cdl.param.AverageProfileParam[source]
Average horizontal or vertical profile parameters
- direction
Single choice from: ‘horizontal’, ‘vertical’. Default: ‘horizontal’.
- row1
Integer higher than 0. Default: 0.
- row2
Integer higher than -1. Default: -1.
- col1
Column 1. Integer higher than 0. Default: 0.
- col2
Column 2. Integer higher than -1. Default: -1.
- classmethod create(direction: str, row1: int, row2: int, col1: int, col2: int) cdl.computation.image.AverageProfileParam
Returns a new instance of
AverageProfileParam
with the fields set to the given values.- Parameters:
direction (str) – Single choice from: ‘horizontal’, ‘vertical’. Default: ‘horizontal’.
row1 (int) – Integer higher than 0. Default: 0.
row2 (int) – Integer higher than -1. Default: -1.
col1 (int) – Column 1. Integer higher than 0. Default: 0.
col2 (int) – Column 2. Integer higher than -1. Default: -1.
- Returns:
New instance of
AverageProfileParam
.
- class cdl.param.RadialProfileParam[source]
Radial profile parameters
- center
Center position. Single choice from: ‘centroid’, ‘center’, ‘user’. Default: ‘centroid’.
- x0
XCenter. Float, unit: pixel. Default: None.
- y0
XCenter. Float, unit: pixel. Default: None.
- classmethod create(center: str, x0: float, y0: float) cdl.computation.image.RadialProfileParam
Returns a new instance of
RadialProfileParam
with the fields set to the given values.
- choice_callback(item, value)[source]
Callback for choice item
- class cdl.param.ResizeParam[source]
Resize parameters
- zoom
Default: None.
- mode
Single choice from: ‘constant’, ‘nearest’, ‘reflect’, ‘wrap’. Default: ‘constant’.
- cval
Value used for points outside the boundaries of the input if mode is ‘constant’. Default: 0.0.
- prefilter
Default: True.
- order
Spline interpolation order. Integer between 0 and 5. Default: 3.
- classmethod create(zoom: float, mode: str, cval: float, prefilter: bool, order: int) cdl.computation.image.ResizeParam
Returns a new instance of
ResizeParam
with the fields set to the given values.- Parameters:
zoom (float) – Default: None.
mode (str) – Single choice from: ‘constant’, ‘nearest’, ‘reflect’, ‘wrap’. Default: ‘constant’.
cval (float) – Value used for points outside the boundaries of the input if mode is ‘constant’. Default: 0.0.
prefilter (bool) – Default: True.
order (int) – Spline interpolation order. Integer between 0 and 5. Default: 3.
- Returns:
New instance of
ResizeParam
.
- class cdl.param.RotateParam[source]
Rotate parameters
- angle
Angle (°). Default: None.
- mode
Single choice from: ‘constant’, ‘nearest’, ‘reflect’, ‘wrap’. Default: ‘constant’.
- cval
Value used for points outside the boundaries of the input if mode is ‘constant’. Default: 0.0.
- reshape
Reshape the output array so that the input array is contained completely in the output. Default: False.
- prefilter
Default: True.
- order
Spline interpolation order. Integer between 0 and 5. Default: 3.
- classmethod create(angle: float, mode: str, cval: float, reshape: bool, prefilter: bool, order: int) cdl.computation.image.RotateParam
Returns a new instance of
RotateParam
with the fields set to the given values.- Parameters:
angle (float) – Angle (°). Default: None.
mode (str) – Single choice from: ‘constant’, ‘nearest’, ‘reflect’, ‘wrap’. Default: ‘constant’.
cval (float) – Value used for points outside the boundaries of the input if mode is ‘constant’. Default: 0.0.
reshape (bool) – Reshape the output array so that the input array is contained completely in the output. Default: False.
prefilter (bool) – Default: True.
order (int) – Spline interpolation order. Integer between 0 and 5. Default: 3.
- Returns:
New instance of
RotateParam
.
- class cdl.param.ZCalibrateParam[source]
Image linear calibration parameters
- a
Default: 1.0.
- b
Default: 0.0.
- classmethod create(a: float, b: float) cdl.computation.image.ZCalibrateParam
Returns a new instance of
ZCalibrateParam
with the fields set to the given values.
Threshold parameters#
- class cdl.param.ThresholdParam[source]
Histogram threshold parameters
- method
Threshold method. Single choice from: ‘manual’, ‘isodata’, ‘li’, ‘mean’, ‘minimum’, ‘otsu’, ‘triangle’, ‘yen’. Default: ‘manual’.
- bins
Number of bins. Integer higher than 1. Default: 256.
- value
Threshold value. Default: 0.0.
- operation
Single choice from: ‘>’, ‘<’. Default: ‘>’.
- classmethod create(method: str, bins: int, value: float, operation: str) cdl.computation.image.threshold.ThresholdParam
Returns a new instance of
ThresholdParam
with the fields set to the given values.- Parameters:
method (str) – Threshold method. Single choice from: ‘manual’, ‘isodata’, ‘li’, ‘mean’, ‘minimum’, ‘otsu’, ‘triangle’, ‘yen’. Default: ‘manual’.
bins (int) – Number of bins. Integer higher than 1. Default: 256.
value (float) – Threshold value. Default: 0.0.
operation (str) – Single choice from: ‘>’, ‘<’. Default: ‘>’.
- Returns:
New instance of
ThresholdParam
.
Exposure correction parameters#
- class cdl.param.AdjustGammaParam[source]
Gamma adjustment parameters
- gamma
Gamma correction factor (higher values give more contrast). Float higher than 0.0. Default: 1.0.
- gain
Gain factor (higher values give more contrast). Float higher than 0.0. Default: 1.0.
- classmethod create(gamma: float, gain: float) cdl.computation.image.exposure.AdjustGammaParam
Returns a new instance of
AdjustGammaParam
with the fields set to the given values.
- class cdl.param.AdjustLogParam[source]
Logarithmic adjustment parameters
- gain
Gain factor (higher values give more contrast). Float higher than 0.0. Default: 1.0.
- inv
If true, apply inverse logarithmic transformation. Default: False.
- classmethod create(gain: float, inv: bool) cdl.computation.image.exposure.AdjustLogParam
Returns a new instance of
AdjustLogParam
with the fields set to the given values.
- class cdl.param.AdjustSigmoidParam[source]
Sigmoid adjustment parameters
- cutoff
Cutoff value (higher values give more contrast). Float between 0.0 and 1.0. Default: 0.5.
- gain
Gain factor (higher values give more contrast). Float higher than 0.0. Default: 10.0.
- inv
If true, apply inverse sigmoid transformation. Default: False.
- classmethod create(cutoff: float, gain: float, inv: bool) cdl.computation.image.exposure.AdjustSigmoidParam
Returns a new instance of
AdjustSigmoidParam
with the fields set to the given values.- Parameters:
- Returns:
New instance of
AdjustSigmoidParam
.
- class cdl.param.EqualizeAdaptHistParam[source]
Adaptive histogram equalization parameters
- nbins
Number of bins. Number of bins for image histogram. Integer higher than 1. Default: 256.
- clip_limit
Clipping limit. Clipping limit (higher values give more contrast). Float between 0.0 and 1.0. Default: 0.01.
- classmethod create(nbins: int, clip_limit: float) cdl.computation.image.exposure.EqualizeAdaptHistParam
Returns a new instance of
EqualizeAdaptHistParam
with the fields set to the given values.
- class cdl.param.EqualizeHistParam[source]
Histogram equalization parameters
- nbins
Number of bins. Number of bins for image histogram. Integer higher than 1. Default: 256.
- classmethod create(nbins: int) cdl.computation.image.exposure.EqualizeHistParam
Returns a new instance of
EqualizeHistParam
with the fields set to the given values.- Parameters:
nbins (int) – Number of bins. Number of bins for image histogram. Integer higher than 1. Default: 256.
- Returns:
New instance of
EqualizeHistParam
.
- class cdl.param.RescaleIntensityParam[source]
Intensity rescaling parameters
- in_range
Input range. Min and max intensity values of input image (‘image’ refers to input image min/max levels, ‘dtype’ refers to input image data type range). Single choice from: ‘image’, ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘image’.
- out_range
Output range. Min and max intensity values of output image (‘image’ refers to input image min/max levels, ‘dtype’ refers to input image data type range).. Single choice from: ‘image’, ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
- classmethod create(in_range: str, out_range: str) cdl.computation.image.exposure.RescaleIntensityParam
Returns a new instance of
RescaleIntensityParam
with the fields set to the given values.- Parameters:
in_range (str) – Input range. Min and max intensity values of input image (‘image’ refers to input image min/max levels, ‘dtype’ refers to input image data type range). Single choice from: ‘image’, ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘image’.
out_range (str) – Output range. Min and max intensity values of output image (‘image’ refers to input image min/max levels, ‘dtype’ refers to input image data type range).. Single choice from: ‘image’, ‘dtype’, ‘float32’, ‘float64’, ‘complex128’, ‘uint8’, ‘int16’, ‘uint16’, ‘int32’. Default: ‘dtype’.
- Returns:
New instance of
RescaleIntensityParam
.
Restoration parameters#
- class cdl.param.DenoiseBilateralParam[source]
Bilateral filter denoising parameters
- sigma_spatial
σspatial. Standard deviation for range distance. A larger value results in averaging of pixels with larger spatial differences. Float higher than 0, non zero, unit: pixels. Default: 1.0.
- mode
Single choice from: ‘constant’, ‘edge’, ‘symmetric’, ‘reflect’, ‘wrap’. Default: ‘constant’.
- cval
Used in conjunction with mode ‘constant’, the value outside the image boundaries. Default: 0.
- classmethod create(sigma_spatial: float, mode: str, cval: float) cdl.computation.image.restoration.DenoiseBilateralParam
Returns a new instance of
DenoiseBilateralParam
with the fields set to the given values.- Parameters:
sigma_spatial (float) – σspatial. Standard deviation for range distance. A larger value results in averaging of pixels with larger spatial differences. Float higher than 0, non zero, unit: pixels. Default: 1.0.
mode (str) – Single choice from: ‘constant’, ‘edge’, ‘symmetric’, ‘reflect’, ‘wrap’. Default: ‘constant’.
cval (float) – Used in conjunction with mode ‘constant’, the value outside the image boundaries. Default: 0.
- Returns:
New instance of
DenoiseBilateralParam
.
- class cdl.param.DenoiseTVParam[source]
Total Variation denoising parameters
- weight
Denoising weight. The greater weight, the more denoising (at the expense of fidelity to input). Float higher than 0, non zero. Default: 0.1.
- eps
Epsilon. Relative difference of the value of the cost function that determines the stop criterion. The algorithm stops when: (e_(n-1) - e_n) < eps * e_0. Float higher than 0, non zero. Default: 0.0002.
- max_num_iter
Max. iterations. Maximal number of iterations used for the optimization. Integer higher than 0, non zero. Default: 200.
- classmethod create(weight: float, eps: float, max_num_iter: int) cdl.computation.image.restoration.DenoiseTVParam
Returns a new instance of
DenoiseTVParam
with the fields set to the given values.- Parameters:
weight (float) – Denoising weight. The greater weight, the more denoising (at the expense of fidelity to input). Float higher than 0, non zero. Default: 0.1.
eps (float) – Epsilon. Relative difference of the value of the cost function that determines the stop criterion. The algorithm stops when: (e_(n-1) - e_n) < eps * e_0. Float higher than 0, non zero. Default: 0.0002.
max_num_iter (int) – Max. iterations. Maximal number of iterations used for the optimization. Integer higher than 0, non zero. Default: 200.
- Returns:
New instance of
DenoiseTVParam
.
- class cdl.param.DenoiseWaveletParam[source]
Wavelet denoising parameters
- wavelet
Single choice from: ‘bior1.1’, ‘bior1.3’, ‘bior1.5’, ‘bior2.2’, ‘bior2.4’, ‘bior2.6’, ‘bior2.8’, ‘bior3.1’, ‘bior3.3’, ‘bior3.5’, ‘bior3.7’, ‘bior3.9’, ‘bior4.4’, ‘bior5.5’, ‘bior6.8’, ‘cgau1’, ‘cgau2’, ‘cgau3’, ‘cgau4’, ‘cgau5’, ‘cgau6’, ‘cgau7’, ‘cgau8’, ‘cmor’, ‘coif1’, ‘coif2’, ‘coif3’, ‘coif4’, ‘coif5’, ‘coif6’, ‘coif7’, ‘coif8’, ‘coif9’, ‘coif10’, ‘coif11’, ‘coif12’, ‘coif13’, ‘coif14’, ‘coif15’, ‘coif16’, ‘coif17’, ‘db1’, ‘db2’, ‘db3’, ‘db4’, ‘db5’, ‘db6’, ‘db7’, ‘db8’, ‘db9’, ‘db10’, ‘db11’, ‘db12’, ‘db13’, ‘db14’, ‘db15’, ‘db16’, ‘db17’, ‘db18’, ‘db19’, ‘db20’, ‘db21’, ‘db22’, ‘db23’, ‘db24’, ‘db25’, ‘db26’, ‘db27’, ‘db28’, ‘db29’, ‘db30’, ‘db31’, ‘db32’, ‘db33’, ‘db34’, ‘db35’, ‘db36’, ‘db37’, ‘db38’, ‘dmey’, ‘fbsp’, ‘gaus1’, ‘gaus2’, ‘gaus3’, ‘gaus4’, ‘gaus5’, ‘gaus6’, ‘gaus7’, ‘gaus8’, ‘haar’, ‘mexh’, ‘morl’, ‘rbio1.1’, ‘rbio1.3’, ‘rbio1.5’, ‘rbio2.2’, ‘rbio2.4’, ‘rbio2.6’, ‘rbio2.8’, ‘rbio3.1’, ‘rbio3.3’, ‘rbio3.5’, ‘rbio3.7’, ‘rbio3.9’, ‘rbio4.4’, ‘rbio5.5’, ‘rbio6.8’, ‘shan’, ‘sym2’, ‘sym3’, ‘sym4’, ‘sym5’, ‘sym6’, ‘sym7’, ‘sym8’, ‘sym9’, ‘sym10’, ‘sym11’, ‘sym12’, ‘sym13’, ‘sym14’, ‘sym15’, ‘sym16’, ‘sym17’, ‘sym18’, ‘sym19’, ‘sym20’. Default: ‘sym9’.
- mode
Single choice from: ‘soft’, ‘hard’. Default: ‘soft’.
- method
Single choice from: ‘BayesShrink’, ‘VisuShrink’. Default: ‘VisuShrink’.
- classmethod create(wavelet: str, mode: str, method: str) cdl.computation.image.restoration.DenoiseWaveletParam
Returns a new instance of
DenoiseWaveletParam
with the fields set to the given values.- Parameters:
wavelet (str) – Single choice from: ‘bior1.1’, ‘bior1.3’, ‘bior1.5’, ‘bior2.2’, ‘bior2.4’, ‘bior2.6’, ‘bior2.8’, ‘bior3.1’, ‘bior3.3’, ‘bior3.5’, ‘bior3.7’, ‘bior3.9’, ‘bior4.4’, ‘bior5.5’, ‘bior6.8’, ‘cgau1’, ‘cgau2’, ‘cgau3’, ‘cgau4’, ‘cgau5’, ‘cgau6’, ‘cgau7’, ‘cgau8’, ‘cmor’, ‘coif1’, ‘coif2’, ‘coif3’, ‘coif4’, ‘coif5’, ‘coif6’, ‘coif7’, ‘coif8’, ‘coif9’, ‘coif10’, ‘coif11’, ‘coif12’, ‘coif13’, ‘coif14’, ‘coif15’, ‘coif16’, ‘coif17’, ‘db1’, ‘db2’, ‘db3’, ‘db4’, ‘db5’, ‘db6’, ‘db7’, ‘db8’, ‘db9’, ‘db10’, ‘db11’, ‘db12’, ‘db13’, ‘db14’, ‘db15’, ‘db16’, ‘db17’, ‘db18’, ‘db19’, ‘db20’, ‘db21’, ‘db22’, ‘db23’, ‘db24’, ‘db25’, ‘db26’, ‘db27’, ‘db28’, ‘db29’, ‘db30’, ‘db31’, ‘db32’, ‘db33’, ‘db34’, ‘db35’, ‘db36’, ‘db37’, ‘db38’, ‘dmey’, ‘fbsp’, ‘gaus1’, ‘gaus2’, ‘gaus3’, ‘gaus4’, ‘gaus5’, ‘gaus6’, ‘gaus7’, ‘gaus8’, ‘haar’, ‘mexh’, ‘morl’, ‘rbio1.1’, ‘rbio1.3’, ‘rbio1.5’, ‘rbio2.2’, ‘rbio2.4’, ‘rbio2.6’, ‘rbio2.8’, ‘rbio3.1’, ‘rbio3.3’, ‘rbio3.5’, ‘rbio3.7’, ‘rbio3.9’, ‘rbio4.4’, ‘rbio5.5’, ‘rbio6.8’, ‘shan’, ‘sym2’, ‘sym3’, ‘sym4’, ‘sym5’, ‘sym6’, ‘sym7’, ‘sym8’, ‘sym9’, ‘sym10’, ‘sym11’, ‘sym12’, ‘sym13’, ‘sym14’, ‘sym15’, ‘sym16’, ‘sym17’, ‘sym18’, ‘sym19’, ‘sym20’. Default: ‘sym9’.
mode (str) – Single choice from: ‘soft’, ‘hard’. Default: ‘soft’.
method (str) – Single choice from: ‘BayesShrink’, ‘VisuShrink’. Default: ‘VisuShrink’.
- Returns:
New instance of
DenoiseWaveletParam
.
Morphological parameters#
- class cdl.param.MorphologyParam[source]
White Top-Hat parameters
- radius
Footprint (disk) radius. Integer higher than 1. Default: 1.
- classmethod create(radius: int) cdl.computation.image.morphology.MorphologyParam
Returns a new instance of
MorphologyParam
with the fields set to the given values.- Parameters:
radius (int) – Footprint (disk) radius. Integer higher than 1. Default: 1.
- Returns:
New instance of
MorphologyParam
.
Edge detection parameters#
- class cdl.param.CannyParam[source]
Canny filter parameters
- sigma
Standard deviation of the gaussian filter. Float higher than 0, non zero, unit: pixels. Default: 1.0.
- low_threshold
Lower bound for hysteresis thresholding (linking edges). Float higher than 0. Default: 0.1.
- high_threshold
Upper bound for hysteresis thresholding (linking edges). Float higher than 0. Default: 0.9.
- use_quantiles
If true then treat low_threshold and high_threshold as quantiles of the edge magnitude image, rather than absolute edge magnitude values. If true then the thresholds must be in the range [0, 1]. Default: True.
- mode
Single choice from: ‘reflect’, ‘constant’, ‘nearest’, ‘mirror’, ‘wrap’. Default: ‘constant’.
- cval
Value to fill past edges of input if mode is constant. Default: 0.0.
- classmethod create(sigma: float, low_threshold: float, high_threshold: float, use_quantiles: bool, mode: str, cval: float) cdl.computation.image.edges.CannyParam
Returns a new instance of
CannyParam
with the fields set to the given values.- Parameters:
sigma (float) – Standard deviation of the gaussian filter. Float higher than 0, non zero, unit: pixels. Default: 1.0.
low_threshold (float) – Lower bound for hysteresis thresholding (linking edges). Float higher than 0. Default: 0.1.
high_threshold (float) – Upper bound for hysteresis thresholding (linking edges). Float higher than 0. Default: 0.9.
use_quantiles (bool) – If true then treat low_threshold and high_threshold as quantiles of the edge magnitude image, rather than absolute edge magnitude values. If true then the thresholds must be in the range [0, 1]. Default: True.
mode (str) – Single choice from: ‘reflect’, ‘constant’, ‘nearest’, ‘mirror’, ‘wrap’. Default: ‘constant’.
cval (float) – Value to fill past edges of input if mode is constant. Default: 0.0.
- Returns:
New instance of
CannyParam
.
Detection parameters#
- class cdl.param.BlobDOGParam[source]
Blob detection using Difference of Gaussian method
- min_sigma
σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 1.0.
- max_sigma
σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
- threshold_rel
Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
- overlap
If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
- exclude_border
If true, exclude blobs from the border of the image. Default: True.
- classmethod create(min_sigma: float, max_sigma: float, threshold_rel: float, overlap: float, exclude_border: bool) cdl.computation.image.detection.BlobDOGParam
Returns a new instance of
BlobDOGParam
with the fields set to the given values.- Parameters:
min_sigma (float) – σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 1.0.
max_sigma (float) – σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
threshold_rel (float) – Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
overlap (float) – If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
exclude_border (bool) – If true, exclude blobs from the border of the image. Default: True.
- Returns:
New instance of
BlobDOGParam
.
- class cdl.param.BlobDOHParam[source]
Blob detection using Determinant of Hessian method
- min_sigma
σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 1.0.
- max_sigma
σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
- threshold_rel
Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
- overlap
If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
- log_scale
If set intermediate values of standard deviations are interpolated using a logarithmic scale to the base 10. If not, linear interpolation is used. Default: False.
- classmethod create(min_sigma: float, max_sigma: float, threshold_rel: float, overlap: float, log_scale: bool) cdl.computation.image.detection.BlobDOHParam
Returns a new instance of
BlobDOHParam
with the fields set to the given values.- Parameters:
min_sigma (float) – σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 1.0.
max_sigma (float) – σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
threshold_rel (float) – Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
overlap (float) – If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
log_scale (bool) – If set intermediate values of standard deviations are interpolated using a logarithmic scale to the base 10. If not, linear interpolation is used. Default: False.
- Returns:
New instance of
BlobDOHParam
.
- class cdl.param.BlobLOGParam[source]
Blob detection using Laplacian of Gaussian method
- min_sigma
σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 1.0.
- max_sigma
σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
- threshold_rel
Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
- overlap
If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
- log_scale
If set intermediate values of standard deviations are interpolated using a logarithmic scale to the base 10. If not, linear interpolation is used. Default: False.
- exclude_border
If true, exclude blobs from the border of the image. Default: True.
- classmethod create(min_sigma: float, max_sigma: float, threshold_rel: float, overlap: float, log_scale: bool, exclude_border: bool) cdl.computation.image.detection.BlobLOGParam
Returns a new instance of
BlobLOGParam
with the fields set to the given values.- Parameters:
min_sigma (float) – σmin. The minimum standard deviation for gaussian kernel. Keep this low to detect smaller blobs. Float higher than 0, non zero, unit: pixels. Default: 1.0.
max_sigma (float) – σmax. The maximum standard deviation for gaussian kernel. Keep this high to detect larger blobs. Float higher than 0, non zero, unit: pixels. Default: 30.0.
threshold_rel (float) – Relative threshold. Minimum intensity of blobs. Float between 0.0 and 1.0. Default: 0.2.
overlap (float) – If two blobs overlap by a fraction greater than this value, the smaller blob is eliminated. Float between 0.0 and 1.0. Default: 0.5.
log_scale (bool) – If set intermediate values of standard deviations are interpolated using a logarithmic scale to the base 10. If not, linear interpolation is used. Default: False.
exclude_border (bool) – If true, exclude blobs from the border of the image. Default: True.
- Returns:
New instance of
BlobLOGParam
.
- class cdl.param.BlobOpenCVParam[source]
Blob detection using OpenCV
- min_threshold
Min. threshold. The minimum threshold between local maxima and minima. This parameter does not affect the quality of the blobs, only the quantity. Lower thresholds result in larger numbers of blobs. Float higher than 0.0. Default: 10.0.
- max_threshold
Max. threshold. The maximum threshold between local maxima and minima. This parameter does not affect the quality of the blobs, only the quantity. Lower thresholds result in larger numbers of blobs. Float higher than 0.0. Default: 200.0.
- min_repeatability
Min. repeatability. The minimum number of times a blob needs to be detected in a sequence of images to be considered valid. Integer higher than 1. Default: 2.
- min_dist_between_blobs
Min. distance between blobs. The minimum distance between two blobs. If blobs are found closer together than this distance, the smaller blob is removed. Float higher than 0.0, non zero. Default: 10.0.
- filter_by_color
If true, the image is filtered by color instead of intensity. Default: True.
- blob_color
The color of the blobs to detect (0 for dark blobs, 255 for light blobs). Default: 0.
- filter_by_area
If true, the image is filtered by blob area. Default: True.
- min_area
Min. area. The minimum blob area. Float higher than 0.0. Default: 25.0.
- max_area
Max. area. The maximum blob area. Float higher than 0.0. Default: 500.0.
- filter_by_circularity
If true, the image is filtered by blob circularity. Default: False.
- min_circularity
Min. circularity. The minimum circularity of the blobs. Float between 0.0 and 1.0. Default: 0.8.
- max_circularity
Max. circularity. The maximum circularity of the blobs. Float between 0.0 and 1.0. Default: 1.0.
- filter_by_inertia
If true, the image is filtered by blob inertia. Default: False.
- min_inertia_ratio
Min. inertia ratio. The minimum inertia ratio of the blobs. Float between 0.0 and 1.0. Default: 0.6.
- max_inertia_ratio
Max. inertia ratio. The maximum inertia ratio of the blobs. Float between 0.0 and 1.0. Default: 1.0.
- filter_by_convexity
If true, the image is filtered by blob convexity. Default: False.
- min_convexity
Min. convexity. The minimum convexity of the blobs. Float between 0.0 and 1.0. Default: 0.8.
- max_convexity
Max. convexity. The maximum convexity of the blobs. Float between 0.0 and 1.0. Default: 1.0.
- classmethod create(min_threshold: float, max_threshold: float, min_repeatability: int, min_dist_between_blobs: float, filter_by_color: bool, blob_color: int, filter_by_area: bool, min_area: float, max_area: float, filter_by_circularity: bool, min_circularity: float, max_circularity: float, filter_by_inertia: bool, min_inertia_ratio: float, max_inertia_ratio: float, filter_by_convexity: bool, min_convexity: float, max_convexity: float) cdl.computation.image.detection.BlobOpenCVParam
Returns a new instance of
BlobOpenCVParam
with the fields set to the given values.- Parameters:
min_threshold (float) – Min. threshold. The minimum threshold between local maxima and minima. This parameter does not affect the quality of the blobs, only the quantity. Lower thresholds result in larger numbers of blobs. Float higher than 0.0. Default: 10.0.
max_threshold (float) – Max. threshold. The maximum threshold between local maxima and minima. This parameter does not affect the quality of the blobs, only the quantity. Lower thresholds result in larger numbers of blobs. Float higher than 0.0. Default: 200.0.
min_repeatability (int) – Min. repeatability. The minimum number of times a blob needs to be detected in a sequence of images to be considered valid. Integer higher than 1. Default: 2.
min_dist_between_blobs (float) – Min. distance between blobs. The minimum distance between two blobs. If blobs are found closer together than this distance, the smaller blob is removed. Float higher than 0.0, non zero. Default: 10.0.
filter_by_color (bool) – If true, the image is filtered by color instead of intensity. Default: True.
blob_color (int) – The color of the blobs to detect (0 for dark blobs, 255 for light blobs). Default: 0.
filter_by_area (bool) – If true, the image is filtered by blob area. Default: True.
min_area (float) – Min. area. The minimum blob area. Float higher than 0.0. Default: 25.0.
max_area (float) – Max. area. The maximum blob area. Float higher than 0.0. Default: 500.0.
filter_by_circularity (bool) – If true, the image is filtered by blob circularity. Default: False.
min_circularity (float) – Min. circularity. The minimum circularity of the blobs. Float between 0.0 and 1.0. Default: 0.8.
max_circularity (float) – Max. circularity. The maximum circularity of the blobs. Float between 0.0 and 1.0. Default: 1.0.
filter_by_inertia (bool) – If true, the image is filtered by blob inertia. Default: False.
min_inertia_ratio (float) – Min. inertia ratio. The minimum inertia ratio of the blobs. Float between 0.0 and 1.0. Default: 0.6.
max_inertia_ratio (float) – Max. inertia ratio. The maximum inertia ratio of the blobs. Float between 0.0 and 1.0. Default: 1.0.
filter_by_convexity (bool) – If true, the image is filtered by blob convexity. Default: False.
min_convexity (float) – Min. convexity. The minimum convexity of the blobs. Float between 0.0 and 1.0. Default: 0.8.
max_convexity (float) – Max. convexity. The maximum convexity of the blobs. Float between 0.0 and 1.0. Default: 1.0.
- Returns:
New instance of
BlobOpenCVParam
.
- class cdl.param.ContourShapeParam[source]
Contour shape parameters
- threshold
Relative threshold. Detection threshold, relative to difference between data maximum and minimum. Float between 0.1 and 0.9. Default: 0.5.
- shape
Single choice from: ‘ellipse’, ‘circle’, ‘polygon’. Default: ‘ellipse’.
- classmethod create(threshold: float, shape: str) cdl.computation.image.detection.ContourShapeParam
Returns a new instance of
ContourShapeParam
with the fields set to the given values.- Parameters:
- Returns:
New instance of
ContourShapeParam
.
- class cdl.param.Peak2DDetectionParam[source]
Peak detection parameters
- threshold
Relative threshold. Detection threshold, relative to difference between data maximum and minimum. Float between 0.1 and 0.9. Default: 0.5.
- size
Neighborhoods size. Size of the sliding window used in maximum/minimum filtering algorithm. Integer higher than 1, unit: pixels. Default: 10.
- create_rois
Default: True.
- classmethod create(threshold: float, size: int, create_rois: bool) cdl.computation.image.detection.Peak2DDetectionParam
Returns a new instance of
Peak2DDetectionParam
with the fields set to the given values.- Parameters:
threshold (float) – Relative threshold. Detection threshold, relative to difference between data maximum and minimum. Float between 0.1 and 0.9. Default: 0.5.
size (int) – Neighborhoods size. Size of the sliding window used in maximum/minimum filtering algorithm. Integer higher than 1, unit: pixels. Default: 10.
create_rois (bool) – Default: True.
- Returns:
New instance of
Peak2DDetectionParam
.