1. A method of confidence estimation for optical flow comprising the steps of: computing a set of features for each pixel of an input image, wherein the set of features includes an image feature, a matching cost, and a flow feature, wherein the image feature includes an image gradient feature, wherein the flow feature includes a flow gradient feature, and wherein computing the set of features comprises: computing a gradient Gu of a U component of the optical flow; computing a gradient Gv of a V component of the optical flow; computing a cost (or distance) C0 corresponding to a best match; computing a Delta matching cost Cd; and computing a gradient magnitude Gm of the input image; computing a smoothed version of each feature of the set of features; constructing a feature vector for each pixel of the input based on the set of features and the smoothed versions of the set of features; computing a classifier score from the feature vector using a set of decision tree classifiers; and converting the classifier score into a confidence score, the confidence score representing a confidence of the optical flow.