Dart image processing function

Job ID: 35192713

Budget: €8 – €30 EUR

Hello everyone!
I need help with a project. More precisely, I only need one function.
The project is written in the Dart programming language with the Flutter framework. The specific function should, using the image package, process the photo so that it looks like it was scanned. More precisely, to increase contrast and brightness, black colors, etc. Something like the Adobe Scan app does.
I repeat I do NOT need a scanner app, nor edge recognition, but only that one function, whose input is Image and output Image.
I could probably do it myself, but playing with the parameters takes too much time and nerves, so I'll be happy to pay someone more capable than me to do it.
I have attached a photo where you can see what kind of results I want, and a photo of my actual function (which produces very bad results). Thanks in advance.
Related categories: Dart Image Processing Flutter