This example demonstrates how to find the maximum value in a jit.matrix column using jit.submatrix and jit.3m.
Brightness and contrast are explained briefly in Jitter Tutorial 7: Image Level Adjustment. The common Jitter object for adjusting brightness, contrast, and saturation of an image is jit.brcosa. You might wonder, though, what math is used to adjust brightness and contrast. Brightness is just multiplication, so you could simply use the jit.op object with @op * as the argument (or the equivalent jit.*).