Added high speed mode to cv pubsubs. Added files for pip. Fixed code to match PEP8.
This commit is contained in:
@ -1,17 +1,23 @@
|
||||
import unittest as ut
|
||||
import cv_pubsubs.cv_webcam_pub as w
|
||||
from cv_pubsubs.sub_win import frameDict, sub_win_loop
|
||||
from cv_pubsubs.cv_window_sub import frame_dict, sub_win_loop
|
||||
|
||||
|
||||
class TestSubWin(ut.TestCase):
|
||||
|
||||
def test_sub(self):
|
||||
def camHandler(frame, camId):
|
||||
frameDict[str(camId) + "Frame"] = (frame,frame)
|
||||
def cam_handler(frame, cam_id):
|
||||
frame_dict[str(cam_id) + "Frame"] = (frame, frame)
|
||||
|
||||
t = w.frame_handler_thread(0, camHandler)
|
||||
t = w.frame_handler_thread(0, cam_handler,
|
||||
request_size=(1280, 720),
|
||||
high_speed=True,
|
||||
fps_limit=240
|
||||
)
|
||||
|
||||
sub_win_loop(names=['cammy', 'cammy2'], input_vid_global_names=[str(0)+"Frame"])
|
||||
sub_win_loop(names=['cammy', 'cammy2'],
|
||||
input_vid_global_names=[str(0) + "Frame"])
|
||||
|
||||
w.cam_ctrl.stop_cam(0)
|
||||
w.CamCtrl.stop_cam(0)
|
||||
|
||||
t.join()
|
||||
|
Reference in New Issue
Block a user