Skip to main content

PyMarker

A python package to manage Augmented Reality markers and patterns based on input images. This package is capable of generating black borders around images to be used as AR markers and also removing them in cases where you need to automatize the process.

Installation

PyMarker is available through pip and Pypi.

python3 -m pip install pymarker --user
// or
pip3 install pymarker --user

Usage

Pymarker provides three features for a marker-based AR: generating Pattern files (.patt); Markers images (.png); Removing borders of existing Marker images. 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:

Example of an input image

Expected output patt:

Example output for pattern file

Expected output marker:

Example of a generated marker

Using the remove feature, we can return this marker to the starter image back again:

Example of an input image

Commands

PyMarker now uses subcommands for its CLI interface.

Generate markers and patt files

By default, the generate subcommand receives an image and generates both patt and marker files:

$ pymarker generate tests/input/hiro.jpg

To generate only the patt file for the input, use the -p or --patt flag:

$ pymarker generate -p tests/input/hiro.jpg
# or
$ pymarker generate --patt tests/input/hiro.jpg

To generate only the marker, use the -m or --marker flag:

$ pymarker generate -m tests/input/hiro.jpg
# or
$ pymarker generate --marker tests/input/hiro.jpg

You can adjust the marker border size with -b (black border, default 20%) and -w (white border, default 3%):

$ pymarker generate -b 40 -w 5 tests/input/hiro.jpg

You can also specify an output path with -o or --output:

$ pymarker generate -o output_dir/ tests/input/hiro.jpg

Remove borders from marker images

To remove borders from a marker image, use the remove subcommand:

$ pymarker remove tests/input/marker.png

You can specify an output path for the result:

$ pymarker remove -o output_dir/ tests/input/marker.png

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)

Metadata

Release files for pymarker 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymarker 1.4.0
File Size Uploaded Provenance Actions
pymarker-1.4.0.tar.gz 18.4 kB Without provenance Details for pymarker-1.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pymarker 1.4.0
File Interpreter ABI Platform Actions
pymarker-1.4.0-py3-none-any.whl Python 3 none any Details for pymarker-1.4.0-py3-none-any.whl

Total release size: 38.4 kB

Release files / pymarker-1.4.0.tar.gz

Download URL pymarker-1.4.0.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d405a188b2ebbda115d414ab8d525fa672e1e6ddfba8382bc248ad2106129668
BLAKE2b-256 checksum
How to use checksums
e6d4dae825caebf7d849273c55c65ea31d4ee171cb0ec5e9901b0fb2fa96bd41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.15 Linux/6.17.0-1022-azure

Release files / pymarker-1.4.0-py3-none-any.whl

Download URL pymarker-1.4.0-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d4a96ef312c763bdc102e290fc4a816da31594f8eed3cbcfc7186b6e522d07c3
BLAKE2b-256 checksum
How to use checksums
1182b6c9bd8a0da243849dad1ad6f775a8fcf889bd922bf4c85a7c0f091bdf23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.15 Linux/6.17.0-1022-azure

Security for pymarker 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page