Open avishorp opened 6 years ago
Here are the python sample code for your reference:
import Voxel
import numpy as np
def createWindow():
global window
if window == None:
window = MainWindow(cameraSystem)
return
class MainWindow():
ascii_char = list("$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\|()1{}[]?-_+~<>i!lI;:,\"^`'. ")
# self.width = 80
# self.height = 60
def __init__(self, cameraSystem):
print("MainWindow init")
self.depthCamera = cameraSystem.connect(devices[0])
if self.depthCamera:
self.depthCamera.clearAllCallbacks()
self.depthCamera.registerCallback(Voxel.DepthCamera.FRAME_DEPTH_FRAME, self.callbackInternal)
self.depthCamera.registerCallback(Voxel.DepthCamera.FRAME_XYZI_POINT_CLOUD_FRAME, self.callbackInternal)
if not self.depthCamera.start():
print(" start fail")
else:
print(" start ok")
def callbackInternal(self, depthCamera, frame, type):
print("frame.id: %s" %frame.id)
print("frame.id: %s" %frame.timestamp)
cameraSystem = Voxel.CameraSystem()
devices = cameraSystem.scan()
# depthCamera = None
if len(devices) == 1:
print(" find one devices")
window = MainWindow(cameraSystem)
key = raw_input("Input enter key to quit ")
print(" quit now")
else:
print(" no device found")
del cameraSystem
DepthEye SDK can support Python binding
Can you show in your example how do I access the actual data (amplitude, phase and ambient) within the callback?
בתאריך יום ג׳, 16 באוק׳ 2018 ב-5:55 מאת pointcloud-ai < notifications@github.com>:
DepthEye SDK can support Python binding
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pointcloud-ai/DepthEyeSdk/issues/1#issuecomment-430083167, or mute the thread https://github.com/notifications/unsubscribe-auth/ABImMqH9-SL1SHEjhHYzzde7gDxeagCZks5ulUqTgaJpZM4XAsmo .
When I try to connect to the camera from Python (using the Python lib in third_party/voxelsdk_ubuntu_4.13/lib), I get the following output:
Apparently, it seem to have loaded the correct config file, but later it says that the register map is 'calculus'. Is it initializing my camera correctly?