The algorithm first calculates dense optical flow by minimizing the sum of absolute differences(SAD) to calculate disparity. Assuming the background is relatively static, we can limit the optical flow computation time by only computing the flow for pixels that appear to move. So we first do simple three-frame motion detection, then calculate flow at the locations of significant motion. Once the flow is calculated, it is segmented by a clustering algorithm into 2D elliptical"motion blobs." See Figure 4 for an example of the segmented flow and the calculated flow blobs. Since we are primarily interested in the few dominant motions, these blobs (and their associated statistics) are sufficient for subsequent recognition.