All notable changes to SwiftAprilTag are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.3.1 - 2026-05-10
- End-to-end integration test verifying all eight
tag*families that ship pre-rendered images upstream (everyTagFamilyenum case excepttag36h10, which has no upstreamapriltag-imgsrendering). Each test loads a bundled id-0 fixture, runs detection, and asserts the family decodes its own id 0 with hamming 0 and decisionMargin > 30. Confirms theTagFamily.createCFamily()/destroyCFamily(_:)plumbing works for every family the wrapper exposes — not just tag36h11.
1.3.0 - 2026-05-10
- DocC catalog. New
Sources/SwiftAprilTag/SwiftAprilTag.docc/with a module landing page (topic-grouped symbol references), a Getting Started article, a Pose Estimation deep-dive, and a Tag Size Convention article that documents the outer-black-border vs. white-margin pitfall. .spi.ymlto enable hosted DocC documentation on the Swift Package Index. Once the package re-indexes, the docs will be available at https://swiftpackageindex.com/keyqcloud/SwiftAprilTag/documentation.Examples/CLI/— a self-contained Swift executable that loads an image, runs detection, and optionally estimates pose. Demonstrates the full CGImage path and pose API in <100 lines.Examples/iOS-Live/— minimal SwiftUI iOS app with live-camera detection, real-time corner overlay drawn on top of anAVCaptureVideoPreviewLayer, and per-frame 6-DOF pose readout. Ships as source files only with instructions for dropping into a new Xcode project (avoiding fragile xcodeproj scripting).
1.2.0 - 2026-05-10
Detector.detect(cgImage:)— Apple-platform convenience that takes anyCGImage, renders it to 8-bit grayscale internally, and runs detection. Saves callers from doing the conversion themselves.Detector.detect(uiImage:)— UIKit convenience (iOS, tvOS, Mac Catalyst) that unwraps the underlyingCGImageand forwards.Detection.cgPath— closedCGPathof the detected corner polygon, ready to assign toCAShapeLayer.pathor wrap withPath(cgPath)for SwiftUI overlays.CameraIntrinsics(avCalibrationData:imageSize:)— convenience initializer from AVFoundation'sAVCameraCalibrationData, with automatic rescaling between the calibration's reference dimensions and the actual image size you used for detection.- New integration test exercising
detect(cgImage:)and verifyingcgPathproduces the expected bounding box.
1.1.0 - 2026-05-10
- Pose estimation. New
CameraIntrinsicsandTagPosepublic types, plusDetection.estimatePose(intrinsics:tagSize:) -> TagPose?which recovers the 6-DOF pose of a detected tag in the camera's coordinate frame using the upstream homography + orthogonal-iteration solver.TagPoseexposes the rotation matrix, translation vector, and reprojection error, with Apple-only convenience accessors forsimd_float3x3,simd_float3, and a combinedsimd_float4x4transform suitable for SceneKit/RealityKit/Metal. Detection.homographyfield exposing the 3x3 homography matrix that maps ideal tag corners[-1, 1]to image pixel coordinates. Required by pose estimation, also useful for users who want to do their own perspective warps or homography decomposition.- README now includes a pose-estimation usage example with a note about the outer-black-border convention.
- New integration test that recovers the pose of the bundled fixture against synthetic intrinsics and asserts translation within 5mm of the expected value, rotation matrix near identity, and small reprojection error.
1.0.2 - 2026-05-10
- Integration test that loads a real
tag36h11_id0fixture image, runs detection end-to-end, and asserts ID, hamming distance, decision margin, and sub-pixel corner positions. Apple-only (gated behind#if canImport(CoreGraphics) && canImport(ImageIO)) — Linux CI continues to run the unit tests only. - Counter-test verifying a flat gray image produces zero detections, guarding against false-positive regressions.
- Bundled
Tests/SwiftAprilTagTests/Fixtures/tag36h11_id0.png(200×200, 516 bytes) as a known-good detection target. Derived from the upstreamAprilRobotics/apriltag-imgs10×10 native rendering by 20× nearest- neighbor upscale, so the corner positions are exactly predictable.
1.0.1 - 2026-05-09
- Removed
import CoreGraphicsfrom public source files. CoreGraphics is Apple-only;CGPointandCGSizeare available on Linux directly via Foundation. SwiftAprilTag now builds cleanly on Linux too. - Dropped synthesized
Hashableconformance fromDetection(it was not reliably available across platforms).EquatableandSendableare retained.
- GitHub Actions CI running
swift build+swift teston macOS 14 and Ubuntu (Swift 5.10) for every push, pull request, and tag. - README badges for CI status, Swift version, supported platforms, SPM compatibility, and MIT license.
- GitHub repository topics for discoverability.
1.0.0 - 2026-05-08
- Initial release.
- Swift wrapper around the AprilTag fiducial-marker detection library.
- Support for all standard AprilTag families (
tag36h11,tag25h9,tag16h5,tag36h10,tagCircle21h7,tagCircle49h12,tagCustom48h12,tagStandard41h12,tagStandard52h13). DetectorAPI with configurable thread count, decimation, blur, edge refinement, and decode sharpening.Detector.detect(luminance:width:height:stride:)for raw 8-bit image data.Detector.detect(pixelBuffer:plane:)for direct AVFoundationCVPixelBuffersupport (Apple platforms only).- Sub-pixel corner localization in
Detection.corners. - Vendored upstream AprilTag C99 source (BSD-2-Clause).
- MIT-licensed Swift wrapper code.
- iOS 15+, macOS 12+, Mac Catalyst 15+, and tvOS 15+ support.