All Projects → writepython → tibetan-ocr

writepython / tibetan-ocr

Licence: other
Python OCR for Handwritten Tibetan Mauscripts

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to tibetan-ocr

namsel
An OCR application focused on machine-print Tibetan text
Stars: ✭ 22 (+15.79%)
Mutual labels:  ocr, tibetan
receipt-parser-server
Receipt parser server written in python.
Stars: ✭ 64 (+236.84%)
Mutual labels:  ocr
paperbase
Open source document organizer with automatic OCR and full text search
Stars: ✭ 21 (+10.53%)
Mutual labels:  ocr
CLPR.pytorch
End to End Chinese License Plate Recognition
Stars: ✭ 75 (+294.74%)
Mutual labels:  ocr
video-subtitle-extractor
视频硬字幕提取,生成srt文件。无需申请第三方API,本地实现文本识别。基于深度学习的视频字幕提取框架,包含字幕区域检测、字幕内容提取。A GUI tool for extracting hard-coded subtitle (hardsub) from videos and generating srt files.
Stars: ✭ 1,763 (+9178.95%)
Mutual labels:  ocr
ddddocr
带带弟弟 通用验证码识别OCR pypi版
Stars: ✭ 4,093 (+21442.11%)
Mutual labels:  ocr
saram
Get OCR in txt form from an image or pdf extension supporting multiple files from directory using pytesseract with auto rotation for wrong orientation. PYPI:
Stars: ✭ 51 (+168.42%)
Mutual labels:  ocr
i-librarian-free
I, Librarian - open-source version of a PDF managing SaaS.
Stars: ✭ 110 (+478.95%)
Mutual labels:  ocr
Handwritten-Text-Recognition
IAM dataset
Stars: ✭ 25 (+31.58%)
Mutual labels:  ocr
crnn.mxnet
crnn in mxnet.can train with chinese characters
Stars: ✭ 47 (+147.37%)
Mutual labels:  ocr
Snipping-Ocr
A simple Snipping tool for Windows with OCR capabilities
Stars: ✭ 82 (+331.58%)
Mutual labels:  ocr
ocr2text
Convert a PDF via OCR to a TXT file in UTF-8 encoding
Stars: ✭ 90 (+373.68%)
Mutual labels:  ocr
lego-mindstorms-51515-jetson-nano
Combines the LEGO Mindstorms 51515 with the NVIDIA Jetson Nano
Stars: ✭ 31 (+63.16%)
Mutual labels:  ocr
webgrep
Grep Web pages with extra features like JS deobfuscation and OCR
Stars: ✭ 86 (+352.63%)
Mutual labels:  ocr
shape-context-ocr
The Shape Context is a shape descriptor that captures the relative positions of other points on the shape contours, and is used to recognize characters.
Stars: ✭ 20 (+5.26%)
Mutual labels:  ocr
Multi-Type-TD-TSR
Extracting Tables from Document Images using a Multi-stage Pipeline for Table Detection and Table Structure Recognition:
Stars: ✭ 174 (+815.79%)
Mutual labels:  ocr
form-segmentation
Let's explore how we can extract text from forms
Stars: ✭ 42 (+121.05%)
Mutual labels:  ocr
erpnext ocr
🐍 ⚗️ Optical Character Recognition using tesseract within Frappe.
Stars: ✭ 58 (+205.26%)
Mutual labels:  ocr
NLP-image-to-text
code to extract text from images
Stars: ✭ 28 (+47.37%)
Mutual labels:  ocr
Inventory Kamera
Scans Genshin Impact characters, artifacts, and weapons from the game window into a JSON file.
Stars: ✭ 348 (+1731.58%)
Mutual labels:  ocr
=== About ===

A Python OCR program for handwritten Tibetan manuscripts like the ones recently digitized in Mongolia: http://www.tibet-dps.org/tempangma_kangyur.htm
The main script for doing character segmentation is character_segmentation.py.  This script contains a function process_image which is explained in detail below.

=== USAGE ===

1) Edit config.py
2) python character_segmentation.py

=== Dependencies ===

OpenCV - http://opencv.org/
cvBlobsLib - http://www.eng.auburn.edu/~troppel/internal/sparc/TourBot/TourBot%20References/cvdocuments/cvBlobsLib.html
NumPy - http://www.numpy.org/
matplotlib - http://matplotlib.org/

=== The Function process_image ===

This function processes each image again and again untill an acceptable result is obtained.  Acceptable means, for instance, no potential character images still exceed max height or width.

This process involves the following steps:

1) Find all the blobs of ink on the page using the class CBlobResult from cvBlobsLib.

2) Determine whether each blob needs to be passed to the vertical projection (vp) or horizontal projection (hp) functions.  Predefined variables like min_char_width, max_width_b4_cutoff, and max_height_b4_cutoff are taken into account.

3) Rerun process_image if some blobs were passed to vertical projection or horizontal projection functions.  (Vertical projection and horizontal projection functions result in alterations to the original image, by drawing one pixel width white lines.)

4) Determine the written order of blobs:

Start each iteration by calling the function get_blobs_sorted_by_distance_from_previous_blob, which gives you a list of blobs sorted by distance from previous blob.  The first blob is the one closest to (0, 0).  For each ensuing blob, we compare the distance between its Min X and Min Y and the Max X and Min Y of the previous blob. Distance between points is determined with the function distance_between_points, which takes the square root of the sum of the squares of the X and Y distances.

   Distance of a blob's Min X and Min Y from Max X and Min Y of the previously known character blob doesn't determine next character blob in 2 cases:

   A) At the end of a line, where the next character is far away.  Therefore we need to determine if we are at the end of line, and to do this we are currently checking to see if any blob remains on the same line.  So the code that attempts to do this is:

      if ( int(blob.maxx) > int(current_blob.minx) ) and ( abs(int(blob.miny)-int(current_blob.miny)) < 30 ):

   B) When we are not yet at the end of the line, but still the the closest blob in terms of distance from the Max X and Min Y of the previously known character is on the next line. So the code that attempts rule out blobs on other lines is:

      if ( int(blob.maxx) > int(previous_blob.minx) ) and ( abs(int(blob.miny)-int(previous_blob.miny)) < 30 )

5) Write each character blob as an image within the folio_characters_directory with the following as part of its filename: its line number, its character number in the line, and optionally, its dimensions.  Additionally, a bounding box is drawn around it on the original image.

6) Exit
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].