In our extension of LCSeg, we use a similar method to consolidate different segments; however, in our case the linearity constraint is absent.
we approximate the optimal solution by spectral clustering (Shi and Malik, 2000).