Skip to content

create_dl_transform_random_hsvCreateDlTransformRandomHsvCreateDlTransformRandomHsvcreate_dl_transform_random_hsvT_create_dl_transform_random_hsv🔗

Short description🔗

create_dl_transform_random_hsvCreateDlTransformRandomHsvCreateDlTransformRandomHsvcreate_dl_transform_random_hsvT_create_dl_transform_random_hsv — Create a random HSV transform.

Signature🔗

create_dl_transform_random_hsv( string TransformName, real Probability, real RangeH, real RangeS, real RangeV, attribute.name GenParamName, attribute.value GenParamValue, out dl_transform RandomHSV )void CreateDlTransformRandomHsv( const HTuple& TransformName, const HTuple& Probability, const HTuple& RangeH, const HTuple& RangeS, const HTuple& RangeV, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* RandomHSV )static void HOperatorSet.CreateDlTransformRandomHsv( HTuple transformName, HTuple probability, HTuple rangeH, HTuple rangeS, HTuple rangeV, HTuple genParamName, HTuple genParamValue, out HTuple randomHSV )def create_dl_transform_random_hsv( transform_name: str, probability: float, range_h: Sequence[float], range_s: Sequence[float], range_v: Sequence[float], gen_param_name: Sequence[str], gen_param_value: Sequence[Union[str, float, int]] ) -> HHandle

Herror T_create_dl_transform_random_hsv( const Htuple TransformName, const Htuple Probability, const Htuple RangeH, const Htuple RangeS, const Htuple RangeV, const Htuple GenParamName, const Htuple GenParamValue, Htuple* RandomHSV )

void HDlTransform::HDlTransform( const HString& TransformName, double Probability, const HTuple& RangeH, const HTuple& RangeS, const HTuple& RangeV, const HTuple& GenParamName, const HTuple& GenParamValue )

void HDlTransform::HDlTransform( const char* TransformName, double Probability, const HTuple& RangeH, const HTuple& RangeS, const HTuple& RangeV, const HTuple& GenParamName, const HTuple& GenParamValue )

void HDlTransform::HDlTransform( const wchar_t* TransformName, double Probability, const HTuple& RangeH, const HTuple& RangeS, const HTuple& RangeV, const HTuple& GenParamName, const HTuple& GenParamValue ) (Windows only)

public HDlTransform( string transformName, double probability, HTuple rangeH, HTuple rangeS, HTuple rangeV, HTuple genParamName, HTuple genParamValue )

void HDlTransform::CreateDlTransformRandomHsv( const HString& TransformName, double Probability, const HTuple& RangeH, const HTuple& RangeS, const HTuple& RangeV, const HTuple& GenParamName, const HTuple& GenParamValue )

void HDlTransform::CreateDlTransformRandomHsv( const char* TransformName, double Probability, const HTuple& RangeH, const HTuple& RangeS, const HTuple& RangeV, const HTuple& GenParamName, const HTuple& GenParamValue )

void HDlTransform::CreateDlTransformRandomHsv( const wchar_t* TransformName, double Probability, const HTuple& RangeH, const HTuple& RangeS, const HTuple& RangeV, const HTuple& GenParamName, const HTuple& GenParamValue ) (Windows only)

void HDlTransform.CreateDlTransformRandomHsv( string transformName, double probability, HTuple rangeH, HTuple rangeS, HTuple rangeV, HTuple genParamName, HTuple genParamValue )

Description🔗

The operator create_dl_transform_random_hsvCreateDlTransformRandomHsv creates a random HSV transform and returns the transform handle in RandomHSVrandomHSVrandom_hsv. The transform performs a random shift of the hue, saturation, and value channels of the input image.

The parameter TransformNametransformNametransform_name specifies a unique, non-empty name for the transform. Note that when creating a transform pipeline using create_dl_transform_pipelineCreateDlTransformPipeline, each transform within the pipeline must have a unique name.

The parameter Probabilityprobabilityprobability specifies the probability with which the transform is executed in the pipeline. The probability must be between 0.00.0 and 1.01.0. A value of 0.00.0 disables execution, while a value of 1.01.0 guarantees that the operation is executed.

The parameters RangeHrangeHrange_h, RangeSrangeSrange_s and RangeVrangeVrange_v define the ranges for the random shift on the hue, saturation and value channels of the input image. The ranges are tuples of the form [range_min, range_max][range_min, range_max], where 'range_min'"range_min" and 'range_max'"range_max" must be between -1.0-1.0 and 1.01.0.

No generic parameters GenParamNamegenParamNamegen_param_name and GenParamValuegenParamValuegen_param_value are supported for this transform. Only the value [][] can be set.

The following parameters are specific to the transforms of type 'random_hsv'"random_hsv". They can respectively be get or set using the operators get_dl_transform_pipeline_paramGetDlTransformPipelineParam and set_dl_transform_pipeline_paramSetDlTransformPipelineParam:

ParamName set get
'range_h'"range_h" x x
'range_s'"range_s" x x
'range_v'"range_v" x x

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on internal data level.

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters🔗

TransformNametransformNametransform_name (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the output transform.

Default: 'random_hsv'"random_hsv"

Probabilityprobabilityprobability (input_control) real → (real)HTuple (double)HTuple (double)floatHtuple (double)

Probability to execute the transform

Default: 1.01.0

RangeHrangeHrange_h (input_control) real-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Tuple with random shift range for the hue channel

Default: [-0.5, 0.5][-0.5, 0.5]

RangeSrangeSrange_s (input_control) real-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Tuple with random shift range for the saturation channel

Default: [-0.5, 0.5][-0.5, 0.5]

RangeVrangeVrange_v (input_control) real-array → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Tuple with random shift range for the value channel

Default: [-0.5, 0.5][-0.5, 0.5]

GenParamNamegenParamNamegen_param_name (input_control) attribute.name-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Generic input parameter names.

Default: [][]
List of values: [][]

GenParamValuegenParamValuegen_param_value (input_control) attribute.value-array → (string / real / integer)HTuple (HString / double / Hlong)HTuple (string / double / int / long)Sequence[Union[str, float, int]]Htuple (char* / double / Hlong)

Generic input parameter values.

Default: [][]
Suggested values: [][]

RandomHSVrandomHSVrandom_hsv (output_control) dl_transform → (handle)HTuple (HHandle)HDlTransform, HTuple (IntPtr)HHandleHtuple (handle)

Random HSV transform

Combinations with other operators🔗

Combinations

Possible successors

create_dl_transform_pipelineCreateDlTransformPipeline

See also

create_dl_transform_blurCreateDlTransformBlur, create_dl_transform_normalizeCreateDlTransformNormalize, create_dl_transform_random_cropCreateDlTransformRandomCrop, create_dl_transform_resizeCreateDlTransformResize

Module🔗

Foundation