How Does a Phone Camera Measure Heart Rate? The Science Explained
Discover how your phone camera measures heart rate using PPG technology. We explain the science of light absorption, wavelength selection, and signal processing.

Your phone camera measures heart rate by shining light from the flash LED into your fingertip and recording how the amount of reflected light changes with each heartbeat. This works because arterial blood absorbs light differently depending on how much of it is present in the tissue at any given moment. Software processes these tiny fluctuations in brightness to calculate your pulse, a technique known as photoplethysmography (PPG).
The idea that a device designed for selfies can double as a cardiac sensor strikes many people as unlikely. But the physics is well-understood and validated in dozens of peer-reviewed studies. This article walks through exactly how it works, from photon to pulse reading.
Step 1: Light Enters Your Fingertip
Everything starts with the flash LED on the back of your phone. When a heart rate app activates the flash, it floods your fingertip with broadband white light. This light contains a mix of wavelengths spanning the visible spectrum, from blue (~450 nm) through green (~530 nm) to red (~650 nm) and into the near-infrared.
The light penetrates into the tissue of your finger. How deep it goes depends on wavelength. Blue light barely gets past the epidermis. Green light reaches the superficial capillary beds. Red and near-infrared light penetrate deepest, passing through several millimeters of tissue. For a detailed look at how different wavelengths interact with tissue and hemoglobin, see our guide on LED wavelength selection in PPG.
As light travels through your finger, it encounters several types of tissue: skin, fat, connective tissue, bone, and blood. Most of these absorb light at relatively constant levels. Blood is different. The amount of arterial blood in the capillary beds fluctuates with every heartbeat.
Step 2: Hemoglobin Absorbs the Light
Hemoglobin is the key molecule. It is the oxygen-carrying protein in red blood cells, and it has strong absorption characteristics across visible wavelengths. When a pulse of blood arrives in the fingertip capillaries (the systolic peak of the cardiac cycle), there is temporarily more hemoglobin in the optical path. More hemoglobin means more light absorption. Less light makes it back out of the finger.
Between heartbeats (diastole), blood volume in the capillaries drops slightly. Less hemoglobin, less absorption, more light exits the tissue.
The magnitude of this change is small. The pulsatile variation typically represents only 1-3% of the total light signal. The other 97-99% is the static "DC" component: light absorbed by non-pulsatile tissue, venous blood, and bone. Extracting a clean cardiac signal from this tiny fluctuation is the central engineering challenge.
Oxygenated and deoxygenated hemoglobin absorb light differently at different wavelengths. At green (~530 nm), both forms absorb strongly and roughly equally. At red (~660 nm), deoxygenated hemoglobin absorbs more. At near-infrared (~940 nm), the relationship reverses. This wavelength-dependent difference is the basis for pulse oximetry, but for simple heart rate measurement, any wavelength with good hemoglobin absorption will work.
Step 3: The CMOS Sensor Captures the Signal
Your phone's camera is a CMOS imaging sensor covered with a Bayer color filter array. Each pixel has a tiny color filter (red, green, or blue) over it, so the sensor simultaneously captures three separate color channels.
When your finger is pressed against the lens, the entire sensor is flooded with the reddish glow of light transmitted through tissue. The camera records this as video, typically at 30 frames per second (fps). Each frame is a 2D array of pixel values, but since the whole frame is just your fingertip, spatial information does not matter much. What matters is the average brightness of each color channel in each frame.
The app computes the mean pixel intensity across a central region of the frame for each channel (red, green, blue) at every frame. This produces three time series of brightness values, sampled at 30 Hz. These time series are the raw PPG signals.
Why 30 fps Is Enough
A resting heart rate of 60 BPM means one beat per second, or 1 Hz. Even a very fast heart rate of 200 BPM is only 3.3 Hz. By the Nyquist theorem, you need at least twice the highest frequency of interest. Sampling at 30 fps gives you a Nyquist frequency of 15 Hz, more than enough for heart rate detection. Some apps use 60 fps or higher for improved waveform resolution, which helps with heart rate variability analysis, but 30 fps is perfectly adequate for basic BPM calculation.
Bit Depth Matters
Standard smartphone video records 8 bits per channel, giving 256 discrete intensity levels. That means the smallest detectable change is about 0.4% of full scale. Since the pulsatile PPG signal is only 1-3% of total light, you are working with a dynamic range of roughly 3-8 intensity levels for the cardiac signal. This is tight. Some phones support 10-bit or 12-bit capture, which improves sensitivity by a factor of 4-16 and produces noticeably cleaner waveforms. Scully et al. (2012) demonstrated 5-8 dB improvement in signal-to-noise ratio (SNR) when using RAW camera data compared to compressed video (DOI: 10.1007/s10916-012-9898-z).
Step 4: Signal Processing Extracts the Heart Rate
The raw time series from the camera is noisy. It contains the cardiac signal buried within motion artifact, ambient light fluctuations, camera auto-exposure adjustments, and quantization noise. A signal processing pipeline cleans it up.
Bandpass Filtering
The first step is almost always a bandpass filter that removes frequencies outside the expected heart rate range. A typical passband is 0.7-4.0 Hz, corresponding to heart rates of 42-240 BPM. This eliminates low-frequency drift (posture changes, slow temperature variation) and high-frequency noise (camera sensor noise, ambient light flicker at 50/60 Hz).
Detrending
Even after bandpass filtering, the signal may have a slowly wandering baseline caused by changes in finger pressure or auto-exposure compensation. Detrending algorithms (polynomial fitting, moving average subtraction, or wavelet decomposition) remove this drift without distorting the cardiac oscillation.
Peak Detection
Once the signal is clean, the algorithm identifies individual heartbeat peaks. Simple approaches use threshold-based peak finding: mark a peak whenever the signal crosses above a threshold and then drops back below it. More sophisticated methods use adaptive thresholds that adjust to the signal amplitude, or template matching that compares each candidate peak to an expected pulse waveform shape.
The timestamps of consecutive peaks give the inter-beat intervals (IBIs). Heart rate is simply 60 divided by the mean IBI in seconds. If the mean IBI is 0.8 seconds, heart rate is 75 BPM.
Frequency Domain Methods
An alternative to peak detection is spectral analysis. Apply a Fast Fourier Transform (FFT) to a 10-30 second window of the PPG signal, and the dominant frequency in the cardiac band corresponds to the heart rate. This approach is more robust to noise because it considers the entire window rather than relying on individual peaks. Many apps combine time-domain peak detection with frequency-domain validation. For more on these processing steps, see our PPG waveform analysis guide.
Green Channel vs. Red Channel: Which Is Better?
This is a question that comes up often, and the answer is not as simple as "always use green."
For wrist-based wearables with dedicated green LEDs, the green channel provides the highest pulsatile signal amplitude because green light is strongly absorbed by hemoglobin and does not penetrate too deep into tissue (which would dilute the pulsatile signal with non-pulsatile absorption from deeper structures).
But for finger-on-lens smartphone PPG, the situation is different. The LED flash emits white light. The light passes through the entire fingertip. Because tissue absorbs green light heavily, relatively little green light makes it through to the camera sensor. The transmitted light is dominated by red wavelengths. This means the red channel may actually have a better signal-to-noise ratio in this configuration, even though the green channel has a higher pulsatile amplitude relative to its DC level.
In practice, most well-designed apps analyze all three channels and either select the best one adaptively or combine them using independent component analysis (ICA) or principal component analysis (PCA). The details of wavelength-dependent absorption are covered in our guide on LED wavelength selection.
How It Compares to Medical Pulse Oximeters
A clinical pulse oximeter uses two specific LEDs (red at 660 nm, infrared at 940 nm), a purpose-built photodiode, and factory calibration against invasive blood gas measurements. A smartphone uses a broadband white LED, a camera designed for photography, no wavelength calibration, and lower bit depth.
Despite these differences, for measuring heart rate (not SpO2), smartphone PPG performs well. Peng et al. (2015) compared a smartphone app against a clinical pulse oximeter and ECG in 95 subjects and found a mean absolute error of 2.17 BPM, with a correlation coefficient of 0.98 (DOI: 10.1109/JBHI.2014.2370752). Heart rate requires only detecting peak timing, which does not demand precise calibration.
SpO2 is a different story. Without controlled wavelengths and proper calibration, smartphone SpO2 readings are unreliable. The accuracy limitations of smartphone-based SpO2 are well documented.
Sources of Error and How Algorithms Compensate
Motion Artifact
The biggest enemy of camera-based PPG is movement. Even slight finger motion changes the optical coupling and generates artifacts that swamp the cardiac signal. Motion from walking produces signals at 1-2 Hz, right in the cardiac frequency range.
Compensation strategies include accelerometer-based adaptive filtering, multi-channel analysis (motion affects all color channels similarly while the cardiac signal affects them differently), and signal quality rejection that asks the user to hold still when the signal is too corrupted.
Auto-Exposure and Auto-Gain
Smartphone cameras adjust exposure automatically. When you place your finger on the lens, the camera may continuously adjust gain to try to produce a "good" image, introducing artificial fluctuations. Most heart rate apps lock camera exposure and white balance before measurement to prevent this.
Ambient Light and Low Perfusion
Light leaking around your finger introduces noise, especially from fluorescent lights flickering at 50/60 Hz. A tight seal between finger and lens minimizes this. Some apps apply notch filters to remove power line flicker.
If your peripheral blood flow is poor (cold hands, vasoconstriction, dehydration), the pulsatile signal becomes very small and may drop below the camera's noise floor. There is no algorithmic fix for a signal that is not there. Warm your hands before measuring.
Skin Tone and Nail Polish
Melanin absorbs shorter wavelengths more strongly, so darker skin tones may produce weaker signals in the green and blue channels. Modern apps adapt by adjusting gain and using the red channel preferentially. Dark nail polish creates similar attenuation and should be removed from the measurement finger.
Beyond Heart Rate
The same PPG signal that encodes heart rate contains additional information. Heart rate variability (HRV) can be derived from the variation in time between consecutive beats, though camera-based HRV is less precise than wearable or ECG-based HRV. Respiratory rate can be extracted from breathing-induced modulations of the PPG amplitude. For a broader overview, see our guide on smartphone camera-based vital signs.
Frequently Asked Questions
How does a phone camera detect heartbeats?
The phone camera detects heartbeats by measuring tiny changes in the amount of light passing through your fingertip. Each heartbeat pushes a pulse of blood into the capillaries, which absorbs slightly more light. The camera records these fluctuations as changes in pixel brightness, and software identifies the rhythmic peaks to count heartbeats. This is the same optical principle, called photoplethysmography, that clinical pulse oximeters use.
Why does the flash need to be on?
The flash provides a consistent, bright light source that illuminates the tissue from one side while the camera captures light from the other. Without the flash, ambient light alone is usually too dim and too variable to produce a usable PPG signal through the fingertip. The flash ensures enough photons penetrate the tissue and reach the camera sensor with a detectable pulsatile modulation.
Is the green or red color channel better for measuring heart rate?
It depends on the configuration. In finger-on-lens mode, the red channel often has better signal-to-noise ratio because red light transmits through tissue more efficiently than green. In wrist-based wearables with green LEDs, green is preferred because it has higher pulsatile contrast at shallow tissue depths. Most well-designed phone apps analyze multiple channels and select or combine the best one automatically.
How accurate is phone camera heart rate measurement?
Under good conditions (sitting still, warm hands, proper finger placement), phone camera heart rate measurement is typically accurate within 2-5 BPM of clinical ECG or pulse oximeter readings. Peng et al. (2015) found a mean absolute error of 2.17 BPM in 95 subjects. Accuracy degrades with motion, cold fingers, poor lighting, or irregular heart rhythms.
Can my phone camera measure blood oxygen (SpO2)?
Not reliably. SpO2 requires comparing absorption at two specific wavelengths (660 nm red and 940 nm infrared). Phone flash emits uncontrolled broadband light, and the camera's color filters cannot isolate these wavelengths with sufficient precision. Any SpO2 value from a phone camera app should be considered an approximation at best.
Why do I need to hold still during measurement?
Movement changes the contact pressure between finger and lens, shifts which tissue is illuminated, and generates motion artifacts that can be larger than the cardiac signal itself. Even small movements can cause the algorithm to misidentify peaks. Holding still for 15-30 seconds is essential for a reliable reading.
Can remote PPG (facial video) measure heart rate without touching the phone?
Yes. Some apps use the front camera to detect subtle skin color variations on your face caused by blood flow. This is called remote PPG or rPPG. It works without contact, but the signal is much weaker than finger-on-lens PPG. Accuracy is typically 3-8 BPM, and it is sensitive to lighting, head movement, and facial expressions.
Does phone camera PPG work for people with darker skin tones?
Yes, though the signal may be weaker in the green and blue channels because melanin absorbs shorter wavelengths more strongly. The red channel is less affected and provides more consistent performance across skin tones. Well-designed apps adapt by adjusting gain settings and selecting the most informative color channel automatically.
Summary
Phone camera heart rate measurement is real science, not a gimmick. The flash provides illumination, hemoglobin absorbs light in proportion to blood volume, the CMOS sensor captures the fluctuation, and signal processing extracts the heart rate. The limitations are real too: low bit depth, uncontrolled wavelengths, and motion sensitivity all constrain accuracy. But for a quick resting heart rate check, the technology delivers results that would have seemed impossible from a consumer phone just fifteen years ago.