Beispiel #1
0
#cam = MSScam("demo2_test", 640, 480, 10, posX, posY, posZ, rotX, rotY, rotZ)

cam = MSScam("demo2_test1", 640, 480, 10, 69.7, 10.8, -80.1, 5, 8.5, 0.0)
#cam = MSScam("demo2_test2", 640, 480, 10, 63, 10, -80, 0.0, 0.0, 0.0)

# add the camera to the simulator
cam.addTosimulator(cli.sock, ipAddress, port)

# preview the camera for 10 secs
cam.preview(10)  # time in seconds

# wait 1 sec before closing this demo
time.sleep(1)  # time in seconds

# unregistering camera
cam.removeFromSimulator()

# save camera details
cam.saveTofile("./resources/camera1new.txt")

# load camera from file and preview
cam1 = MSScam("./resources/camera1new.txt")
cam1.addTosimulator(cli.sock, ipAddress, port)
cam1.preview(10)  # time in microseconds

# wait 1 sec before closing this demo
time.sleep(1)  # time in seconds

cam1.removeFromSimulator()

# disconnect from the simulator
Beispiel #2
0
    if isinstance(frame6, np.ndarray):
        width, height = frame6.shape[:2]
        if width > 0 and height > 0:
            vecImgs.append(frame6)

    ## generate video wall image
    #videowall = makeCanvas(vecImgs, 480, 2)
    videowall = dibujarCanvas.makeCanvas(vecImgs, 480, 2)

    ## show image
    if videowall.shape[0] > 0 and videowall.shape[1] > 0:
        cv2.imshow("Video Wall", videowall)  ## display frame

## close window & exit preview loop if ESC pressed
    if cv2.waitKey(5) == KEYESCAPE:
        break

## wait 1 sec before closing this demo
time.sleep(1)  ## time in seconds

## unregistering cameras
cam1.removeFromSimulator()
cam2.removeFromSimulator()
cam3.removeFromSimulator()
cam4.removeFromSimulator()
cam5.removeFromSimulator()
cam6.removeFromSimulator()

## disconnect from the simulator
cli.disconnectFromSimulator(cli.sock)