(name, flow)
| 154 | |
| 155 | # save flow, I reference the code in scripts/run-flownet.py in flownet2-caffe project |
| 156 | def writeFlow(name, flow): |
| 157 | f = open(name, 'wb') |
| 158 | f.write('PIEH'.encode('utf-8')) |
| 159 | np.array([flow.shape[1], flow.shape[0]], dtype=np.int32).tofile(f) |
| 160 | flow = flow.astype(np.float32) |
| 161 | flow.tofile(f) |
| 162 | f.flush() |
| 163 | f.close() |
| 164 | |
| 165 | |
| 166 | def writeFlowImage(save_dir, data): |
nothing calls this directly
no outgoing calls
no test coverage detected