#!/usr/bin/python import pyrealsense2 as rs import sys, getopt import asyncore import numpy as np import pickle import socket import struct import cv2 print('Number of arguments:', len(sys.argv), 'arguments.') print('Argument List:', str(sys.argv)) mc_ip_address = '224.0.0.1' local_ip_address = '192.168.0.1' port = 1024 chunk_size = 4096 def main(argv): multi_cast_message(mc_ip_address, port, 'EtherSensePing') #UDP client for each camera server class ImageClient(asyncore.dispatcher): def __init__(self, server, source): asyncore.dispatcher.__init__(self, server) self.address = server.getsockname()[0] self.port = source[1] self.buffer = bytearray() self.windowName = self.port # open cv window which is unique to the port cv2.namedWindow("window"+str(self.windowName)) self.remainingBytes = 0 self.frame_id = 0 def handle_read(self): if self.remainingBytes == 0: # get the expected frame size self.frame_length = struct.unpack('