Skip to content

Conversation

@chibai
Copy link

@chibai chibai commented Dec 25, 2025

I hope python user can make full use of type hint
#411

@chibai chibai closed this Dec 25, 2025
@chibai chibai reopened this Dec 25, 2025
@christian-rauch
Copy link
Collaborator

How can I verify that this stub file (/usr/local/lib/python3.12/site-packages/apriltag.pyi) works?

@chibai
Copy link
Author

chibai commented Dec 26, 2025

In vscode, the auto compelete hint
ea6c29c1-83b7-4786-9ee9-12b57ca6550c
You can delete .pyi file to see how it liked for the code

from typing import Tuple
import cv2
import numpy as np
from apriltag import apriltag, Detection

imagepath = "test.jpg"
image = cv2.imread(imagepath, cv2.IMREAD_GRAYSCALE)
detector = apriltag("tagStandard41h12")

detections: Tuple[Detection] = detector.detect(image)

@chibai chibai closed this Dec 26, 2025
@chibai
Copy link
Author

chibai commented Dec 26, 2025

I have another idea, I am going to create a python-binding for this project!!! and upload to pypi to create wheel with corresponding pyi.
Since the last update of dt library https://pypi.org/project/dt-apriltags/#history is 4 years ago

@christian-rauch
Copy link
Collaborator

There are already Python bindings. Also, there are other third-party Python bindings. Why do you want to create yet another one?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants