Ejemplo n.º 1
0
if found:
    port = int(value)

# initialize client
cli = MSSclient()
cli.connectTosimulator(ipAddress, port, sock)

# create the camera
# cam = MSScam("demo3_test", 640, 480, 10, 15.0, -3.0, 5.0, 20.0, 10.0, 0.0) # EPS LITE
cam = MSScam("demo3_test", 640, 480, 10, -108.5, 20.0, -31.5, 15.0, 45.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

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

# set PNG images (lossless codec) and preview camera for 10 secs
cam.setTXRXformat(CAM_PNG)  # 0 = jpg, 1 = png,
cam.preview(10)  # time in seconds

# set JPEG quality to low and preview camera for 10 secs
cam.setTXRXformat(CAM_JPEG)  # 0 = jpg, 1 = png,
cam.setJPEGquality(25)
cam.preview(10)  # time in seconds

# set JPEG quality to low and preview camera for 10 secs
Ejemplo n.º 2
0
# initialize client
cli = MSSclient()
cli.connectTosimulator(ipAddress, port, sock)

# create the camera
#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
Ejemplo n.º 3
0
print(" (6) previews the camera content\n\n")

# initialize client
cli = MSSclient()
cli.connectTosimulator(ipAddress, port, sock)

# create the camera	+str(randint(0,100))

cam = MSScam(
    "demo5_test_2", 640, 480,
    10)  # initialization for a specific parameters (position, rotation, TX/RX)

# start GUI control of the camera
cam.GUIinsert(cli.sock)

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

# display the coordinates
# cam.print_details()

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

# unregistering camera
cam.removeFromSimulator()

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