detections method
Get a list of Detections from the provided ViamImage.
// Example:
var latestImage = await myWebcam.image();
var detections = await myVisionService.detections(latestImage);
Implementation
Future<List<Detection>> detections(ViamImage image, {Map<String, dynamic>? extra}) async {
final request = GetDetectionsRequest(
name: name,
image: image.raw,
width: Int64(image.image?.width ?? 0),
height: Int64(image.image?.height ?? 0),
mimeType: image.mimeType.name,
extra: extra?.toStruct());
final response = await client.getDetections(request);
return response.detections;
}