-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathREADME
More file actions
executable file
·24 lines (16 loc) · 960 Bytes
/
Copy pathREADME
File metadata and controls
executable file
·24 lines (16 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
DetectText
==========
Detect text with stroke width transform.
Dependencies: OpenCV, boost (only for text detection, not raw SWT).
To compile:
g++ -o DetectText TextDetection.cpp FeaturesMain.cpp -lopencv_core -lopencv_highgui -lopencv_imgproc -I/path/to/current/directory
where /path/to/current/directory is replaced with the absolute path to the current directory.
g++ -o swt_opencv SWT.cpp -lopencv_core -lopencv_highgui -lopencv_imgproc -I/Users/jaderberg/Desktop/DetectText -I/opt/local/include -L/opt/local/lib
To run:
./TextDetection input_file output_file dark_on_light
where dark_on_light is 1 or 0, indicating whether the text is darker or lighter than the background.
./swt_opencv IMG_2461.JPG swt.png 1 5 175 320 canny.png
Original GitHub repository:
https://github.com/aperrau/DetectText
More details on the algorithm can be found in:
http://www.cs.cornell.edu/courses/cs4670/2010fa/projects/final/results/group_of_arp86_sk2357/Writeup.pdf