How to add constraints to a linear set of equations

45 Views Asked by At

I am trying to implement a method from this paper. The image (link) below shows the problem.

Minimization problem

As they describe it, the matrix D is a coefficient matrix, x is the vecotr of unknown variables, and d is a vector of values, mostly 0's but also a few values between 0-1.

Then below they have the constraints, Ax ≤ c .

They state that "The term Ax ≤ c represents the constraints (as function of the estimated coefficients) for all the pixels in all the images in the set. Each pixel must fulfill two constraints."

In the paper they go on to show that the matrix A should contain the minimum and maximum pixel values for each image (rather than including an equation for each image pixel), with one equation for each (so 1 EQ for the max. pixel value of image 1, and 1 EQ for the min. pixel value of image 1, and so on for all n images).

Given that they say that the constraints are a function of the estimated coefficients, I don't think I can just add a set of equations into the system of equations represented by D can I? How would one best go about implementing the constraints?

I am trying to perform this in Python, so if anyone also has some pointers on which function might be best suited for this problem I would appreciate it.