What's Changed
Interactive masking editor and more:
https://github.com/cardiacvision/optimap/assets/423552/2f574b82-bb77-4fa4-b50a-f42f96ab22d3
Breaking changes:
* `om.video.resize`: parameters are now `shape` or `scale`, instead of `newx`, `newy`
* All `save` and `export` functions now expect the filename first, e.g. `save(filename, value, ...)` instead of `save(value, filename, ...)`. The deprecated `save(value, filename, ...)` order will raise a warning but still work.
* `om.load_video`: Raises `FileNotFoundError` instead of `ValueError` if file not found
* MacOS 12+ is now required
New functionality & other changes
Python 3.12 is now supported.
**`optimap.image`**:
* Added `interactive_mask()`: Create a mask interactively by drawing on an image.
* Added `load_mask()` function
* `show_mask()`: only show True values in overlay. If no image passed show a black border around mask. Added `alpha`, `color`, `cmap` parameters
* Fixed `load_mask()`
* Added `collage()` function to arrange list of images in a grid
* Added `resize()`, `rotate_left()`, `rotate_right()`, `flip_left_right()`, `flip_up_down()`, `crop()`, `pad()` functions analogous to the `om.video` equivalents
* Fixed `smooth_gaussian()` for RGB(A) images
**`optimap.video`**:
* Added `om.video.export_video_collage()` to arrange a list of videos in a grid and save to a media file
* `om.video.load_image_folder()` function is now public API in addition to the `load_video()` wrapper
* `om.video.InteractivePlayer` class is now public API
* `om.video.MultiRecorderImporter`: added `get_frametimes()` function to load the frametimings (if supported by MultiRecorder camera plugin)
* `export_video()`, `export_video_with_overlay()`: add `progress_bar` parameter
* `resize`: add `interpolation` parameter for the different OpenCV interpolation methods
**`optimap.trace`**:
* `show_positions()`: add size, cmap, vmin, vmax and kwargs parameters
* Fixed `random_positions()`
* Add `collage_positions()` as equivalent to `image.collage()` or `video.export_video_collage()`
**Full Changelog**: https://github.com/cardiacvision/optimap/compare/v0.1.4...v0.2.0