Skip to content

Commit

Permalink
Add pypi package
Browse files Browse the repository at this point in the history
  • Loading branch information
ibaiGorordo committed Feb 10, 2023
1 parent 6ab0ee4 commit 0336d84
Show file tree
Hide file tree
Showing 22 changed files with 189 additions and 39 deletions.
161 changes: 159 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,160 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

*.pyc
examples/outputImage.jpg
# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ The objective of this repository is to combine the strong points of both reposit
* **numpy**: required for the matrix calculations
* **opencv-python**: Required for the image transformations and visualization.

## Installation
```commandline
pip install pykinect_azure
```

## How to use this library

* The library has **been tested in Windows 10 and Ubuntu 20.04** with the Kinect Azure SDK 1.4.0 and 1.4.1, it should also work with other operating systems.
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleBodySegmentation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleBodyTracking.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleBodyTrackingColorCamera.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleBodyTrackingLiteModel.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleBodyTrackingTransformationComparison.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleColorImage.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
3 changes: 0 additions & 3 deletions examples/exampleColorPointCloud.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import sys
import cv2
import numpy as np

sys.path.insert(1, '../')
import pykinect_azure as pykinect
from pykinect_azure.utils import Open3dVisualizer

Expand Down
2 changes: 0 additions & 2 deletions examples/exampleDepthImage.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleInfraredImage.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/examplePlayback.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/examplePlaybackBodyTracker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/examplePointCloud.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect
from pykinect_azure.utils import Open3dVisualizer

Expand Down
2 changes: 0 additions & 2 deletions examples/exampleRealTimeIMU.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import sys
import numpy as np
import matplotlib.pyplot as plt

sys.path.insert(1, '../')
import pykinect_azure as pykinect

def handle_close(evt):
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleRecording.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleSmoothDepthImage.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import sys
import cv2
import numpy as np

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleTransformColorToDepth.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleTransformDepthToColor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect

if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions examples/exampleTransformPoint2DTo3D.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import sys
import cv2

sys.path.insert(1, '../')
import pykinect_azure as pykinect
from pykinect_azure import K4A_CALIBRATION_TYPE_COLOR, K4A_CALIBRATION_TYPE_DEPTH, k4a_float2_t

Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[metadata]
description-file=README.md
license_files=LICENSE.rst
22 changes: 22 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from setuptools import setup, find_packages

# read the contents of your README file
from pathlib import Path
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()

setup(
name='pykinect_azure',
version='0.0.1',
license='MIT',
description='Python library to run Kinect Azure DK SDK functions',
long_description=long_description,
long_description_content_type='text/markdown',
author='Ibai Gorordo',
url='https://github.com/ibaiGorordo/pyKinectAzure',
packages=find_packages(),
install_requires=[
'numpy',
'opencv-python',
],
)

0 comments on commit 0336d84

Please sign in to comment.