Reema Balmiki
Reema Balmiki

Reputation: 145

How to get magic color enhance in flutter like camscanner

I am creating a application same as camscanner with flutter, but i am not able to enhance the image same like in camscanner in my flutter application.

This is the original picture of the image before applying the magic filter in camscanner.

Before enhancing

This is the enhanced picture of the same image after applying the magic filter in camscanner

Image after enhancing

How to achieve that in the flutter to create filter same like in camscanner

Upvotes: 4

Views: 1232

Answers (1)

MSD
MSD

Reputation: 154

I don't have experience with flutter development but can surely try to help you with processing images. I guess, you must also be trying to use OpenCV for image processing and so you may find this post helpful.

I have used Adobe Photoshop to figure out editing techniques required to achieve the scan effect and then implemented those operations using OpenCV.

In Photoshop, the Scanning effect can be achieved using the operations, "set white point" & "set black point" provided by "Levels" feature. Combination of these two operations result in the scan effect often regarded as "magic color" in various mobile apps.

Apart from this, High Pass Filter can be used along with above two operations to achieve some exciting results like shadow removal.

Scanning of documents in the "Black & White" mode can be achieved by processing the image in LAB color space using OpenCV.

Above mentioned operations can be implemented in OpenCV using various threshold techniques and few basic mathematical operations.

You can once go through the GitHub repository to get complete insight of what I am trying to say.

I have added a complete wiki documentation for the project in above repo.

This answer might not seem to be very informative but since the repo's wiki gives an elaborate discussion, I am keeping this post short.

Example of results we can achieve using these techniques: image 1

Markings in this image helps us to understand the type of output from each mode discussed in the GitHub repo: image 2

Upvotes: 2

Related Questions