Eulerian video magnification, as a scroll-through film

Seeing the invisible

How a camera can show a pulse that your eyes cannot see.

Look at a person sitting still and you see a person sitting still. But with every heartbeat, a little blood washes into the face, and the skin turns a touch redder, then a touch paler. The change is real, and it is far too small for your eyes to catch. A camera records it anyway, buried in every frame of ordinary video.

Nobody was looking for it. In 2012, a team at MIT asked a simple question. What if we looked at each pixel as a tiny clock, watched how its colour rose and fell over time, picked out only the rhythm of a heartbeat, and turned that rhythm up? The face began to pulse. This is how a microscope for time was built.

Synthetic face, computed in your browser. Pulse band 0.83 to 1 Hz, multiplied by 50.

Chapter 1

A face that seems still

Your heartbeat changes your skin colour, far too little to see.

Look at this face. Nothing moves, and the skin looks the same colour in every frame. Yet with each heartbeat, blood rushes into the skin and the colour shifts, very slightly.

How slightly? In a typical video, the change is well under one percent of the pixel value. On a scale of 0 to 255, that is often less than one step. Your eye cannot see it. A camera records it anyway, buried under sensor noise.

Illustrative: the synthetic clip adds 0.5 grey levels of green at 1 Hz, under noise of about 2 grey levels.

This is the idea of the whole explainer. The paper by Wu and colleagues (MIT, 2012) shows how to pick that tiny change out of ordinary video and make it big enough to see, without ever tracking the face.

Scroll to find out how, one piece at a time.

Interlude · before 2012

A signal hiding in plain sight

Two good ideas, two separate toolboxes.

Researchers had already noticed that skin colour wobbles slightly with each heartbeat. Earlier papers pulled a pulse rate out of ordinary video of a face, for example Verkruysse in 2008 and Poh in 2010. But those methods boiled the whole thing down to one number. You could read the rate, yet you could not see the blood move.

Meanwhile, a different idea existed for motion. In 2005, Liu and colleagues showed that tiny movements could be found and exaggerated. Two good ideas, two separate toolboxes, and a gap between them.

The fragile way to magnify motion

The 2005 approach followed motion the way you would follow a boat on a river. It estimated where each point in the picture moved, then pushed it further along.

That is costly to compute, and any mistake in the tracking shows up as visible glitches, especially at edges where objects pass in front of each other. The authors of the 2005 work needed extra steps, such as separating moving regions and filling in gaps, to get good pictures. The 2012 team named this the Lagrangian view, borrowing a term from fluid mechanics.

Chapter 2 · 2012

Follow it, or watch here

Do not follow the thing; watch one place and record it.

There are two ways to study something that moves. You can follow it, like a photographer tracking one bird across the sky. Fluid scientists call this the Lagrangian view. Or you can stand still and watch one spot, noting what flows past. That is the Eulerian view.

The MIT team flipped the viewpoint. Stand on a bridge and watch the water pass one fixed spot. They stopped tracking anything. The authors are Hao-Yu Wu, Michael Rubinstein, Eugene Shih, John Guttag, Frédo Durand and William Freeman, from MIT CSAIL, with Shih at Quanta Research Cambridge.

The paper takes the second view. It never tracks anything. It picks a pixel and writes down its value in every frame. That list of numbers, value against time, is a signal.

HoverTap the face to move the probe. The plot is that pixel's real green value in the synthetic clip.

Every pixel gives one signal. Everything else in this method works on those signals.

Chapter 3

Every signal is waves

Any signal is a stack of sine waves, shown as bars.

Take any wiggly line. You can build it by stacking simple waves, called sine waves. Each wave has a frequency, how many ups and downs per second, an amplitude, how tall it is, and a phase, where it starts.

Start with one slow wave. Add a faster, smaller one. The line begins to look more complicated. Add a third. Add a tenth, and you can draw almost any shape.

This works in reverse too. Given a wiggly line, the Fourier transform tells you exactly which waves it contains and how big each one is.

Draw one bar per frequency, with the height showing amplitude, and you get the spectrum. It is the same signal, seen as a recipe.

Switch waves off and on: the line and the bars change together.

Chapter 4

Sorting signals by frequency

Pulse, breath and noise sit at different frequencies, so we can separate them.

Now put real life into the spectrum. A resting heart beats about once a second, so it shows up near 1 Hz. Breathing is slower, about 15 to 20 breaths a minute, so it sits near 0.3 Hz.

Everything else is clutter. Sensor noise is spread across all frequencies. Mains lights flicker at a fixed, faster rate. Slow drift from changing daylight sits near zero.

Because these things live at different frequencies, the spectrum separates them. You do not need to know where the pulse is in the picture. You only need to know how fast it repeats.

HoverTap the spectrum to read any bar in hertz and beats per minute.

The paper suggests 0.4 to 4 Hz for a pulse, which is 24 to 240 beats per minute.

Chapter 5

Keep one band, drop the rest

A bandpass filter keeps one frequency window and erases everything else.

A temporal bandpass filter keeps the frequencies inside a chosen band and removes the rest. In the spectrum view, think of a window cut into a wall: bars in the window stay, bars outside are erased.

Apply that to our pixel signal and the wobbly line becomes a clean wave at the heart rate.

Drag the window's edges on the spectrum, or useUse the sliders below.

The ideal filter has a perfectly sharp edge. It is used for colour changes, and the paper builds it with a discrete cosine transform. But it needs the whole clip in memory.

The cheap alternative is the IIR filter. It uses two simple low-pass filters, one for the high cutoff and one for the low cutoff, and updates one frame at a time. Its edges are softer, so it lets in a broader band, but it can run live.

The IIR curve is the true response of the filter running here: the difference of two first-order low-pass filters, 0.4 and 3 Hz.

Chapter 6

Split the picture first

Split the picture by detail size, because coarse scales are cleaner.

Before filtering in time, the method splits each frame by spatial scale. Think of a Laplacian pyramid as a stack of copies of the picture. The top copy holds only coarse blobs, the broad shape of the face. Lower copies hold finer and finer detail, down to sharp edges and grain.

HoverTap a level to lift it out of the stack.

Why bother? Two reasons. First, noise. Camera noise is random from pixel to pixel, so averaging many pixels cancels it. A pulse changes smoothly across a whole cheek, so it survives the averaging. The coarse levels have a much better signal to noise ratio.

Second, how far each scale can be amplified safely differs. Fine detail breaks first. Chapter 7 shows why.

Chapter 7

Amplify, add, and why it works

Multiply the filtered change by alpha; it mimics motion only for smooth detail.

Now the simple part. Take the band-passed signal, multiply it by alpha, and add it back to the original. If alpha is 50, the 0.5 grey-level pulse becomes 25 and is easy to see.

The paper shows why this also magnifies small motions. For a tiny shift, the brightness at a pixel changes in proportion to the shift, so boosting the change looks like a bigger shift.

This also works for movement. Picture a blurry edge shifting a tiny bit to the right. Look at one pixel on the slope. As the edge moves, that pixel gets brighter or darker, in proportion to how steep the slope is. A small brightness change at a pixel is therefore a small shift in disguise. Boost the brightness change and the edge looks shifted much further.

That trick only holds while the shift is small compared with the blur. Fine, sharp detail breaks it, so alpha must shrink at fine scales.

Shift 0.1 px. Dashed: the true shifted curve. Solid: original plus alpha times the change.

Chapter 8

The whole pipeline in action

Split, filter in time, multiply, add; noise and big motion are the limits.

Here is the full recipe in one picture. Split each frame into spatial levels. For each pixel in each level, filter its signal in time to keep one band. Multiply by alpha, with smaller alpha at fine levels. Add to the original and rebuild the frame from its levels.

Turning the face red

The first showpiece was a face. The team kept only colour changes between 0.83 and 1 hertz, which is 50 to 60 beats per minute, blurred the picture slightly so random sensor fuzz averaged out, and multiplied the result by about 100. The video was filmed at 30 frames per second.

A calm, still face now flushed green to red in time with the heart, and you could watch blood fill the skin in waves. The CACM overview notes the true change is typically about half a grey level out of 256. They also filmed newborns, including at a hospital nursery, and checked the result against a hospital monitor.

For colour, use a narrow band around the pulse and amplify only coarse levels. The face blushes and pales with each beat. For motion, use a wider band and the limits of chapter 7. A breathing chest visibly rises, and a guitar string at its own frequency stands out.

It has limits. Noise is amplified with the signal, so a larger alpha means a grainier picture. Large movements break the small-motion assumption and leave ghosts.

Interlude · the demos

Motion nobody could see

Colour was only half of it. In the paper's motion examples, a sleeping baby's breathing was made clearer, a wrist showed its arteries pulsing (amplification 10, band 0.4 to 3 hertz), a subway scene was exaggerated on purpose, and a guitar's strings were picked apart one by one with narrow bands, for example 72 to 92 hertz for the low E string, at 600 frames per second.

In a separate follow-up summary, a building crane that looks perfectly still was shown to sway, with motion in the 0.2 to 0.4 hertz range magnified 75 times. The team even filmed a DSLR camera at 300 frames per second and showed the mirror's tiny shake, then checked it with a laser pointer.

Generated shapes, magnified for real here. Frequencies are illustrative, slowed to fit a 30 fps clip.

Chapter 9

Try it yourself

Choose the band and alpha, and watch what the filter reveals.

Now you drive. The clip on screen is synthetic: a face with a pulse at 1 Hz, and a chest breathing at 0.3 Hz.

Set the frequency band first. Put it around 1 Hz and the face starts to flush. Move it to 0.3 Hz and the chest comes alive instead. Put it somewhere with nothing in it, and you only amplify noise.

Then raise alpha. At first the effect grows. Push too far and you see grain, clipping, and distorted edges. That is the trade the paper describes.

Notice that the tool never looks for the face. It only looks at one pixel at a time.

Drag the line on the picture to compare original and magnified.

Interlude · after 2012

Release, and a wider world

The method was light enough for a prototype that ran live on a laptop, around 45 frames per second at 640 by 480, and the team posted code for it on the project page.

The paper was presented at SIGGRAPH 2012 and published in ACM Transactions on Graphics that July. Mainstream press followed in early 2013, with coverage in the New York Times and in Science.

Then the same group kept going. In 2013 came phase-based magnification, which handles bigger boosts with less noise. In 2014 came Riesz pyramids, a faster version that can run in real time, and the Visual Microphone, which recovered speech from tiny vibrations of a chip bag filmed with a fast camera.

Chapter 10

Beyond the paper

Later methods amplify phase, run faster, and read heart rate directly.

Pixel values are crude. Later work, by Wadhwa and colleagues, amplifies the local phase of a complex steerable pyramid instead. Phase tells you where an edge sits, so amplifying it moves the edge. In the authors' tests this allows about four times larger amplification, and noise is not amplified (SIGGRAPH 2013).

The Riesz pyramid does something similar with a much smaller, faster representation, real time on a laptop (2014).

And the pulse idea has its own life. Reading heart rate from a face camera is called remote photoplethysmography, or rPPG. The paper cites earlier work by Verkruysse and by Poh, which averages skin colour over the face and picks the strongest frequency.

Measured live on the synthetic clip: the mean green of a skin patch, its spectrum, and the peak times 60.

Honest limits

What it is not

It works best on small motions. Big movement produces ghosting, and cranking the dial too high clips brightness at edges. Noise gets amplified along with the signal, which is why the pulse demo blurs the picture first.

The pulse view is a visualization, and the authors do hint at possible medical uses, but the paper is a research method, not a clinical device. Related ideas, called remote photoplethysmography, are an active area of research and products, but this story keeps to what the sources show.

Comments

Sign in with GitHub to leave a comment or react.

← Portfolio