CamDistance Tool Screenshot

CamDistance - Automatic Camera Distance Detection for Research

Overview

CamDistance is a web-based tool for automatic camera distance detection using facial landmark detection. Developed specifically for experimental psychology research, this tool automatically measures the viewing distance between participants and their computer screens using real-time facial recognition technology.

High Precision

Achieves ±2-3 cm precision for distances between 40-100 cm, making it ideal for controlled experimental conditions.

Computer Vision MediaPipe JavaScript jsPsych Plugin Web-Based Psychology Research MIT License

Key Features

Automatic Measurement

Uses MediaPipe Face Mesh for real-time facial landmark detection and distance calculation.

High Accuracy

Achieves ±2-3 cm precision for distances between 40-100 cm using advanced algorithms.

Web-Based

No software installation required, works in any modern browser with camera access.

Framework Integration

Built as a jsPsych plugin with JATOS compatibility for seamless research integration.

Real-Time Feedback

Provides live measurement feedback to participants during experimental sessions.

Stabilization

Temporal smoothing and outlier rejection algorithms ensure reliable measurements.

How It Works

  1. Face Detection: Uses MediaPipe to detect 468 facial landmarks in real-time
  2. Interpupillary Distance (IPD) Measurement: Calculates pixel distance between eye landmarks
  3. Geometric Calculation: Applies pinhole camera model: Distance = (Real_IPD × Focal_Length) / Pixel_IPD
  4. Stabilization: Averages measurements over time and filters outliers
  5. Result Display: Shows measured distance in centimeters with real-time updates

Research Applications

In psychological experiments, particularly those involving visual stimuli, the distance between the participant and the screen critically affects:

  • Visual Angle: The apparent size of stimuli on the retina
  • Stimulus Perception: How participants perceive and interact with visual elements
  • Data Validity: Ensuring consistent experimental conditions across participants
  • Remote Studies: Enabling precise distance measurement in online experiments

Traditional methods rely on manual measurement with rulers, which is time-consuming, error-prone, and impossible in remote experiments. CamDistance automates this process using computer vision technology, making it perfect for both laboratory and online research.

Back to Home