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 binaryDataId = '<YOUR-BINARY-DATA-ID>';
// Example bbox ID (label)
final bboxId = "label";
try {
await dataClient.removeBoundingBoxFromImageById(
bboxId,
binaryDataId,
);
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, String binaryDataId) async {
final request = RemoveBoundingBoxFromImageByIDRequest()
..bboxId = bboxId
..binaryDataId = binaryDataId;
await _dataClient.removeBoundingBoxFromImageByID(request);
}