Real-Time Signal Amplification Microscope

Waveform (Time Domain)
Spectrum (Frequency Domain)

About This Application

Welcome to the Real-Time Signal Amplification Microscope. This web application demonstrates the principle of Eulerian Video Magnification to reveal subtle, invisible changes in the world around us. Specifically, it is configured to detect minute variations in skin tone caused by the flow of blood, a technique known as remote photoplethysmography (rPPG).

By analyzing the video feed from your webcam, this tool extracts a pulse signal, amplifies it so it becomes visible as a green "throb" in the video, and analyzes it to estimate your heart rate in Beats Per Minute (BPM).

Disclaimer

This is a technology demonstration and an educational tool, NOT a medical device. The BPM readings are estimations and can be affected by many factors, including lighting, movement, and camera quality. The data provided should not be used for medical diagnosis, monitoring, or any health-related decisions. Always consult a qualified healthcare professional for medical advice.

How It Works: The Technology Behind the Signal

The process of extracting a heart rate from a video stream involves several key steps, all performed in real-time within your browser:

  1. Video Acquisition & ROI Selection: Your browser securely accesses your webcam. You can then choose a Region of Interest (ROI), the specific area of the video to analyze.
    • Manual Mode: You draw a box on the area you want to measure (e.g., your forehead or cheek).
    • Automated Mode: The application uses the MediaPipe Face Mesh model to automatically detect your face and places an ROI on your forehead, an area with good blood perfusion.
  2. Signal Extraction (rPPG): With every heartbeat, your heart pumps blood into your arteries. This causes the volume of blood in the microvessels of your skin to increase slightly. Blood hemoglobin absorbs green light more than red or blue light. This application averages the intensity of the green color channel across all pixels in the ROI for each frame. This average green value becomes our raw physiological signal.
  3. Signal Processing: The raw signal is noisy and contains unwanted variations from lighting changes or small movements.
    • Detrending: A moving average of the signal is calculated and subtracted from the current signal. This removes slow-moving "drift" and centers the signal around zero.
    • Band-Pass Filtering: A digital filter is applied to isolate only the frequencies relevant to a human heart rate (typically 0.7 Hz to 3.0 Hz, or 42 to 180 BPM). This is the most critical step for cleaning the signal.
    • Amplification: The cleaned, filtered signal is very faint. It is multiplied by the Amplification Factor to make it large enough to see on the graphs and as a color change in the video.
  4. Analysis and Visualization:
    • Time-Domain Graph: This graph plots the filtered signal over time, showing the clear, periodic wave of your pulse.
    • Frequency-Domain Graph: A mathematical technique called a Fast Fourier Transform (FFT) is used to convert the time-based signal into its constituent frequencies. The strongest frequency detected within our band-pass range is identified as the heart rate.
    • BPM Calculation: The peak frequency (in Hertz, or cycles per second) is multiplied by 60 to calculate the Beats Per Minute. A smoothing algorithm is applied to provide a more stable reading.

Understanding the Controls

Future Directions & Known Limitations

This application is a proof-of-concept and has several areas for potential improvement: