layoutSegmentation implemented in opencv