def main(): address = sys.argv[1] camData = o3d3xx.ImageClient(address, 50010) grabber = GrabO3D300(camData) for x in range(12): grabber.readNextFrame()
def main(): address = '169.254.145.24' camData = o3d3xx.ImageClient(address, 50010) grabber = GrabO3D300(camData) # grabber.readNextFrame() frameCount = 1 pointCloudStorage = [] timeStamps = [] for x in range(0, frameCount): (pc, timeStamp, amp) = grabber.readNextFrame() pointCloudStorage.append(pc) timeStamps.append(timeStamp) print(timeStamp) cv2.imwrite('funfunfun' + str(timeStamp) + '.png', amp) #fig = plt.figure() #ax1 = fig.add_subplot(1, 2, 1) #ax2 = fig.add_subplot(1, 2, 2) #imAmplitude = ax1.imshow(np.random.rand(imageHeight,imageWidth)) #imDistance = ax2.imshow(np.random.rand(imageHeight,imageWidth)) #ani = animation.FuncAnimation(fig, updatefig, blit=True, fargs = [grabber,imAmplitude,imDistance,x]) #plt.show() #plt.close() #This format of directory is necessary to communicate with MATLAB fileDirectory = '/home/vantage/Documents/githere/VANTAGE/Automation/TOF_Automation/examples/TOF_PointClouds/pointcloud_' for pc, timeStamp in zip(pointCloudStorage, timeStamps): pypcd.save_point_cloud(pc, fileDirectory + str(timeStamp) + ".pcd")
def main(): address = sys.argv[1] camData = o3d3xx.ImageClient(address, 50010) fig = plt.figure() grabber = GrabO3D300(camData) ax1 = fig.add_subplot(1, 2, 1) ax2 = fig.add_subplot(1, 2, 2) imAmplitude = ax1.imshow(np.random.rand(imageHeight, imageWidth)) imDistance = ax2.imshow(np.random.rand(imageHeight, imageWidth)) ani = animation.FuncAnimation(fig, updatefig, interval=50, blit=True, fargs=[grabber, imAmplitude, imDistance]) plt.show()
def main(): address = '169.254.145.24' camData = o3d3xx.ImageClient(address, 50010) grabber = GrabO3D300(camData) frameCount = 100 pointCloudStorage = [] timeStamps = [] for x in range(0, frameCount): (pc, timeStamp) = grabber.readNextFrame() pointCloudStorage.append(pc) timeStamps.append(timeStamp) print(timeStamp) #This format of directory is necessary to communicate with MATLAB fileDirectory = '/home/vantage/Documents/githere/VANTAGE/Data/TOF_Automated/pointcloud_' for pc, timeStamp in zip(pointCloudStorage, timeStamps): pypcd.save_point_cloud(pc, fileDirectory + str(timeStamp) + ".pcd")
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * import o3d3xx import sys import time if len(sys.argv) > 1: address = sys.argv[1] else: address = '192.168.0.69' pcic = o3d3xx.ImageClient(address, 50010) pcic.debug = True # repeatedly read frames from the process interface lasttimestamp = time.time() startTimestamp = lasttimestamp frameCounter = 0 while True: result = pcic.readNextFrame() if 'diagnostic' in result: print(result['diagnostic']) frameCounter = frameCounter + 1 # timing timestamp = time.time() timediff = timestamp - lasttimestamp print('Current frame time: %f (%f fps), bandwidth %f MBit/s' % (timediff, 1.0 / timediff, 8 * pcic.recvCounter / (1e6 * timediff)))
def __init__(self, ip): self.cam = o3d3xx.ImageClient(ip, 2000)