using opencv to solve linear system