Skip to content

Conversation

@kalwalt
Copy link
Member

@kalwalt kalwalt commented Feb 21, 2025

Python bindings for JsartoolkitNFT

In this PR i want to develop python bindings for jsartoolkitNFT. Of course, this means i will not transpile typescript/javascript code to python, instead i created C++ glue code to use with setuptools and pybind11, so creating python binding code.
There are some issues and i will list here to take note and solve them.
Most of the methods in ArtoolKitNFT_py.cpp are transpiled to python, the getNFTMarkerInfo is not yet implemented. i have not a clear idea on how is better deal the object that return as in the C++ code for emscripten and convert to python.
In this PR i will only propose some small tests, instead of a complete wrapper.

Issues and tasks to solve

  • ARLOG doesn't add a return character \n so all logs are scrambled lines. Solved with commit fcab895 and a0d4d8d
  • getKpmImageWidth and getKpmImageHeight cause compilations errors, so i excluded both from the build process.
  • getNFTMarkerInfo need to be implemented. Solved with commit 7ce0076
  • issue in include/AR/config.h at line 540 (excluded #error option)
  • github action to test the python build process
  • improved tests with python unittest pytest
  • test python package on TestPyPi
  • add some information on the main README.md of the project and on the python-bindings README.md

@kalwalt kalwalt added enhancement New feature or request C/C++ labels Feb 21, 2025
@kalwalt kalwalt self-assigned this Feb 21, 2025
…sing vcpkg and streamline include/library directories
@kalwalt
Copy link
Member Author

kalwalt commented Feb 24, 2025

Now the project can be build for both Linux and Windows OS's, it can be improved but it is an important step!

kalwalt added 19 commits March 2, 2025 19:15
@kalwalt
Copy link
Member Author

kalwalt commented Mar 7, 2025

The tests doesn't fails anyway it seems that the marker is not detected, maybe i'm not providing the right data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants