Metadata-Version: 2.1
Name: skellycam
Version: 2022.12.1016
Summary: Top-level package for skellycam.
Keywords: camera,stream,video,image,opencv,skelly,freemocap,motion capture,synchronization,computer vision
Author: Endurance Idehen, Jonathan Samir Matthis
Author-email: Skelly FreeMoCap <info@freemocap.org>
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Other Audience
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Multimedia :: Video :: Capture
Classifier: Topic :: Multimedia :: Video :: Display
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Scientific/Engineering :: Human Machine Interfaces
Classifier: Topic :: System :: Hardware
Classifier: Topic :: System :: Hardware :: Universal Serial Bus (USB)
Classifier: Topic :: System :: Hardware :: Universal Serial Bus (USB) :: Video (UVC)
Requires-Dist: numpy==1.23.3
Requires-Dist: opencv-contrib-python==4.6.0.66
Requires-Dist: pydantic==1.10.2
Requires-Dist: Pillow==9.2.0
Requires-Dist: psutil==5.9.2
Requires-Dist: setproctitle==1.3.2
Requires-Dist: pyqt6==6.4.0
Requires-Dist: matplotlib==3.6.1
Requires-Dist: scipy==1.9.2
Requires-Dist: rich==12.6.0
Requires-Dist: pandas==1.5.2
Requires-Dist: pyqtgraph==0.13.1
Requires-Dist: qtpy==2.3.0
Requires-Dist: black ; extra == "dev"
Requires-Dist: bumpver ; extra == "dev"
Requires-Dist: isort ; extra == "dev"
Requires-Dist: pip-tools ; extra == "dev"
Requires-Dist: pytest ; extra == "dev"
Project-URL: Homepage, https://github.com/freemocap/skellycam
Provides-Extra: dev


<p align="center">
    <img src="https://github.com/freemocap/skellycam/blob/main/skellycam/assets/logo/skelly-cam-logo.svg" height="128" alt="Project Logo">
</p>
<h3 align="center">SkellyCam</h3>
<p align="center"> An easy and efficient way to connect to one or more cameras and record synchronized videos 💀📸</p>
<p align="center">
    <a href="https://github.com/freemocap/fast-camera-capture/releases/latest">
        <img src="https://img.shields.io/github/release/freemocap/fast-camera-capture.svg" alt="Latest Release">
    </a>
    <a href="https://github.com/freemocap/fast-camera-capture/blob/main/LICENSE">
        <img src="https://img.shields.io/badge/license-AGPLv3+-blue.svg" alt="AGPLv3+">
    </a>
    <a href="https://github.com/freemocap/fast-camera-capture/issues">
        <img src="https://img.shields.io/badge/contributions-almost-ff69b4.svg" alt="Contributions Welcome">
    </a>
  <a href="https://github.com/psf/black">
    <img alt="https://img.shields.io/badge/code%20style-black-000000.svg" src="https://img.shields.io/badge/code%20style-black-000000.svg">
  </a>
</p>


---
## Motivation

Connecting to cameras on multiple platforms in a way that is not slow is a difficult challenge, especially for new developers.

There are a bunch of tools out there (e.g. OpenCV) and other open source libraries that give just enough to support hardware manipulation,
but they need to be use in concert in order to be useful.

This library attempts to string those things together, and provide an interface for everyone to use in python with a simple `pip install`.

The primary focus is to provide an easy method to connect to one or more cameras and provide methods for streaming/recordig synchronized frames from the connected cameras.



> **NOTE** - The SkellyCam package is the primary camera backend for the `freemocap` markeless motion capture software 💀✨
> 
> [https:github.com/freemocap/freemocap](https:github.com/freemocap/freemocap)
> 
>[https://freemocap.org](https://freemocap.org)

---
## Installation and Usage

### 0. Open a terminal (ideally with a `python` virtual environment activate) 

### 1. Install from Pip
Enter the command below and press 'Enter'
```bash
pip install skellycam
```

### 2. Launch SkellyCam GUI
Enter the command below and press 'Enter'
```bash
skellycam
```


### 3. Success! 💀📸✨
Hopefully a bunch of text scrolled by and a GUI popped up! 

If not, please [open an issue on the github repo](https://github.com/freemocap/skellycam/issues) and we'll try to help you out :) 


## Limitation (aka TO DO)  -
- Currently uses `opencv` to connect to cameras, so it won't recognize hardware that can't be connected with `cv2.VideoCapture` - Support for other camera hardware (e.g. FLIR) coming soon
- Camera streams are not synchronized at run time, but are saved and synchronized after the fact. This is time-consuming process that requres frames be saved in RAM until the recording is done. Both of these weaknesses have solutions in the works.

### New Python developers

1) Install Python 3.10
2) Create  Virtual Environment
3) Install `skellycam`

#### To install Python 3.10

[Windows Python3 Installation Guide](https://realpython.com/installing-python/#how-to-install-from-the-full-installer)

[MacOSX Python3 Installation Guide](https://realpython.com/installing-python/#step-1-download-the-official-installer)

[Linux Python3 Installation Guide](https://computingforgeeks.com/how-to-install-python-on-ubuntu-linux-system/)

### How to use

#### RECOMMENDED -  Use the GUI!

Launch the GUI by running `skellycam` in a terminal. 

This is currently the most tested method for interacting with the cameras.


#### Example 1 - Connecting to a single Camera and showing the video feed

[Example 1 Python Fle](skellycam/examples/example1_single_camera_connection.py)

In this example, we connect a camera at index 0. Calling `show` allows us to view the cameras frames allowing us
to see video.

> NOTE - Work in progress, no clean way to kill this window yet

```python
from skellycam import CameraConfig, Camera

if __name__ == "__main__":
    cam1 = Camera(CameraConfig(cam_id=0))
    cam1.connect()
    cam1.show()
```


#### Example 2 - Connect to all available cameras and record synchronized videos

> NOTE - Experimental and under development, might be unstable
 
[Example 2 Python Fle](skellycam/examples/example1_single_camera_connection.py)
```python
from skellycam.experiments import MultiCameraVideoRecorder

if __name__ == "__main__":

    synchronized_video_recorder = MultiCameraVideoRecorder()
    synchronized_video_recorder.run()

```

### Contribution Guidelines

Please read our contribution doc: [CONTRIBUTING.md](CONTRIBUTING.md)

## Maintainers

* [Jon Matthis](https://github.com/jonmatthis)
* [Endurance Idehen](https://github.com/endurance)

## License
This project is licensed under the APGL License - see the [LICENSE](LICENSE) file for details.

If the AGPL does not work for your needs, we are happy to discuss terms to license this software to you with a different agreement at a price point that  increases exponentially as you move [spiritually](https://www.gnu.org/philosophy/open-source-misses-the-point.en.html) away from the `AGPL`

