In SwiftUI we have these nice properties that we can use for an Image: .saturation, .contrast, .brightness.
In my case I have a backend where I would want to apply the same exact effects using OpenCV.
Can I find the mathematical formulas anywhere? Any idea how can I achieve this?
Thank you!
These effects are accomplished using Core Image filters. There are descriptions of the functionality provided by those filters available in the Core Image documentation, but the exact mathematical formulas used to achieve the described functionality are unpublished.
Perhaps consider filing an enhancement request asking for documentation describing the exact mathematical formulas being used by the filters you are interested in emulating in other software. You can file an enhancement request using Feedback Assistant. Once you file the request, please post the FB number here.
If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?