Right eye (subject)
—- Center
- —
- Radius
- —
- Fit RMS
- —
- Contrast
- —
- Daugman Δ
- —
- Hough Δ
- —
Computer Vision · Biometrics · Runs 100% in-browser
IrisVision localizes the human iris in real time from a webcam or photo, fits a sub-pixel circle to it, and then independently validates that fit with classical computer vision — Daugman's integro-differential operator, Hough circles and radial intensity contrast — before reporting a verdict.
Live demo
Start your camera or drop a face photo. Processing happens on your device — no frame ever leaves the browser.
Start the camera, try the sample photo, or drag & drop a face photo here.
Loading models…
Pipeline
Every frame flows through six stages. A learned model proposes; classical vision verifies.
Frames come from getUserMedia or a local image. Nothing is uploaded — all compute runs in WebAssembly and WebGL.
MediaPipe Face Landmarker regresses 478 3D landmarks, including 5 points per iris (center + 4 limbus points).
A centered algebraic least-squares (Kåsa) fit over the limbus points gives a sub-pixel center, radius and RMS residual.
min Σ (x² + y² + Dx + Ey + F)²
Eye Aspect Ratio detects blinks with hysteresis; the iris position between canthi and lids yields a gaze estimate.
EAR = (‖p₂−p₆‖ + ‖p₃−p₅‖) / 2‖p₁−p₄‖
The eye region is cropped and re-examined with Daugman's integro-differential operator, OpenCV Hough circles and a radial intensity contrast test.
Using the near-constant human iris diameter (~11.7 mm) and a pinhole model, the system estimates camera distance.
Z = f · 11.7 mm / dpx
Validation
Landmark models always output an answer — even when the eye is closed, blurred or occluded. IrisVision only trusts a fit that agrees with evidence in the pixels.
Two classical detectors re-locate the limbus from raw pixels: Daugman's integro-differential operator on the lateral arcs the eyelids rarely cover (65%), and OpenCV HoughCircles on an upsampled, median-filtered window (35%). Each is scored on center error and radius ratio.
max(x,y,r) | ∂/∂r ∮ I(x,y) ds / 2πr |
g = (1 − Δc/0.6r) · (1 − |1 − r′/r|/0.5)
The iris is darker than the surrounding sclera. Mean intensity inside 0.7r is compared to a 1.25r–1.9r ring, sampled only inside the eyelid polygon.
k = (Iring − Iiris) / Iring
A closed or squinting eye hides the limbus. Low EAR marks the eye as OCCLUDED rather than pretending to localize it.
o = clamp((EAR − 0.15) / 0.12)