MotionCrop
A video stabilization tool designed specifically for aircraft footage
Windows 64-bit • Command-line application
What is MotionCrop?
MotionCrop is a command-line video processing tool I created while flying with the US Unlimited Aerobatic Team. The problem: camera footage from aerobatic flights is often shaky and difficult to watch, even with modern camera stabilization.
MotionCrop analyzes footage frame-by-frame, identifies stable reference points (typically the aircraft), and crops each frame to keep that reference point centered. The result is smoother, more watchable footage that keeps the airplane steady in the frame.
How It Works
Built with C++ and OpenCV, MotionCrop uses computer vision to detect the aircraft and keep it centered:
- Converts each frame to HSV and isolates brightness data
- Applies Otsu thresholding and Canny edge detection
- Uses dilation to close edges and identify contours
- Detects the aircraft as the largest contour and calculates its center of mass
- Crops each frame around the aircraft's centroid
Best Use Cases & Limitations
Works Best With
- Clear sky backgrounds
- Aircraft as the main subject
- Consistent, trackable features
- Air-to-air formation footage
May Struggle With
- Ground visible in the frame
- Bright light sources or sun reflections
- Birds or other obstacles
- Cloud edges or smoke
- Unfocused footage or compression artifacts
Note: This is no longer being maintained. I experimented with some sophisticated AI solutions but technology is changing so fast I don't think it's worthwhile to continue for the moment. But it works as it is for many use cases!
See It In Action
Examples of MotionCrop processing footage from World Aerobatic Championships.
WAC 2022 - Olivier Masurel - Second Unknown
WAC 2022 - Rob Holland - Second Unknown
WAC 2022 - Rob Holland - First Unknown
WAC 2017 - Free Unknown 3
Usage
Run MotionCrop from the command line:
motioncrop filename [-w windowSize] [-t threshold] [-i iterations] [-v] [-nogui] Parameters
-w windowSize (default: 400, range: 50–5000) Crop dimensions in pixels. Larger values show more of the frame around the aircraft.
-t threshold (default: 1.0, range: 0.05–2.0) Edge detection sensitivity. Lower values reduce jitter but may lose tracking accuracy.
-i iterations (default: 2, range: 1–5) Dilation passes. Higher values decrease jitter by smoothing edges.
-v Enable verbose mode with debug output and additional processing windows.
-nogui Run in batch mode without GUI preview. Useful for processing multiple files.
Output saves as {filename}_mcrop.avi using DivX codec.
Get MotionCrop
Download the latest version and start stabilizing your aircraft footage.