A simple Python package used by me and a friend at the university in the course 'Advanced Image, Video and Motion Analysis'
Project description
ZAOWR Package
This is a ZAOWR (Zaawansowana Analiza Obrazu, Wideo i Ruchu, eng. Advanced Image, Video, and Motion Analysis) Python package used by me and a friend at the university.
PyPI link to the package: MAIN PyPI, TEST PyPI.
Table of contents
Windows tutorial
The Windows tutorial can be found here
Installing the package on Linux using pip
- PyPI MAIN
python3 -m pip install --upgrade zaowr-polsl-kisiel
- TestPyPI
python3 -m pip install --index-url https://test.pypi.org/simple/ --upgrade zaowr-polsl-kisiel
Removing the package on Linux using pip
python3 -m pip uninstall zaowr-polsl-kisiel
Creating virtual environment and installing the package
[!NOTE]
Complete instructions on managing Python virtual environments
can be found here.
- Create project directory and open it (directory where you will create your files and where the venv will be created). Below is an example of how to do it through Bash - you can also do it through file explorer
testDir=/home/user/test
mkdir -p $testDir
cd $testDir
- Create venv
python -m venv ENV_NAME
- Activate the venv (while in the project directory)
source ENV_NAME/bin/activate
or
. ENV_NAME/bin/activate - Install the package from PyPI
python3 -m pip install --upgrade zaowr-polsl-kisiel
- (ADDITIONAL COMMAND) If you want to deactivate the currently active venv
deactivate
- (ADDITIONAL COMMAND) To reactivate the venv, navigate to the path where you created the venv and source it again (command shown above in section number 3)
[!NOTE]
ENV_NAMEis the name of your venv, so you can change it however you like
Testing the installation
- Activate the venv (while in the project directory) - Skip this step if you are not using a virtual environment
source ENV_NAME/bin/activate
or
. ENV_NAME/bin/activate - Launch python
python3
- Import the package
from zaowr_polsl_kisiel import load_calibration
- Locate the file with calibration params or create new file with structure shown below
{ "mse": 5.984166144997382, "rms": 0.5399844606283781, "objPoints": [ [1272.011234078766, 0.0, 1058.4537673810164], [0.0, 1266.8726860857762, 617.7592332273604], [0.0, 0.0, 1.0] ], "imgPoints": [ [1272.011234078766, 0.0, 1058.4537673810164], [0.0, 1266.8726860857762, 617.7592332273604], [0.0, 0.0, 1.0] ], "cameraMatrix": [ [1272.011234078766, 0.0, 1058.4537673810164], [0.0, 1266.8726860857762, 617.7592332273604], [0.0, 0.0, 1.0] ], "distortionCoefficients": [ [-0.39935647747478337, 0.18200290247627665, 0.0020154085712910707, -0.012190829753206725, -0.04648398598417859] ], "rotationVectors": [ [[0.014376302442723948], [0.1667778841470017], [0.018832348485715023]], [[-0.3405035725192283], [0.526867552280327], [-0.13373157952652456]] ], "translationVectors": [ [[71.27846898868391], [50.76036240921024], [1400.9402673825555]], [[-476.2081267995082], [-120.35757569213392], [803.862414335442]] ] }
- Try reading the params from file
# remember to provide appropriate path to the calibration params # you can simply create a json file with structure shown above calibrationParams = load_calibration("../../tests/calibration_params/calibration_params.json")
- Display the
MSEvalue to test if the load succeeded
print(calibrationParams["mse"])
Code requirements
The code fulfills all the requirements necessary to pass the course. Detailed descriptions of the requirements for each lab are provided in the ./docs/code_requirements directory in the form of images (in Polish).
Sources
This package has been prepared following this tutorial.
The publishing to PyPI was created with this tutorial
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zaowr_polsl_kisiel-0.0.15.tar.gz.
File metadata
- Download URL: zaowr_polsl_kisiel-0.0.15.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7262cc8433065fb00c6abbb709f165c23a8cfc70fd897af9d275105b56035944
|
|
| MD5 |
e793e36761cbadf514b54c3e72f370c7
|
|
| BLAKE2b-256 |
3164b0e258a6411a9cea4ae9c6b33d1b42a66b3eee7b87d6a18f1a5adee6d107
|
Provenance
The following attestation bundles were made for zaowr_polsl_kisiel-0.0.15.tar.gz:
Publisher:
create_release.yml on revalew/zaowr-py-package
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zaowr_polsl_kisiel-0.0.15.tar.gz -
Subject digest:
7262cc8433065fb00c6abbb709f165c23a8cfc70fd897af9d275105b56035944 - Sigstore transparency entry: 151463772
- Sigstore integration time:
-
Permalink:
revalew/zaowr-py-package@53e39df64d2183a87fbf273158f23e1e14558522 -
Branch / Tag:
refs/tags/v0.0.15 - Owner: https://github.com/revalew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create_release.yml@53e39df64d2183a87fbf273158f23e1e14558522 -
Trigger Event:
push
-
Statement type:
File details
Details for the file zaowr_polsl_kisiel-0.0.15-py3-none-any.whl.
File metadata
- Download URL: zaowr_polsl_kisiel-0.0.15-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
410b7c41d9850b66f1354450e245502f4ddde9d98d93ca41518f6d31fbfaa176
|
|
| MD5 |
3009233753fef75d1944ff122cd09a05
|
|
| BLAKE2b-256 |
92c116826d2e8268b54067562cab87cf6e4688fb5c6f49b3305bbc0d5c4d94f1
|
Provenance
The following attestation bundles were made for zaowr_polsl_kisiel-0.0.15-py3-none-any.whl:
Publisher:
create_release.yml on revalew/zaowr-py-package
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zaowr_polsl_kisiel-0.0.15-py3-none-any.whl -
Subject digest:
410b7c41d9850b66f1354450e245502f4ddde9d98d93ca41518f6d31fbfaa176 - Sigstore transparency entry: 151463774
- Sigstore integration time:
-
Permalink:
revalew/zaowr-py-package@53e39df64d2183a87fbf273158f23e1e14558522 -
Branch / Tag:
refs/tags/v0.0.15 - Owner: https://github.com/revalew
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create_release.yml@53e39df64d2183a87fbf273158f23e1e14558522 -
Trigger Event:
push
-
Statement type: