You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
-
- import time
- import urllib.request
-
- import cv2
- import numpy as np
- from dora import Node
-
- req = urllib.request.urlopen("https://ultralytics.com/images/zidane.jpg")
-
- arr = np.asarray(bytearray(req.read()), dtype=np.uint8)
- node = Node()
-
- start = time.time()
-
- while time.time() - start < 20:
- # Wait next dora_input
- node.next()
- node.send_output("image", arr.tobytes())
-
- time.sleep(1)
|