pychubby.visualization module¶
Collection of tools for visualization.
-
pychubby.visualization.
create_animation
(df, img, include_backwards=True, fps=24, n_seconds=2, figsize=(8, 8), repeat=True)¶ Create animation from a displacement field.
Parameters: - df (DisplacementField) – Instance of the
DisplacementField
representing the coordinate transformation. - img (np.ndarray) – Image.
- include_backwards (bool) – If True, then animation also played backwards after its played forwards.
- fps (int) – Frames per second.
- n_seconds (int) – Number of seconds to play the animation forwards.
- figsize (tuple) – Size of the figure.
- repeat (bool) – If True, then animation always replayed at the end.
Returns: ani – Animation showing the transformation.
Return type: matplotlib.animation.ArtistAnimation
Notes
To enable animation viewing in a jupyter notebook write:
` from matplotlib import rc rc('animation', html='html5') `
- df (DisplacementField) – Instance of the