pablodiegoss / pymarker Goto Github PK
View Code? Open in Web Editor NEWA python package to generate AR markers and patterns based on input images
License: GNU General Public License v3.0
A python package to generate AR markers and patterns based on input images
License: GNU General Public License v3.0
After running "pymarker hiro.jpg" I get that error. Is it a typo? Shouldn't it be open_image ?
Using pymarker -p input.png
, where input png is an image file that you want to create a pattern file, the output is a .patt
file that contains a numbers representing each pixel of the marker in Red, Green and Blue.
Using /tests/inputs/hiro.jpg the expected output is the file /tests/inputs/hiro.patt
The test should use these two files to compare if the generate_patt function with the hiro.jpg file generates an output exactly as the hiro.patt file expected.
Describe the bug
When trying to generate a marker image from png with transparent background, it's generating a marker without white background. It fills the background image with black color.
Screenshots
The image I want to generate a marker
Additional Information
I tried to change the border size to different values, but I kept finding the bug.
Script i used
from pymarker.core import generate_patt, generate_marker
def main():
filename = "top/sleep.png"
border_size = 10 #size in percentage
generate_marker(filename, border_size)
if __name__ == "__main__":
main()
This flag should avoid creating output files, generating only a string on the screen containing the pattern content. This will be used in Jandig where their own system will create and manage the files inside the system.
Topic about this issue:
https://snarky.ca/what-the-heck-is-pyproject-toml/
Our setup.py defines also where is our entrypoint (cli.py) and our requirements, this should be present in the new pyproject.toml
Poetry will make it easier to setup the environment and maintain project dependencies updated
Using the lib Click, receive the -o flag with an output folder, so that users would be able to use pymarkers as:
pymarker /tests/input/hiro.jpg -o /tests/output/
or
pymarker /tests/input/hiro.jpg -o /tests/output/mypatt.patt
using pymarker without any output flag should result in the patt being generated at the same path of the input file
pymarker /tests/input/hiro.jpg
-> /tests/input/hiro.patt is created.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.