示例#1
0
    VizUtils.quickDisplayOrtho("MainWindow", points, StandardBody.standardColors)

def visualizeFrame(rgb):
    #First, resize to 512 x 424
    resized = cv2.resize(rgb, (424, 512))
    cv2.imshow("Frame", resized)
    cv2.waitKey(10)

sequenceRoot = sys.argv[1]
rootDirector = RootDirector(sequenceRoot)

for recordingName in rootDirector.getPeopleRecordingNames():
    recordingPath = os.path.join(rootDirector.getDirectoryPath(), recordingName)
    #Look inside the autoLabels path there
    autoLabelsPath = os.path.join(recordingPath, "autoLabels")
    recordingZeroCamPath = os.path.join(recordingPath, "0")
    frameManager = FrameManager(recordingZeroCamPath)
    subs = os.listdir(autoLabelsPath)
    subs.sort()
    for sub in subs:
        full = os.path.join(autoLabelsPath, sub)
        labelReader = AutoLabelReader(full)
        N = labelReader.getNumLabels()
        for i in range(N):
            points = labelReader.getLabel(i)
            timestamp = labelReader.getTimestamp(i)
            while (frameManager.getViewTime() < timestamp):
                frameManager.tryAdvance(1)
            visualizeFrame(frameManager.getFrame().getRGB())
            visualizePoints(points)