Philomath88/PnPQRCode: Real-time 3D pose estimation of QR codes using a pure Swift PnP solver — no OpenCV required
github.com·2d·
Discuss: Hacker News
🔍Vector Search
Preview
Report Post

PnPQRCode

A minimal iOS sample project that demonstrates real-time 3D pose estimation of QR codes using a pure Swift PnP (Perspective-n-Point) solver — no OpenCV required.

Hold a printed QR code in front of your iPhone’s front camera and watch 3D coordinate axes track the code’s position and orientation in real time.

What makes this interesting

The core of this project is a pure Swift PnP solver (PnPSolver.swift) that computes the full 6-DoF pose (position + orientation) of a planar target from its four corner points. The pipeline:

  1. QR detection via Apple’s Vision framework (VNDetectBarcodesRequest)
  2. Corner ordering — tries both possible corner label orderings and picks the one with lower reprojection error, working around inconsistent `VNBarc…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help