seperated calculation opticalflow matrix