The rectangle behind the lens

Texture reads a vibration the frame rate does not divide

A rolling camera's vibration was read from one ruled post, an object whose rulings are known to be evenly spaced. A real frame holds texture whose true place is unknown. Between two frames a patch of texture moves by the difference of the camera's pitch at its two read times, a wave in the row that does not depend on what the patch shows or how far away it is; 192 patches read to 0.3 px give the vibration back well enough to turn other objects to within 0.048 px of a still camera's picture, better than the ruled post's 0.084. But the difference is the vibration multiplied by 2|sin(πνP)|, so a vibration that the frame rate divides, the earlier essays' own 120 Hz at 30 frames a second, leaves every frame wobbled alike and nothing to read, and one that nearly divides it is read so weakly that the correction makes the frame worse. A third frame rescues a near miss; only another frame rate rescues an exact one.

Worth reading first: Every row is a different camera · A frame is an interval.

A vibrating frame is turned back by its own reading took a rolling camera pitching 0.3° as a sine while its rows are read, the frame of a vibrating camera writes its frequency down every post, and read the vibration’s frequency, amplitude and phase from one ruled post. Every row of the frame was then turned back by the angle the camera had when that row was read, and four other posts at depths from 3 to 40 metres came back from 2.57 px off a still camera’s picture to 0.086. The reading’s own noise set what was left, a second frame tied by the frame period pinned the frequency three times more finely, and past the fold no angle could return a row that held several world rows.

Everything was read from a post whose rulings are known to be evenly spaced. Real frames seldom hold one. What they hold is texture: edges a still camera would have drawn somewhere unknown, which the vibration has drawn bunched and spread. The essay closed on whether texture is enough, read not within one frame but between two: a patch’s displacement from one frame to the next depends on the difference of the vibration’s angle at the two read times of its row and on nothing about where the patch is. The questions were how well frequency, amplitude and phase come back from that difference alone, since a vibration that divides the frame rate exactly leaves no difference between frames at all; and whether a third frame, or a frame rate that does not divide the vibration, restores what the second frame could not see.

What moves between two frames

Between two frames each patch of texture moves by the difference of the camera's pitch at its two read times: a wave in the row, whatever the patch showsA rolling camera pitching 0.3° at 110 Hz, frames 1/30 s apart, a scene of 192 patches of texture at four columns and depths from 3 m to 43 m. Each patch's vertical move from one frame to the next, read to 0.3 px (dots), against the row it is drawn at, and the move the vibration predicts, f·(1 + y²/f²)·[a(t + P) − a(t)] (curve): a sine in the row with the vibration's own frequency, its size 2|sin(πνP)| = 1.73 times the vibration's. Patches at different depths on one row move alike, so nothing about the scene is needed.-505-1000100row the patch is drawn at in the first frame (px from the middle)its move into the next frame (px)patches, read to 0.3 pxthe vibration's difference110 Hz, frames 1/30 s apartpitch 0.3°
Fig. 1 A rolling camera pitching 0.3° at 110 Hz, frames 1/30 s apart: each of 192 patches of texture, at four columns and depths from 3 to 43 m, by its vertical move from one frame to the next, read to 0.3 px, against the row it is drawn at, with the move the vibration predicts.

The camera is the earlier essays’: 55° across, 690 by 400 pixels, read from the top row to the bottom over 1/30 second, pitching about its lens. A pitch about the lens moves a point’s picture by the focal length times the angle, a little more toward the frame’s top and bottom, and by the same amount whatever the point’s depth, which is why every row is a different camera whose difference from its neighbours is a turn and not a step.

So a patch drawn at row yy in one frame and at the same row in the next has moved by

d(y)≈f(1+y2f2)[a(ty+P)−a(ty)],d(y) \approx f\left(1 + \frac{y^2}{f^2}\right)\left[a(t_y + P) - a(t_y)\right],

where a(t)a(t) is the pitch, tyt_y the time row yy is read in the first frame and PP the frame period. Nothing in it depends on the patch: not what it shows, not how far away it is, not where it would have been without the vibration. Every patch on a row moves alike, and a scene with patches at many rows draws the difference out across the frame as a wave.

For a sine, a(t)=Asin⁡(2πνt+φ)a(t) = A\sin(2\pi\nu t + \varphi), the difference is itself a sine of the same frequency,

a(t+P)−a(t)=2Asin⁡(πνP)cos⁡(2πνt+φ+πνP),a(t + P) - a(t) = 2A\sin(\pi\nu P)\cos(2\pi\nu t + \varphi + \pi\nu P),

the vibration multiplied by 2sin⁡(πνP)2\sin(\pi\nu P) and shifted in phase. Reading that wave gives the frequency directly and the amplitude and phase once the known factor is divided out. The opening figure draws it at 110 Hz, where the factor is 1.73: the patches scatter about the predicted wave by their 0.3 px reading error, and the wave’s size, about twelve pixels from crest to trough, is the vibration’s, read without anything in the scene being known.

Texture does better than the post

The reader is the earlier essay’s turned inside out. At each trial frequency it fits the wave’s two components to the patches’ moves by least squares, along with a constant and a slope in row for anything else that moved between the frames, a drifting camera or a passing cloud’s shadow; the frequency is the one that fits best; the factor 2sin⁡(πνP)2\sin(\pi\nu P) is divided out; and every row is turned back by the vibration so read. The test is the earlier essay’s: four other posts, at depths from 3 to 40 metres, none of which took part in the reading, measured against where a still camera draws them.

Texture read between frames turns the frame back better than the ruled post did, except near a vibration that the frame rate divides, where it fails and then makes things worseOther objects' rms distance from a still camera's picture after the frame is turned back by the vibration texture reads, 192 patches read to 0.3 px, against the vibration's frequency, with frames at 30 a second. Two frames (solid): 0.048 px at 110 Hz, 0.314 px at 118, 1.940 px at 119, no vibration at all at 120 Hz, which leaves the frame as it was, 16.497 px at 121 and 0.078 px at 125 Hz. Three frames (dashed): 0.583 px at 119, none at 120, 0.698 px at 121. Untouched the frame is 2.57 px out (upper line); turned back by one ruled post read to 0.3 px, 0.089 px (lower line). Readings past 30 px are drawn at the top.0.1110100110120130140the vibration's frequency (Hz), frames at 30 a secondrms left after turning back (px)untouchedone ruled post2 frames3 frames192 patches read to 0.3 px16 readings a point
Fig. 2 Other objects’ rms distance from a still camera’s picture after turning back by the vibration texture reads, against the vibration’s frequency from 100 to 140 Hz, from two frames and from three, with the untouched frame and one ruled post for comparison. The slider changes the patches’ reading error.

At 110 Hz, 192 patches read to 0.3 px bring the other posts from 2.52 px off a still camera’s picture to 0.048 px. The ruled post, read to the same 0.3 px at the same frequency, brought them to 0.084. Texture does better than the instrument it replaces, for a plain reason: there is far more of it. The post’s forty rulings along one column are forty readings of the wave; the scene’s 192 patches are 192, and they cover four columns, so their errors average down further. The frequency comes back to 0.11 Hz and the amplitude to 1.1%. At 100, 108, 125, 135 and 140 Hz the story is the same, between 0.04 and 0.10 px, with the frame’s two periods sometimes a little behind the post and mostly ahead.

The reading’s error scales with the patches’ own. Read to 0.1 px, which careful patch matching on a well-textured scene reaches, the posts come back to 0.025 px; to 0.2 px, 0.036; to 0.5 px, 0.076; to a whole pixel, 0.15. That is the slider on the figure. So the first answer is that texture is enough, and more than enough: wherever the difference between frames is large, two frames of an unruled scene read a vibration better than a ruled post in one.

How much texture is enough has an answer too. With patches on every eighth row, 192 of them, the posts come back to 0.048 px; on every sixteenth row, 96 patches, to 0.062; every thirty-second, 48 patches, to 0.109, a little worse than the post; every sixty-fourth, 24 patches, to 0.77. The first three fall roughly as one over the square root of the count, as readings that average should. The last does not: with a patch only every 64 rows the wave, four cycles over the frame’s 400 rows, is sampled about twice a cycle, and the reader can no longer tell the vibration’s frequency from its aliases. The rows the texture occupies have to sample the vibration’s cycle, not merely be numerous, which is a requirement no single post had to meet in its own column and which a sky or a blank wall across a band of rows fails. The factor that multiplies the pitch toward the frame’s top and bottom, the one by which a pitch draws the last rows tallest, gives patches near the edges a little more weight in the reading than those in the middle.

Where the frame rate divides the vibration

The figure’s peak is the other half of the answer. The earlier essays’ vibration was 120 Hz, and the frames come at 30 a second: four whole cycles of the vibration pass between one frame and the next, νP=4\nu P = 4, and sin⁡(πνP)\sin(\pi\nu P) is zero. Every frame is wobbled exactly alike. Every patch is drawn in the same place in both, the difference is zero everywhere, and there is nothing to read.

Frames j periods apart see the vibration multiplied by 2|sin(πνjP)|, which is zero for every j when the vibration is a multiple of the frame rateThe factor by which the difference between two frames, j frame periods apart, carries the vibration, against its frequency with frames at 30 a second: 2|sin(πνjP)|. One frame apart (solid) it is 1.73 at 110 Hz, 1 at 115 and 125 Hz, 0.21 at 119 and 121 Hz and zero at 120 Hz. Two frames apart (dashed) it is 0.42 at 119 and 121 Hz, three apart (dotted) 0.62: further frames see a near miss better, and see an exact multiple no better at all.00.50011.502100110120130140the vibration's frequency (Hz), frames at 30 a seconddifference against the vibration, 2|sin(πνjP)|1 frame apart2 frames apart3 frames apartframes 1/30 s apartdotted vertical: 120 Hz
Fig. 3 The factor 2|sin(πνjP)| by which frames j periods apart carry the vibration, against its frequency, with frames at 30 a second, for frames one, two and three periods apart.

At 120 Hz the reader finds no vibration and leaves the frame as it was, 2.57 px off; the earlier essay’s ruled post, reading within one frame, had no such trouble, because a post’s known spacing is a reference that a single frame carries. Near 120 Hz it is worse than finding nothing. At 118 Hz the factor is 0.42, the difference is less than a quarter the size of the vibration, and the reading’s error is magnified accordingly: 0.31 px left. At 119 Hz the factor is 0.21 and the reader leaves 1.94 px, little better than not turning back at all. At 121 Hz it leaves 16.5 px: the amplitude read is several times too large on average, because the noise divided by a small factor is large, and the frame turned back by it is six times worse than the frame left alone.

That is a property of the measurement, not of the reader. A difference between two frames sees only what changed, and a vibration that the frame rate divides does not change from frame to frame. Near such a frequency the change is small, the reading of it is as noisy as ever, and dividing by the small factor to recover the vibration multiplies the noise. A reader that does not check the factor before dividing by it will, close to a multiple of the frame rate, correct a frame into something worse than it was. The check is cheap: the factor is 2∣sin⁡(πνP)∣2|\sin(\pi\nu P)| at the frequency just read, and a reading whose factor is under about a third should not be trusted.

A third frame sees a near miss

A third and a fourth frame rescue a vibration that nearly divides the frame rate, by seeing it across two and three periods; none rescues one that divides it exactlyVibrations from 116 to 124 Hz, frames at 30 a second, 192 patches read to 0.3 px. Read from two frames (solid): 0.314 px at 118 Hz, 1.940 px at 119, 16.497 px at 121, 0.439 px at 122. Three frames (dashed): 0.147 px, 0.583 px, 0.698 px, 0.230 px. Four (dotted): 0.100 px, 0.295 px, 0.543 px, 0.139 px. At 120 Hz no number of frames reads anything.0.030.10.3131030116118120122124the vibration's frequency (Hz)rms left after turning back (px)2 frames3 frames4 framesframes 1/30 s apartdotted vertical: 120 Hz
Fig. 4 Vibrations from 116 to 124 Hz, frames at 30 a second, 192 patches read to 0.3 px: the rms left after turning back by the vibration read from two, three and four frames.

A third frame is two periods from the first, and the difference between them carries the vibration multiplied by 2∣sin⁡(2πνP)∣2|\sin(2\pi\nu P)|, twice as large as the first difference’s for a frequency near a multiple. A fourth frame, three periods away, carries it three times as large. Fitted together, all the differences against the first frame share one amplitude and phase, and the reading takes the larger ones’ strength.

At 119 Hz two frames left 1.94 px; three leave 0.58; four, 0.30. At 121 Hz, 16.5, 0.70 and 0.54. At 118 and 122 Hz, where two frames already read something, three and four bring the residual to 0.15 and 0.10, and 0.23 and 0.14 px. The further frames do exactly what the factor says: the longest difference in the set grows with each frame added, and the reading follows it.

At 120 Hz itself they do nothing. Frames one, two and three periods apart are all a whole number of the vibration’s cycles apart, every factor is zero, and no number of frames at 30 a second has any difference to read. So the second answer divides. A third frame restores what the second could not see if the vibration only nearly divides the frame rate; if it divides it exactly, every further frame is the same picture again.

Another frame rate sees an exact one

A 120 Hz vibration is read from texture at 25 or 27 frames a second and not at 20, 24 or 30, nor at 29.97, where the difference is a fortieth of the vibrationThe vibration of the earlier essays, 120 Hz, with the rolling readout kept at 1/30 s and the frames taken at other rates; 192 patches read to 0.3 px, two frames. The rms left after turning back: 20 frames a second 2.563 px (factor 0.000); 24 frames a second 2.556 px (factor 0.000); 25 frames a second 0.077 px (factor 1.176); 27 frames a second 0.125 px (factor 1.970); 29.97 frames a second 2.811 px (factor 0.025); 30 frames a second 2.551 px (factor 0.000). A rate the vibration's frequency divides into a whole number shows no difference between frames; 29.97 frames a second is 4.004 periods of the vibration a frame, and its difference is too small to read.0.030.10.313103020 frames a second2.563 px24 frames a second2.556 px25 frames a second0.077 px27 frames a second0.125 px29.97 frames a second2.811 px30 frames a second2.551 pxrms left after turning back (px, logarithmic)120 Hz, readout 1/30 s
Fig. 5 A 120 Hz vibration, the readout kept at 1/30 s and frames taken at 20 to 30 a second: the rms left after turning back by the vibration two frames read.

What sees an exact multiple is a frame rate that is not a divisor of it. The readout stays at 1/30 second, since it is a property of the sensor; what changes is how long the camera waits between frames. At 25 frames a second a 120 Hz vibration runs 4.8 cycles a frame, the factor is 1.18, and two frames of texture bring the frame to 0.077 px, as well as at any other frequency. At 27 frames a second, 4.44 cycles a frame and a factor of 1.97, 0.125 px. At 20 and 24 frames a second, six and five cycles, the factor is zero again and nothing is read.

The interesting case is 29.97 frames a second, the rate a camera following the old broadcast convention takes instead of 30. A 120 Hz vibration then runs 4.004 cycles a frame, the factor is 0.025, a fortieth of the vibration, and the reading is lost or wild: 2.81 px left, worse than untouched. A rate a hair off a divisor is no better than the divisor. What the reading needs is a frame period whose cycle count has a fractional part well away from zero and one, which for a known machine vibration is a matter of choosing the frame rate, and for an unknown one a matter of taking frames at two different rates and trusting the pair whose factor is larger.

What the reading assumed

The vibration is a single sine about the lens, steady over the frames read. A vibration whose amplitude or frequency drifts between frames leaves a difference that is not a sine, and the earlier essay’s single-frame reading would follow a drift that two frames average away. A scroll camera rings with its suspension is the case of a vibration with more than one frequency, which would need a reader fitting each.

Every patch is matched between frames to 0.3 px. Real texture matches better or worse depending on what it is, and on a patch’s own motion: a leaf moving in the wind moves between frames for reasons of its own, which the fit would take for the vibration unless it is a small share of the patches or is rejected by its misfit. The drift terms absorb anything that moves every patch alike.

The scene does not move. A camera travelling or turning between frames moves every patch by a smooth amount, which the drift terms take out only if it is linear in the row; a turning frame can be straightened is the case where the turn is steady and itself rolls through the rows, and a frame’s shear knows travel only over depth the case where travel makes the move depend on depth, which a patch’s move here never does.

The frame is short of the fold. Past it a patch can be drawn more than once in a frame, and those patches are dropped; the earlier essay found that no angle returns such a row in any case.

Two references a rolling frame can carry

A rolling frame’s damage has to be measured against something. The earlier essays used a ruled post, a reference in space: its rulings say where the rows should be, so one frame suffices, and its weakness is that the scene must contain one. Texture between frames is a reference in time: the same scene in a second picture says how the rows moved since the first, and its weakness is that it sees only what changes. A frame is an interval, and a vibration in step with the frame rate is the one thing the interval between frames cannot see. Where the two references overlap, at frequencies the frame rate does not divide, texture is better because there is more of it; where they do not, a post or a change of frame rate is the only way to see anything at all.

Still open: whether the frame’s own readout can read a vibration the frame rate divides

A vibration that the frame rate divides is invisible between frames because every frame is read at the same phase of it. Within a frame it is not invisible: the rows are read over the whole of the frame period, and the vibration bunches and spreads them as it goes, which is what the ruled post read. Without a post, the scene’s texture is distorted by an unknown amount at every row, and a single frame cannot tell a distorted texture from a texture that is simply like that.

The measurement that settles it takes two cameras, or one camera whose readout runs top to bottom in one frame and bottom to top in the next, as some sensors can, so that a row read early in one frame is read late in the other; asks whether the difference between those two frames, which a vibration in step with the frame rate no longer cancels, gives the vibration back from texture alone; and how well, against two frames of an ordinary camera at a frame rate the vibration does not divide.

Between two frames of a rolling camera, a patch of texture moves by the difference of the camera’s pitch at its two read times, whatever the patch shows and however far away it is, so texture reads a vibration without any reference in the scene. 192 patches read to 0.3 px turn other objects back to within 0.048 px of a still camera’s picture at 110 Hz, better than one ruled post’s 0.084. But the difference is the vibration multiplied by 2|sin(πνP)|: a vibration the frame rate divides, 120 Hz at 30 frames a second, leaves every frame alike and nothing to read, and one that nearly divides it is read so weakly that the correction makes the frame worse, 16.5 px at 121 Hz. A third and a fourth frame rescue a near miss, to 0.70 and 0.54 px; only a frame rate the vibration does not divide, 25 a second, rescues an exact one.

What links here

Computed from the collection, not written here: the essays that point at this one.

Named objects

A flat tag is an object no other essay names yet.

Aliasingleast squaresReadoutRolling shutterVibration