(visu)
| 734 | |
| 735 | |
| 736 | def stack_images_sequence(visu): |
| 737 | print("Stacking frames..") |
| 738 | allframes = visu |
| 739 | nframes, nspa, nats, h, w, pix = allframes.shape |
| 740 | frames = [] |
| 741 | for frame_idx in tqdm(range(nframes)): |
| 742 | columns = np.vstack(allframes[frame_idx].transpose(1, 2, 3, 4, |
| 743 | 0)).transpose( |
| 744 | 3, 1, 0, 2) |
| 745 | frame = np.concatenate(columns).transpose(1, 0, 2) |
| 746 | frames.append(frame) |
| 747 | return np.stack(frames) |
no outgoing calls
no test coverage detected