Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nextml-code/kw6
Minimalistic library for reading files in the kw6 file format
https://github.com/nextml-code/kw6
Last synced: 1 day ago
JSON representation
Minimalistic library for reading files in the kw6 file format
- Host: GitHub
- URL: https://github.com/nextml-code/kw6
- Owner: nextml-code
- License: apache-2.0
- Created: 2020-09-18T16:29:02.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-21T14:50:26.000Z (5 months ago)
- Last Synced: 2024-08-21T16:47:00.322Z (5 months ago)
- Language: Python
- Homepage:
- Size: 7.63 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
==========
kw6 reader
==========.. image:: https://badge.fury.io/py/kw6.svg
:target: https://badge.fury.io/py/kw6Minimalistic library for reading files in the kw6 file format. See the
`documentation `_
for more information on the API.Install
=======.. code-block::
pip install kw6
Usage
=====Iterating over all positions and cameras in a kw6 file:
.. code-block:: python
from pathlib import Path
import kw6path = Path("...")
for position in kw6.Reader.from_path(path):
for camera in position.cameras:
camera.image.save(
f"{position.header.frame_index}_{camera.header.camera_index}.png"
)Accessing specific positions by frame index:
.. code-block:: python
from pathlib import Path
import kw6reader = kw6.Reader.from_path(Path("..."))
# Access a single position
position = reader[10]
# Access a range of positions
positions = reader[10:20]
# Access specific positions
positions = reader[[5, 7, 9]]Additional Features
===================- Supports reading from file-like objects and file paths
- Efficient indexing and slicing of positions
- Automatic handling of file versions and headers
- Built-in error handling for corrupt or incomplete filesFor more detailed information on the API and advanced usage, please refer to the
`full documentation `_.