How to adjust image curves

How can I apply an adjustment to incoming images similar to Adjust Curves in Photoshop?

this is not photoshop
(but a computer-vision library)
((barking at the wrong door))

To clarify I dont need an interactive solution like Photoshop, but rather I need to specify a correction curve to be applied before the rest of the processing. Surely, that isnt beyond the scope of opencv

you could do that with a look-up table. cv::LUT

Thanks, crackwitz. This looks promising

related: c++ - How to apply color correction curve in OpenCV - Stack Overflow

maybe you can try to explain, what you want to correct ?

Berak, the incoming video stream isn’t exposed properly such that it generally looks underexposed, and I want to apply a predefined curve to correct the brightness