numpyimage 3.5.0__tar.gz → 3.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {numpyimage-3.5.0/numpyimage.egg-info → numpyimage-3.5.2}/PKG-INFO +1 -1
- {numpyimage-3.5.0 → numpyimage-3.5.2}/npimage/imageio.py +1 -1
- {numpyimage-3.5.0 → numpyimage-3.5.2}/npimage/vidio.py +6 -3
- {numpyimage-3.5.0 → numpyimage-3.5.2/numpyimage.egg-info}/PKG-INFO +1 -1
- {numpyimage-3.5.0 → numpyimage-3.5.2}/pyproject.toml +1 -1
- {numpyimage-3.5.0 → numpyimage-3.5.2}/LICENSE +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/README.md +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/npimage/__init__.py +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/npimage/align.py +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/npimage/graphics.py +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/npimage/nrrd_utils.py +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/npimage/operations.py +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/npimage/utils.py +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/numpyimage.egg-info/SOURCES.txt +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/numpyimage.egg-info/dependency_links.txt +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/numpyimage.egg-info/requires.txt +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/numpyimage.egg-info/top_level.txt +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/setup.cfg +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/tests/test_heic.py +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/tests/test_pbm.py +0 -0
- {numpyimage-3.5.0 → numpyimage-3.5.2}/tests/test_video_writers.py +0 -0
|
@@ -394,7 +394,7 @@ def show(data,
|
|
|
394
394
|
data = load(data)
|
|
395
395
|
|
|
396
396
|
if data_type == 'segmentation':
|
|
397
|
-
data =
|
|
397
|
+
data = operations.assign_random_colors(data, seed=kwargs.get('seed', None))
|
|
398
398
|
|
|
399
399
|
if (not data.ndim == 2) and not (data.ndim == 3 and utils.find_channel_axis(data) is not None):
|
|
400
400
|
m = ('Data must have shape (y, x) for grayscale, '
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
Functions for reading and writing
|
|
3
|
+
Functions for reading and writing video files.
|
|
4
4
|
|
|
5
5
|
Function list:
|
|
6
6
|
- load_video(filename) -> np.ndarray
|
|
7
7
|
- lazy_load_video(filename) -> Iterator[np.ndarray]
|
|
8
|
-
- save_video(data, filename) ->
|
|
9
|
-
numpy array of pixel values as a video file.
|
|
8
|
+
- save_video(data, filename) -> None
|
|
9
|
+
Saves a numpy array of pixel values as a video file.
|
|
10
10
|
Arguments for setting framerate, video bitrate, etc are provided.
|
|
11
11
|
|
|
12
12
|
Class list:
|
|
@@ -137,10 +137,13 @@ def lazy_load_video(filename) -> Iterator[np.ndarray]:
|
|
|
137
137
|
Video frame as a numpy array, shape (height, width, colors).
|
|
138
138
|
"""
|
|
139
139
|
av = _import_av()
|
|
140
|
+
rotation = _get_rotation_from_metadata(filename)
|
|
140
141
|
with av.open(Path(filename).expanduser()) as container:
|
|
141
142
|
stream = container.streams.video[0]
|
|
142
143
|
for frame in container.decode(stream):
|
|
143
144
|
img = frame.to_ndarray(format='rgb24')
|
|
145
|
+
if rotation not in [None, '0', 0]:
|
|
146
|
+
img = np.rot90(img, k=-int(rotation) // 90)
|
|
144
147
|
yield img
|
|
145
148
|
|
|
146
149
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|