Commit Graph

46 Commits

Author SHA1 Message Date
b005e36fcd Merge pull request 'Add additional image processing' (#1) from Yun/videocr:master into master
Reviewed-on: pradana.aumars/videocr#1
2021-07-13 16:16:53 +02:00
Yun
aec2b9c95a fixup 2021-07-13 10:20:47 +02:00
Yun
7f6881749f Add additional image processing
Ordered process:
1. dilation - thicken white portion of subtitles
2. resize - temporary hardcoded to 47% (assuming subtitles are 68 pixels in height)
3. apply hsv color mask - filter out non gray pixels and filter out pixels that are not bright enough
4. invert image - make it black text on white background
5. add border to top and bottom - assuming subtitles are cropped closely
2021-07-13 09:12:43 +02:00
edc1bc28a2 Fix indentation on last commit 2021-07-12 23:52:26 +02:00
5534ae317f Isolate subtitles as black over white background (kudos to u/Yun on hexbear.net) 2021-07-12 22:20:00 +02:00
Yi Ge
9b97c99657 version 0.1.6 2019-12-15 22:53:12 +08:00
Yi Ge
04561b96fb
update README 2019-12-15 22:44:55 +08:00
Yi Ge
8f8f2d6d79 print muted exception from multiprocessing pool 2019-12-15 22:29:13 +08:00
Yi Ge
7b607e5ca7 Merge branch 'dependabot/pip/pillow-6.2.0' of https://github.com/apm1467/videocr 2019-12-15 21:51:24 +08:00
Yi Ge
51ab92cca4 reformat setup.py 2019-12-15 21:49:57 +08:00
Yi Ge
f8e99465c7 move util functions to utils.py 2019-12-15 21:38:48 +08:00
Yi Ge
9360ebdd40 add adapter for OpenCV 2019-12-15 21:38:17 +08:00
Yi Ge
720c9d479f move download_lang_data to utils.py 2019-12-15 20:56:09 +08:00
dependabot[bot]
d5ff8dee63
Bump pillow from 6.0.0 to 6.2.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 6.0.0 to 6.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/6.0.0...6.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-22 23:40:36 +00:00
Yi Ge
8a56cbf746 version 0.1.5 2019-05-18 21:58:43 +02:00
Yi Ge
6025e09a87 update README 2019-05-17 17:46:43 +02:00
Yi Ge
da8cd05f08 use lazy map when performing parallel ocr 2019-05-17 16:26:06 +02:00
Yi Ge
c63e508623
update README 2019-05-01 05:43:59 +02:00
Yi Ge
eb29dd4d90 update README 2019-04-30 17:59:10 +02:00
Yi Ge
95da09ab7e add installation to README 2019-04-30 03:00:17 +02:00
Yi Ge
e4b07ebbbd add project long_description 2019-04-30 01:18:08 +02:00
Yi Ge
168c9cfd52 add setup files 2019-04-30 00:01:13 +02:00
Yi Ge
7ebf6a17f8 update README 2019-04-29 23:16:37 +02:00
Yi Ge
04ad4597ff support combining multiple languages 2019-04-29 22:29:49 +02:00
Yi Ge
94e2ca5b8e
update README 2019-04-29 17:02:35 +02:00
Yi Ge
3f6af992a5
update README 2019-04-29 05:00:25 +02:00
Yi Ge
1da8f73e30 add README 2019-04-29 04:14:35 +02:00
Yi Ge
64ef1f1289 remove pillow from Pipfile 2019-04-29 04:00:54 +02:00
Yi Ge
45b7ff52ce
add LICENSE 2019-04-29 03:56:43 +02:00
Yi Ge
efd7223624 make sim_threshold adjustable through api 2019-04-29 03:50:06 +02:00
Yi Ge
77362dce1a make conf_threshold adjustable through api 2019-04-29 03:05:02 +02:00
Yi Ge
a5e6845a1b move tessdata dir to ~/tessdata 2019-04-29 03:04:06 +02:00
Yi Ge
fba35f0108 auto download tesseract data file 2019-04-28 17:33:16 +02:00
Yi Ge
bccdcc02fc define module __init__.py 2019-04-28 17:31:43 +02:00
Yi Ge
bd6f15978b add api definition 2019-04-28 15:46:24 +02:00
Yi Ge
bc84ee39ff move video parameters to run_ocr() function 2019-04-27 21:41:19 +02:00
Yi Ge
3f73cb9bca adjust text similarity metrics 2019-04-27 03:18:59 +02:00
Yi Ge
a3986b3279 support ocr on part of the video 2019-04-27 00:31:32 +02:00
Yi Ge
e55c17c325 export subtitles to srt file 2019-04-27 00:31:32 +02:00
Yi Ge
99c58555ea install fuzzywuzzy 2019-04-26 00:34:28 +02:00
Yi Ge
f5d27a7a46 calculate PredictedSubtitle.text early 2019-04-26 00:32:47 +02:00
Yi Ge
3a73f1f508 merge new sub to the last subs if they are similar 2019-04-26 00:07:25 +02:00
Yi Ge
0d86e14fbc divide ocr of frames into subtitle paragraphs 2019-04-25 01:40:46 +02:00
Yi Ge
0e932936a1 add PredictedSubtitle model 2019-04-25 01:39:35 +02:00
Yi Ge
63873af476 add Video class 2019-04-24 21:18:31 +02:00
Yi Ge
57d1dc7b9b add initial models 2019-04-20 23:21:41 +02:00