detectLabels method

TransformationData detectLabels(
  1. int? maximumLabels,
  2. int? minimumConfidence
)

Method for Detect objects and text in images

  • maximumLabels : Maximum Labels (Default: 5)

  • minimumConfidence : Minimum Confidence (Default: 55)

Returns TransformationData.

Implementation

TransformationData detectLabels(
  int? maximumLabels,
  int? minimumConfidence,
) {
  // Determine if there are values to add to the dictionary

  var values = <String, String>{};

  if (maximumLabels != null) {
    values['l'] = maximumLabels.toString();
  }

  if (minimumConfidence != null) {
    values['c'] = minimumConfidence.toString();
  }

  return TransformationData(
      plugin: 'awsRek', name: 'detectLabels', values: values);
}