Vision Full Text#

Full Text Annotation#

Text annotations of an image.

class google.cloud.vision.text.TextAnnotation(pages, text)[source]#

Bases: object

Representation of a text annotation returned from the Vision API.

Parameters:
  • pages (list) – List of Page.
  • text (str) – String containing text detected from the image.
classmethod from_api_repr(annotation)[source]#

Factory: construct an instance of TextAnnotation from JSON.

Parameters:annotation (dict) – Dictionary response from Vision API.
Return type:TextAnnotation
Returns:Instance of TextAnnotation.
classmethod from_pb(annotation)[source]#

Factory: construct an instance of TextAnnotation from protobuf.

Parameters:annotation (TextAnnotation) – Populated instance of TextAnnotation.
Return type:TextAnnotation
Returns:Populated instance of TextAnnotation.
pages#

Pages found in text image.

Return type:list
Returns:List of Page.
text#

Text detected from an image.

Return type:str
Returns:String of text found in an image.