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://pyimagesearch.com/wp-content/uploads/2015/01/opencv_logo.png"
- )
-
- arr = np.asarray(bytearray(req.read()), dtype=np.uint8)
- node = Node()
-
- start = time.time()
-
- while time.time() - start < 20:
- # Wait next input
- node.next()
- node.send_output("image", arr.tobytes())
|