In this recipe, we consider a special case of optimization problems, problems with linear constraints. These tasks imply that you need to optimize (maximize or minimize) a linear combination of positive variables, taking into account a set of linear constraints. Linear programming doesn't have well-known and direct applications in computer vision, but you may encounter it somewhere down the road. So, let's see how you can deal with linear programming problems using OpenCV.
Linear programming with the simplex method
Getting ready
Before you proceed with this recipe, you need to install the OpenCV 3.0 (or greater) Python API package.