Ieee Transactions on Pattern Analysis and Machine Intelligence 1 Learning a Confidence Measure for Optical Flow