moved quick start to front
This commit is contained in:
@@ -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)
|
||||
@@ -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()
|
||||
Reference in New Issue
Block a user