Rank estimation of trajectory matrix in motion segmentation