detection method
Future<AnnotateImageResponse>
detection(
- JsonImage jsonImage,
- AnnotationType annotationType, {
- int maxResults = 10,
inherited
Higher level method for a single detection type as specified by annotationType
,
Implementation
Future<AnnotateImageResponse> detection(
JsonImage jsonImage,
AnnotationType annotationType, {
int maxResults = 10,
}) async {
final annotatedResponses = await annotate(
requests: AnnotationRequests(
requests: [
AnnotationRequest(jsonImage: jsonImage, features: [
Feature(maxResults: maxResults, type: annotationType),
])
],
),
);
return annotatedResponses.responses.first;
}