Skip to main content

Generate Barcodes and Markers of 1d, 2d, Aruco and Charuco.

Project description

Code and Marker Generator

This project aim is to generate codes and markers of 1d, 2d, Aruco and Charuco markers.

Installation

PIP

pip install cm-generator

From Source

First, Clone the repository,

git clone git@github.com:code63ReaPer/CM-Generator.git

Next, Install it using pip,

cd CM-Generator
pip install -v -e .

Usage

CLI

To generate QR Code run the below code,

cmgen generate qrcode --text "hi hello" --width 64 --height 64 --name my_qr.png

To generate Aruco marker,

cmgen generate aruco --m-dict 5x5_100 --id 45 --size 30

To generate Charuco marker,

cmgen generate charuco --m-dict 5x5_1000 --s-vert 5 --s-horz 7 --size 640

To locate codes in the image,

cmgen locate code my_qr.png --save

To locate marker in the image,

cmgen locate marker my_marker.png --m-dict 5x5_1000 --save

Python

To generate codes using python,

from cm_generator import handler

img = handler.QR_gen("qrcode", "hi hello", save=False)

img.save("my_qr.png")

To generate Aruco marker using python,

import cv2
from cm_generator import handler

img = handler.aru_gen(marker_dict="5x5_100", id=25, save=False)

cv2.imwrite("my_qr.png", img)

To generate Charuco marker using python,

import cv2
from cm_generator import handler

img = handler.charu_gen(marker_dict="5x5_100", square_vertical=5, square_horizontal=7, square_length=30, marker_length=15, save=False)

cv2.imwrite("my_qr.png", img)

To locate codes using python,

from cm_generator import handler

res = handler.QR_loc("my_qr.png")
print(res)

To locate Aruco marker using python,

from cm_generator import handler

res = handler.aru_loc("my_marker.png, marker_dict="5x5_1000")
print(res)

LICENSE

This project is licensed under AFFERO GENERAL PUBLIC LICENSE (AGPL-3) license. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cm_generator-0.0.2.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

cm_generator-0.0.2-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file cm_generator-0.0.2.tar.gz.

File metadata

  • Download URL: cm_generator-0.0.2.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.8 Windows/10

File hashes

Hashes for cm_generator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 bae4344fb07150bfe22684a78ef811a6a756b4fa8861fb512e64e8cde0605e91
MD5 aeb32ee5423caaf0b1c270e5df014592
BLAKE2b-256 fd1f9385c9fa92505d237b87862885a520866d11cee7d1cdb3bd116eae476d4f

See more details on using hashes here.

File details

Details for the file cm_generator-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: cm_generator-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.8 Windows/10

File hashes

Hashes for cm_generator-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bcf75ab91e5b3944627997878bf36634ec8248dd5cfebe9aeefab972bad54cdf
MD5 b519b00c69cf3f4ab168bc50daa151f0
BLAKE2b-256 e2e904eec252fdbb7ab6f4b9917baaa3a9529d75edfc23e7f1d6cbfa1edaccdf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page