cv2.solveLP accepts three arguments: a function's weights, a linear constraints matrix, and a NumPy array object to save results. Weights are represented with an (N,1) or (1,N) vector of float values. The length of this vector also means the number of optimized parameters. The linear constraints matrix is an (M, N+1) NumPy array, where the last column contains constant terms for each constraint and each row, except the last element, which contains coefficients for the corresponding parameters. The last argument is intended to store the solution if it exists.
In general, there are four possible outcomes for linear programming problems, they may have a single solution, many solutions (in some range), or no determined solutions at all. In this latter case, the problem may be unbounded or unfeasible. For all four of these results, cv2.solveLP returns a corresponding value: cv2.SOLVELP_SINGLE, cv2.SOLVELP_MULTI, cv2.SOLVELP_UNBOUNDED, or v2.SOLVELP_UNFEASIBLE.