(name, flow)
| 238 | |
| 239 | |
| 240 | def writeFlow(name, flow): |
| 241 | f = open(name, "wb") |
| 242 | f.write("PIEH".encode("utf-8")) |
| 243 | np.array([flow.shape[1], flow.shape[0]], dtype=np.int32).tofile(f) |
| 244 | flow = flow.astype(np.float32) |
| 245 | flow.tofile(f) |
| 246 | |
| 247 | |
| 248 | def readFloat(name): |