An optical flow sensor is a small downward-facing camera with its own processor that measures how the texture of the ground appears to move between consecutive frames and converts that motion into an estimate of horizontal velocity. In drones, it is one of the core navigation & sensors components that keeps a multicopter holding position indoors, at low altitude or without satellite reception.
The sensor does not know where the aircraft is on a map. It reports how fast the image is sliding, and the flight controller combines that with height above the ground and gyroscope data to work out lateral speed in meters per second. Drift is then corrected by a velocity control loop rather than by absolute coordinates.
How an optical flow sensor measures motion
An optical flow sensor estimates velocity by comparing successive low-resolution images of the surface below and finding how far patterns have shifted. The classic designs descend from optical mouse chips: a tiny image array, often only 30 x 30 pixels, sampled at hundreds to several thousand frames per second, with on-chip correlation that outputs a pixel shift in X and Y for each interval.
A pixel shift alone is an angular rate, not a speed. The flight controller must apply two corrections. First, it subtracts the image motion caused by the aircraft rotating rather than translating, using the gyroscope; a pitch change of a few degrees makes the ground appear to slide even when the drone is stationary. Second, it multiplies the corrected angular rate by the distance to the ground, usually supplied by a co-located rangefinder such as a time-of-flight or ultrasonic module.
The basic relationship is simple: lateral velocity equals flow rate times height. The same 1 degree per second of flow means about 1.7 centimeters per second at 1 meter and about 17 centimeters per second at 10 meters, which is why height accuracy directly limits velocity accuracy.
The table below lists the main parts of a typical optical flow module and what each contributes to the estimate.
| Component | Typical specification | Role in the estimate |
|---|---|---|
| Image sensor | 30 x 30 to 64 x 64 pixels | Captures ground texture for correlation |
| Lens | Narrow field of view, about 40 to 45 degrees | Sets angular resolution per pixel |
| Flow processor | Hundreds to thousands of frames per second | Computes pixel shift and quality value |
| Rangefinder | Effective to about 2 to 8 m indoors | Scales angular flow into meters per second |
| Gyroscope (in the flight controller) | Rotation rate at high sample rate | Removes flow caused by body rotation |
Key parameters and operating limits
The performance of an optical flow sensor depends less on resolution than on surface texture, light level and height. Most modules report a quality metric, typically from 0 to 255, that tells the flight controller how much trust to place in each reading; navigation filters usually reject data below a configured quality threshold.
The following table summarizes the parameters that most strongly affect reliability and what values are typical for consumer and hobby hardware. Exact figures vary by chip and lens, so treat the ranges as orientation rather than guarantees.
| Parameter | Typical working range | What happens outside it |
|---|---|---|
| Height above ground | About 0.1 to 8 m, best below 3 m | Flow becomes too small to resolve |
| Illumination | Indoor lighting or better | Noise rises and quality drops |
| Ground texture | Visible grain, patterns or contrast | Correlation fails on blank surfaces |
| Maximum flow rate | Several radians per second | Fast motion causes saturation |
| Update rate to controller | Commonly 10 to 100 Hz | Slow updates weaken drift correction |
Some systems add infrared illumination to work in dim rooms, and some carry a separate gyroscope on the module to reduce timing mismatch. Integration with an extended Kalman filter, as in common open-source autopilots, lets the aircraft blend flow with inertial data and fall back gracefully when quality degrades.
How optical flow compares with other drone positioning methods
Optical flow is a relative velocity sensor, which separates it from systems that deliver absolute position. It complements rather than replaces GNSS, and it is simpler than full camera-based localization. Neighboring Terms in this Topic, such as the vision positioning system and visual-inertial odometry, build on the same principle with more cameras and more computation.
The comparison below places optical flow alongside the other methods a drone may use to stay where the pilot left it.
| Method | Output | Strength | Main weakness |
|---|---|---|---|
| Optical flow sensor | Relative velocity | Low cost, works without satellites | Needs texture and low altitude |
| GNSS receiver | Absolute position | Global coverage outdoors | Fails indoors and near structures |
| RTK GNSS | Absolute position to centimeters | Survey-grade accuracy | Needs correction data link |
| Vision positioning system | Velocity and height | Stereo depth adds robustness | Still depends on light and texture |
| Visual-inertial odometry | Full pose estimate | Works at greater heights | Higher processing load and drift over time |
In practice, many consumer aircraft package a downward flow camera with a time-of-flight or ultrasonic rangefinder and market the combination under a single positioning label. The physics underneath remains the flow-times-height calculation described above.
Installing and tuning an optical flow sensor
Correct installation determines whether an optical flow sensor helps or harms flight stability. The module must face straight down with a clear view, sit away from propeller wash that throws dust, and be oriented to match the axes the firmware expects; a rotated or mirrored mounting produces velocity estimates with the wrong sign, which turns position hold into an accelerating drift.
On open autopilots, setup usually involves a few steps that confirm the data before trusting it in flight.
- Mount the module and rangefinder rigidly, with minimal vibration and no obstruction from landing gear.
- Set the sensor orientation and enable it as a velocity source in the navigation filter.
- Rock the aircraft by hand and confirm that gyro compensation cancels rotation-induced flow.
- Run a short calibration flight and adjust the flow scaling factor until estimated and actual movement agree.
- Set the minimum quality threshold so that poor readings are rejected rather than used.
The decision table below helps choose when to rely on flow and when to prefer another source.
| Situation | Recommended source | Reason |
|---|---|---|
| Indoor warehouse inspection | Optical flow with rangefinder | No satellite signal, textured floor |
| Hover over calm water | GNSS or manual control | Moving surface gives false flow |
| Mapping flight at 100 m | GNSS or RTK | Flow cannot resolve at that height |
| Low pass under a bridge | Optical flow as backup | GNSS multipath and signal loss |
| Night flight over dark grass | Avoid flow-based hold | Too little light and contrast |
Failure modes and common misconceptions
Most optical flow problems come from the surface or the light, not from the electronics. Pilots who understand the failure modes can predict when position hold will become unreliable and take manual control early.
- Featureless surfaces such as polished floors, snow or uniform carpet give the correlator nothing to track, so the drone slowly wanders.
- Water and moving grass create apparent motion that is not the aircraft moving, which can push the drone in the wrong direction.
- Reflections and flicker from mains-powered lighting may produce noisy flow values on some sensors.
- Climbing too high shrinks the flow signal below the noise floor; height hold may still work while lateral hold fails.
- A common misconception is that optical flow gives absolute position. It integrates velocity, so position error accumulates over long hovers.
- Another misconception is that more pixels always help. Texture and frame rate matter far more than resolution for this task.
When a drone switches unexpectedly from flow-based hold to an attitude-only mode, the cause is usually a quality drop below threshold. Recognizing that warning and keeping distance from obstacles is the safest response.
The short version
An optical flow sensor is a tiny camera under the drone that watches the floor. If the floor seems to slide to the left, the drone knows it is drifting to the right and pushes back. This is the same idea a computer mouse uses to follow your hand across a desk.
The key takeaway is that it measures movement, not location. It works best close to the ground, in decent light and over a surface with some pattern. Over plain white tiles, water or in the dark, it loses its grip, and the drone may start to wander.
Where it makes a difference
A facility manager uses a small quadcopter to inspect high shelving inside a steel-roofed warehouse, where no satellite signal reaches the aircraft. The drone carries an optical flow camera and a time-of-flight rangefinder and flies at about 2 meters above a concrete floor marked with painted lines and tire scuffs, which gives the sensor plenty of texture.
With flow-based hold enabled, the pilot can stop beside a rack, release the sticks and photograph labels while the aircraft drifts by only a few centimeters. When the route crosses a freshly sealed, glossy section of floor, the quality value drops and the drone begins to slide; the pilot recognizes the warning and moves back over the textured area. The outcome is a complete inspection in about 15 minutes without ladders or a lift, and the team adds the glossy zone to its pre-flight briefing.