removeBoundingBoxFromImageById method
Removes a bounding box from an image based on bbox ID and image ID.
_viam = await Viam.withApiKey(
dotenv.env['API_KEY_ID'] ?? '',
dotenv.env['API_KEY'] ?? ''
);
final dataClient = _viam.dataClient;
// Example binary ID to remove a bounding box from
final binaryId = BinaryID(fileId: '<YOUR-FILE-ID>', organizationId: '<YOUR-ORG-ID>', locationId: '<YOUR-LOCATION-ID>');
// Example bbox ID (label)
final bboxId = "label";
try {
await dataClient.removeBoundingBoxFromImageById(
bboxId,
binaryId,
);
print('Successfully removed bounding box');
} catch (e) {
print('Error removing bounding box: $e');
}
For more information, see Data Client API.
Implementation
Future<void> removeBoundingBoxFromImageById(String bboxId, BinaryID binaryId) async {
final request = RemoveBoundingBoxFromImageByIDRequest()
..bboxId = bboxId
..binaryId = binaryId;
await _dataClient.removeBoundingBoxFromImageByID(request);
}