classifications method

Future<List<Classification>> classifications(
  1. ViamImage image,
  2. int count, {
  3. Map<String, dynamic>? extra,
})

Get a list of Classifications from the provided image. The maximum number of Classifications returned is count.

// Example:
var latestImage = await myWebcam.image();
var classifications = await myVisionService.classifications(latestImage, 2);

Implementation

Future<List<Classification>> classifications(ViamImage image, int count, {Map<String, dynamic>? extra}) async {
  final request = GetClassificationsRequest(
      name: name,
      image: image.raw,
      width: image.image?.width,
      height: image.image?.height,
      mimeType: image.mimeType.name,
      n: count,
      extra: extra?.toStruct());
  final response = await client.getClassifications(request);
  return response.classifications;
}