I have an image and wish to apply a filter to it for my document scanning flutter app.
This is the original image:
However, to achieve this I had increased contrast to 0.8 and decreased saturation to -0.5 using the photofilters package.
Following is my result:
What I want to achieve is to remove any light shade color and make it white so as to differentiate text from the background as you can infer from the above said images. Is there any image processing technique that is well suited for this operation? And if yes, then how can I achieve this in flutter?


