Skip to content

Commit 3ae5f46

Browse files
gguussJon Wayne Parrott
authored and
Jon Wayne Parrott
committed
Updates GCS snippet to match local file (#836)
1 parent e723255 commit 3ae5f46

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

vision/cloud-client/detect.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,20 @@ def detect_fulltext_uri(uri):
415415
image = vision_client.image(source_uri=uri)
416416

417417
fulltext = image.detect_full_text()
418+
419+
for b, page in enumerate(fulltext.pages):
420+
print(page.width)
421+
for bb, block in enumerate(page.blocks):
422+
print('Block: {}'.format(block.bounding_box))
423+
print('Type: {}'.format(dir(block)))
424+
print('Type: {}'.format(block.block_type))
425+
for p, paragraph in enumerate(block.paragraphs):
426+
print('\tParagraph: ({})'.format(paragraph.bounding_box))
427+
print('\twords: ({})'.format((paragraph.words)))
428+
for w, word in enumerate(paragraph.words):
429+
for s, symbol in enumerate(word.symbols):
430+
print('\t\t\t$:{}'.format(symbol.text))
431+
418432
print(fulltext.text)
419433

420434

0 commit comments

Comments
 (0)