A python package to generate AR markers and patterns based on input images
Project description
PyMarker
A python package to generate AR markers and patterns based on input images.
Installation
PyMarker is available through pip and Pypi.
python3 -m pip install pymarker --user
// or
pip3 install pymarker --user
Usage
Pymarker provides two features for a marker-based AR, generating Pattern files (.patt) and Markers (.png). The marker will be used by the user to visualize some augmented reality, the pattern file for the system to be able to recognize the marker.
An example input image:
Expected output patt:
Expected output marker:
Commands
By default pymarker receives an image and generate both patt and marker
$ pymarker tests/input/hiro.jpg
However, if needed the flag -p
or --patt
can gerate only the patt file for the input:
$ pymarker -p tests/input/hiro.jpg
// or
$ pymarker --patt tests/input/hiro.jpg
The same can happen for markers using the -m
or --marker
which generates only the marker:
$ pymarker -m tests/input/hiro.jpg
// or
$ pymarker --marker tests/input/hiro.jpg
The marker border size can be adjusted with -b
, the default value being 50%.
$ pymarker -b 40 tests/input/hiro.jpg
Modules
You can use the functions directly from your python code to generate markers and patts.
from pymarker.core import generate_patt, generate_marker
def main():
filename = "tests/input/hiro.jpg"
border_size = 50 // size in percentage
generate_patt(filename)
generate_marker(filename,border_size)
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
File details
Details for the file pymarker-0.3.2.tar.gz
.
File metadata
- Download URL: pymarker-0.3.2.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 750f236dfeb718a163a6b5a03665f75a55e7f4b4e1f5547433e97ddad72743f4 |
|
MD5 | e8612172497a58475f2af4342466beca |
|
BLAKE2b-256 | 83d82f308b5e241ef54ba963beaa905aff3aa0dfac8ca6263c37c8817b601723 |
File details
Details for the file pymarker-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: pymarker-0.3.2-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bb82f8db6340b78e636ea7e38e5ad0d8857259c1eeca7f51da9e7a7fb03179f |
|
MD5 | bfe6f722c3275b77f09ad63f32bd3233 |
|
BLAKE2b-256 | 37f97036a60dd63e3df0458c3cceba2c682eb8ef3f1fdca01f9187535c84edda |