(msg, flags=1)
| 12 | |
| 13 | |
| 14 | def decompress(msg, flags=1): |
| 15 | data = numpy.fromstring(msg.data, dtype=numpy.uint8) |
| 16 | if msg.format.count('compressedDepth'): |
| 17 | # skip depth format(enum) and params(float x 2) |
| 18 | data = data[12:] |
| 19 | img = cv2.imdecode(data, flags) |
| 20 | return img |
| 21 | |
| 22 | |
| 23 | def lookupTransform(tf_listener, source, target, timeout, now): |