# KLT tracker, reject tracked occluded points

I want to use KLT tracker for a visual odometry application. Thus, I only want to track object features. Currently I'm using OpenCV's implementation cv.calcOpticalFlowPyrLK().

I'm extracting Shi-Tomassi goodFeatures2Track and doing bi-directional checking (i.e. points tracked from frame a to b must be tracked from b to a as well), which filters several outliers.

However, when two objects intersect due to occlusion or reflections, a point is detected and tracked. these points usually slide along the edges of objects as frames pass, this makes sense given that KLT minimizes an appearance transform. However, they don't describe the structure of the environment being tracked.

I'm able to filter some of them using 5-point epipolar RANSAC for tracked points with long enough displacement, but tome of them remain.

Does anybody know how to filter these sliding tracked outliers?