moved quick start to front

This commit is contained in:
Josh Miklos
2018-03-14 16:35:18 -07:00
committed by GitHub
commit 7ebace2e64
20 changed files with 397 additions and 0 deletions
View File
+20
View File
@@ -0,0 +1,20 @@
from cv_pubsubs import webcam_pub as w
import unittest as ut
class TestFrameHandler(ut.TestCase):
i = 0
def test_handler(self):
def test_frame_handler(frame, cam_id):
if self.i == 200:
w.CamCtrl.stop_cam(cam_id)
if self.i % 100 == 0:
print(frame.shape)
self.i += 1
w.frame_handler_thread(0, test_frame_handler,
request_size=(1280, 720),
high_speed=True,
fps_limit=240)
+22
View File
@@ -0,0 +1,22 @@
import unittest as ut
from cv_pubsubs import window_sub as win
from cv_pubsubs import webcam_pub as cam
class TestSubWin(ut.TestCase):
def test_sub(self):
def cam_handler(frame, cam_id):
win.frame_dict[str(cam_id) + "Frame"] = (frame, frame)
t = cam.frame_handler_thread(0, cam_handler,
request_size=(1280, 720),
high_speed=True,
fps_limit=240
)
win.sub_win_loop(names=['cammy', 'cammy2'],
input_vid_global_names=[str(0) + "Frame"])
cam.CamCtrl.stop_cam(0)
t.join()