Commit graph

128 commits

Author SHA1 Message Date
Andrey Golovizin
3ed91dff53 Rewrite diacritic detection code, apostrophes are now detected correctly. 2014-08-25 16:23:17 +02:00
Andrey Golovizin
c5d04ff6aa Add Image.fits() and PageObject.fits(). 2014-08-25 16:22:01 +02:00
Andrey Golovizin
00a6b14e4c Show baselines in GUI. 2014-08-25 16:21:08 +02:00
Andrey Golovizin
9b8a52e4c0 Line._combine_diacritics(): do not lose freestanding diacritic-like symbols. 2014-08-25 16:02:26 +02:00
Andrey Golovizin
7c6faa6acd Decrease minimal line interval. 2014-08-25 16:01:29 +02:00
Andrey Golovizin
dd847b4e98 Tweak diacritic detection to include ? and ! characters. 2014-08-25 15:30:28 +02:00
Andrey Golovizin
4f621493e5 Line.baseline: fix detecting baselines at image boundaries. 2014-08-25 15:30:10 +02:00
Andrey Golovizin
6d2a6b325b Use ordered dict for storing glyphs. 2014-08-25 15:29:01 +02:00
Andrey Golovizin
4f435b3a38 Tweac diacritic detection: decrease right-side detection window. 2014-08-25 14:04:09 +02:00
Andrey Golovizin
fa4e76e256 Show filename in window title. 2014-08-25 13:57:49 +02:00
Andrey Golovizin
4bb1513cd9 Fix a typo. 2014-08-25 13:52:24 +02:00
Andrey Golovizin
9322bc1283 Open image files in alphabetical order. 2014-08-25 13:49:31 +02:00
Andrey Golovizin
ce11d6e097 Tweak diacritic detection: diacritic should not be below letter top. 2014-08-25 13:49:16 +02:00
Andrey Golovizin
ad3fffd7bc Disable score-based dicritic detection, use the first matching body. 2014-08-25 13:41:03 +02:00
Andrey Golovizin
a7f2c332ca Fix Line._combine_diacritics(): the first 5 glyphs were not examined. 2014-08-25 13:26:01 +02:00
Andrey Golovizin
34f58f0471 Plug glyph db editor into the main menu. 2014-08-25 13:12:36 +02:00
Andrey Golovizin
95b0c62927 Add main menu. 2014-08-25 12:52:48 +02:00
Andrey Golovizin
603d860a2c Remove debug print. 2014-08-25 12:39:11 +02:00
Andrey Golovizin
e7b9571377 Implement glyph sorting. 2014-08-25 12:38:59 +02:00
Andrey Golovizin
79a1a95a43 Add table header. 2014-08-25 12:31:33 +02:00
Andrey Golovizin
8a875d90bd Implement deleting glyphs. 2014-08-25 12:14:08 +02:00
Andrey Golovizin
cf8575152e Display glyph images in the glyph editor. 2014-08-21 23:24:07 +02:00
Andrey Golovizin
08e4382b66 Add Image.toqimage(). 2014-08-21 23:20:30 +02:00
Andrey Golovizin
48b179e2e0 Use color images as dictionary keys, not bitmaps. 2014-08-21 23:11:31 +02:00
Andrey Golovizin
c32415d843 Add GLyphDBEditor (actually a viewer for now). 2014-08-21 22:47:57 +02:00
Andrey Golovizin
182a49b359 Move glyph database logic to picelocr.glyphdb. 2014-08-21 21:52:22 +02:00
Andrey Golovizin
9656abe9b2 Attach diacritic to the closest body if multiple possibilities found. 2014-08-21 21:40:37 +02:00
Andrey Golovizin
5babd24450 Save glyph database on exit, load on startup. 2014-08-21 21:19:57 +02:00
Andrey Golovizin
a929d1011b Accept a single directory argument on the command line. 2014-08-21 21:09:01 +02:00
Andrey Golovizin
a666a9f85b Change Line.glyphs to be a list instead of an iterator. 2014-08-18 19:02:01 +02:00
Andrey Golovizin
f79d6da2c7 Move Image.combine() and friends to module level, add support for more than 2 images. 2014-08-18 19:00:53 +02:00
Andrey Golovizin
6d824a46d6 Scroll to highlighted glyphs. 2014-08-18 17:52:39 +02:00
Andrey Golovizin
ae20b22229 Do not center on new pages (preserve current position instead). 2014-08-18 17:48:13 +02:00
Andrey Golovizin
d54c28fbc1 Make PageView properly update its scroll position when a new page is displayed. 2014-08-18 17:47:50 +02:00
Andrey Golovizin
47dcb5be7f Implement proper diacritic detection. 2014-08-18 15:50:43 +02:00
Andrey Golovizin
ada771b5c9 Rename Letter to Glyph. 2014-08-18 15:44:36 +02:00
Andrey Golovizin
c5cb68f063 Implement basic learning mode. 2014-08-15 18:10:49 +02:00
Andrey Golovizin
a537f2140c Remove Image.key, add Letter.key. 2014-08-15 18:09:43 +02:00
Andrey Golovizin
08a6d004e7 Add OCREngine class. 2014-08-15 18:09:28 +02:00
Andrey Golovizin
6c3c93a39d Add GlyphEdit class. 2014-08-15 18:09:20 +02:00
Andrey Golovizin
34d7d123d1 Strip trailing spaces from license headers. 2014-08-15 16:47:23 +02:00
Andrey Golovizin
f9be7be65e Tweak display colors. 2014-08-15 14:42:07 +02:00
Andrey Golovizin
c4b170cc21 Implement correction for optical distance between letters. 2014-08-15 14:40:02 +02:00
Andrey Golovizin
ce4252e361 Split lines into letters according to letter distances, ditch page.Word. 2014-08-15 14:25:02 +02:00
Andrey Golovizin
50b40458bc Add Image.space(). 2014-08-15 14:21:38 +02:00
Andrey Golovizin
5f7e6abcb9 Add Image.bbox(), Image.overlaps() and Image.combine(). 2014-08-15 14:21:20 +02:00
Andrey Golovizin
3407bac38b Add utils.pairwise(). 2014-08-15 14:20:34 +02:00
Andrey Golovizin
26ba867089 Mask adjacent blobs when extracting blob images. 2014-08-15 11:57:33 +02:00
Andrey Golovizin
4ff37720d9 Use x, y, top, bottom instead of x1, y1, x2, y2. Add aliases: left=x, top=y. 2014-08-13 22:43:55 +02:00
Andrey Golovizin
360ed844c2 Use absolute coordinates in Line.baseline. 2014-08-13 20:25:01 +02:00