File tree 1 file changed +6
-4
lines changed
videointelligence/samples/analyze
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 32
32
"""
33
33
34
34
import argparse
35
+
36
+ # [START video_detect_text]
35
37
import io
36
38
37
39
from google .cloud import videointelligence
40
+ # [END video_detect_text]
38
41
39
42
40
43
def analyze_explicit_content (path ):
@@ -357,11 +360,10 @@ def video_detect_text_gcs(input_uri):
357
360
# [END video_detect_text_gcs]
358
361
359
362
363
+ # [START video_detect_text]
360
364
def video_detect_text (path ):
361
- # [START video_detect_text]
362
- """Detect text in a local video."""
363
- from google .cloud import videointelligence
364
365
366
+ """Detect text in a local video."""
365
367
video_client = videointelligence .VideoIntelligenceServiceClient ()
366
368
features = [videointelligence .Feature .TEXT_DETECTION ]
367
369
video_context = videointelligence .VideoContext ()
@@ -410,7 +412,7 @@ def video_detect_text(path):
410
412
print ("Rotated Bounding Box Vertices:" )
411
413
for vertex in frame .rotated_bounding_box .vertices :
412
414
print ("\t Vertex.x: {}, Vertex.y: {}" .format (vertex .x , vertex .y ))
413
- # [END video_detect_text]
415
+ # [END video_detect_text]
414
416
415
417
416
418
def track_objects_gcs (gcs_uri ):
You can’t perform that action at this time.
0 commit comments