Computation of optical flow is an important task in computer vision. Most of the modern methods for solving this problem assume the constancy of certain image features between frames. The most successful methods use several of these assumptions together. However, it often happens that at some locations only one of the assumptions is fulfilled. This reduces the accuracy of the result. In this talk I will show a possible solution to this problem based on local choice of the most suitable assumption.