textDetection method

Future<List<EntityAnnotation>> textDetection(
  1. JsonImage jsonImage, {
  2. int maxResults = 10,
})

Detects and extracts text from any image. For example, a photograph might contain a street sign or traffic sign. The JSON includes the entire extracted string, as well as individual words, and their bounding boxes.

Implementation

Future<List<EntityAnnotation>> textDetection(
  JsonImage jsonImage, {
  int maxResults = 10,
}) async {
  final annotatedResponses = await detection(
    jsonImage,
    AnnotationType.textDetection,
    maxResults: maxResults,
  );

  return annotatedResponses.textAnnotations;
}