Skip to content
Snippets Groups Projects

python ftl-file v3

Merged Sebastian Hahta requested to merge feature/python-ftlf into master
All threads resolved!
1 file
+ 6
5
Compare changes
  • Side-by-side
  • Inline
+ 6
5
@@ -195,13 +195,14 @@ class FTLStreamReader:
''' Update calibration. '''
if p.codec == ftl.codec_t.MSGPACK:
# TODO: What is in (unpacked) p.data[1:]? Contents discarded at the moment
self._calibration[sp.streamID] = ftl.Camera._make(msgpack.unpackb(p.data)[0])
# TODO: channel and capabilities should be saved as well
calib, channel, capabilities = msgpack.unpackb(p.data)
self._calibration[sp.streamID] = ftl.Camera._make(calib)
elif p.codec == ftl.codec_t.CALIBRATION:
calibration = struct.unpack("@ddddIIdddd", p.data[:(4*8+2*4+4*8)])
self._calibration[sp.streamID] = ftl.Camera._make(calibration)
else:
raise Exception("Unknown codec %i for calibration" % p.codec)
@@ -363,7 +364,7 @@ class FTLStreamReader:
raise ValueError("source id %i not found" % source)
def get_Q(self, source):
''' Disparity to depth matrix in OpenCV format '''
''' Disparity to depth matrix (OpenCV) '''
calib = self.get_calibration(source)
Q = np.identity(4, dtype=np.float64)
Loading