Repository navigation
Normalize OpenCV marker ID shapes in detect_markers and add matrix-safe pytest diagnostics artifacts - #23
Merged
Conversation
Co-authored-by: qian-chu <97355086+qian-chu@users.noreply.github.com>
Co-authored-by: qian-chu <97355086+qian-chu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix marker ID normalization in detect_markers
Normalize OpenCV marker ID shapes in Sep 18, 2026
detect_markers and add matrix-safe pytest diagnostics artifacts
Collaborator
|
LGTM! Disclosure of Delegation to Generative AIThe authors declare the use of generative AI in the research and writing process. According to the GAIDeT taxonomy (2025), the following tasks were delegated to GAI tools under full human supervision:
The GAI tool used was: GPT-5.4. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cv2.aruco.ArucoDetector.detectMarkers()returns marker IDs as either(N,1)elements or scalar-like(N)elements depending on OpenCV/platform;detect_markers()assumed array indexing (marker_id[0]) and crashed on macOS withIndexError. This PR normalizes IDs at use-site and hardens CI output/reporting so matrix test failures are immediately diagnosable.Marker ID Compatibility in
detect_markers_normalize_marker_id()to coerce detector outputs (7,np.array(7),np.array([7]),np.array([7])[0]-like) into a singleint.marker_id[0]usage with the normalized value for both:"marker id""marker name"({family}_{id})Focused Regression Coverage
marker id,marker name).CI Diagnostics in
.github/workflows/main.yml-vv --tb=long).upload-artifactwithif: always()so reports are preserved even on pytest failure.OPENCV_VIDEOIO_PRIORITY_MSMF: "0") and used OS-appropriate shell commands for report directory setup.