Giter Site home page Giter Site logo

mprib / skellycam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from freemocap/skellycam

0.0 0.0 0.0 2.84 MB

An easy and efficient way to connect to one or more cameras and record synchronized videos๐Ÿ’€๐Ÿ“ธ

License: GNU Affero General Public License v3.0

Python 100.00%

skellycam's Introduction

Project Logo

SkellyCam

An easy and efficient way to connect to one or more cameras and record synchronized videos ๐Ÿ’€๐Ÿ“ธ

Latest Release AGPLv3+ Contributions Welcome https://img.shields.io/badge/code%20style-black-000000.svg


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://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'

pip install skellycam

2. Launch SkellyCam GUI

Enter the command below and press 'Enter'

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 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

MacOSX Python3 Installation Guide

Linux Python3 Installation Guide

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

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

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

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

Maintainers

License

This project is licensed under the APGL License - see the 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 away from the AGPL

skellycam's People

Contributors

jonmatthis avatar endurance avatar mprib avatar aaroncherian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.