1. A method for determining a value of an adjustment parameter for adjusting an image, the method comprising: specifying a first function of a local attribute based on values of the local attribute in the image; specifying a second function of the local attribute and the adjustment parameter; calculating an object function value, with one or more programmable processors for each of two or more test values of the adjustment parameter, where calculating an object function value for each test value comprises: evaluating the first function and the second function at a plurality of values of the local attribute, where evaluating the second function includes using the test value; accumulating differences between the first and second function at the plurality of values of the local attribute according to a functional weight that depends on the value of the local attribute; based on the calculated object function values and at least one of the two or more test values, determining the value of the adjustment parameter for adjusting the image and storing the value in a memory.