You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## This script is used to generate a scanned copy of the image provided.
4
+
5
+
+ On running this script, a scanned file of the orignal image is generated after applying Adaptive Thresholding.
6
+
7
+
+ It is effective when an image has different lighting conditions in different areas. Here, the algorithm determines the threshold for a pixel based on a small region around it. So we get different thresholds for different regions of the same image which gives better results for images with varying illumination.
8
+
9
+
+ And this is what done in the script, multiple threshold values are set up in order to give image a scanned and enhanced look.
10
+
11
+
12
+
## To run the script:
13
+
14
+
1. Setup a virtual environment.
15
+
2. Install the dependencies by running ```pip3 install -r requirements.txt```
16
+
3. Run the script.
17
+
18
+
```sh
19
+
python camscanner.py \<filename\>
20
+
```
21
+
22
+
## References:
23
+
24
+
For Thresholding, consider going through [OpenCV Doecumantation](https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_thresholding/py_thresholding.html) and this [Article](https://medium.com/@anupriyam/basic-image-thresholding-in-opencv-5af9020f2472).
0 commit comments