Optical Flow
Analyze frame-to-frame motion with dense optical flow, residual camera compensation, confidence maps, motion trails, masks, direction fields, and vector diagnostics.
Compute dense optical flow between two consecutive frames with OpenCV WebAssembly. Use overlay view for visual explanation, direction field for motion direction, confidence map for flow reliability, motion trails for presentation-ready movement cues, motion mask for moving-region isolation, and optional camera-motion compensation when the frame pair includes handheld or pan movement.
How to Use Optical Flow
- Upload an image: Upload one of the formats listed by the tool (JPG, PNG, WebP) and wait for the local preview.
- Adjust settings and process: Upload the second frame, choose the visualization and motion controls, then compute motion between the two frames.
- Review and download: Review the result, then download it in one of the formats offered by this tool.
Frequently asked questions
What is optical flow?
Optical flow estimates the motion of each pixel between two consecutive images. It produces a 2D vector field showing how much and in which direction each pixel moved.
When should I use camera-motion compensation?
Turn it on when both frames include handheld shake, pan, or slight camera movement. Pixlane estimates the global frame transform in WebAssembly and shows residual local motion more clearly.
What is the motion mask view for?
Motion mask isolates regions whose displacement is above the threshold. It is useful for spotting moving objects, debugging stabilization, and preparing visual evidence for CV workflows.
What does the confidence map show?
Confidence map uses a forward/backward consistency check to show where the dense flow agrees with itself. Green areas are more reliable; red areas are likely unstable or ambiguous.
What does the direction field show?
Direction field maps flow direction to hue and flow magnitude to brightness, making dominant motion directions easier to compare across the frame.
Is my image uploaded?
No. Supported media processing happens in your browser using OpenCV compiled to WebAssembly. Supported image contents are not uploaded for processing.