ocr

How to group blocks that are part of a bigger sentences in Google Cloud Vision API?

a 夏天 提交于 2021-01-29 09:40:57
问题 I am using Google Cloud Vision API on Python to detect text values in hoarding boards that are usually found above a shop/store. So far I have been able to detect individual words and their bounding polygons' coordinates. Is there a way to group the detected words based on their relative positions and sizes? For example, the name of the store is usually written in same size and the words are aligned. Does the API provide some functions that group those words which probably are parts of a

Why pytesseract raise an error with Arabic language

半世苍凉 提交于 2021-01-29 07:23:58
问题 I want to use pytesseract Arabic And I have ara.traineddata in my system /usr/share/tesseract/tessdata/ path and i have already installed tesseract package This is my code: import pytesseract from PIL import Image pytesseract.image_to_string(Image.open('test_arabic.png'), config='', lang="ara") and i get this error: TesseractError Traceback (most recent call last) in ----> 1 pytesseract.image_to_string(Image.open('test_persian.png'), config='', lang="ara") ~/.local/lib/python3.8/site-packages

Python (numpy) crashes system with large number of array elements

这一生的挚爱 提交于 2021-01-29 05:30:29
问题 I'm trying to build a basic character recognition model using the many classifiers that scikit provides. The dataset being used is a standard handwritten set of alphanumeric samples (Chars74K image dataset taken from this source: EnglishHnd.tgz). There are 55 samples of each character (62 alphanumeric characters in all), each being 900x1200 pixels. I'm flattening the matrix (first converting to grayscale) into a 1x1080000 array (each representing a feature). for sample in sample_images: #

Error on loading OpenCV EAST text detector in Python

断了今生、忘了曾经 提交于 2021-01-28 09:20:22
问题 I'm trying to use EAST text detector to detect areas of text in images, but am having trouble on loading the pre-trained EAST text detector. The following is my text_detection.py file from imutils.object_detection import non_max_suppression import numpy as np import argparse import time import cv2 import requests import urllib # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", type=str,help="path to input image") ap.add

Google Vision API Text Recognizer is not working

爱⌒轻易说出口 提交于 2021-01-27 16:55:44
问题 I have used Google vision API to read text from any object like newspaper or text in wall. I have tried same sample from Google developer website but my Text Recognizer always return false on IsOperational function. am tested on Blackberry keyone and also tested on Moto x play its working fine. Gradle file : compile 'com.google.android.gms:play-services-vision:11.0.4' Can anyone help me on this. Thanks in Advance TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();

Google Vision API Text Recognizer is not working

泪湿孤枕 提交于 2021-01-27 16:35:23
问题 I have used Google vision API to read text from any object like newspaper or text in wall. I have tried same sample from Google developer website but my Text Recognizer always return false on IsOperational function. am tested on Blackberry keyone and also tested on Moto x play its working fine. Gradle file : compile 'com.google.android.gms:play-services-vision:11.0.4' Can anyone help me on this. Thanks in Advance TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();

Google Vision API Text Recognizer is not working

穿精又带淫゛_ 提交于 2021-01-27 16:31:22
问题 I have used Google vision API to read text from any object like newspaper or text in wall. I have tried same sample from Google developer website but my Text Recognizer always return false on IsOperational function. am tested on Blackberry keyone and also tested on Moto x play its working fine. Gradle file : compile 'com.google.android.gms:play-services-vision:11.0.4' Can anyone help me on this. Thanks in Advance TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();

Disable dictionary-assisted OCR in tesseract C++ API

给你一囗甜甜゛ 提交于 2021-01-27 15:59:22
问题 I have an application where technical datasheets are OCR'd using the tesseract API. I initialize it like this: tesseract::TessBaseAPI tess; tess.Init(NULL, "eng", tesseract::OEM_TESSERACT_ONLY); However, even after using custom whitelists like this tess.SetVariable("tessedit_char_blacklist", ""); tess.SetVariable("tessedit_char_whitelist", myWhitelist); some datasheet entries are recognized wrongly, for example PA3 is recognized as FAB . How can I disable the dictionary-assisted OCR, i.e. .

How to get the bounding box of text that are overlapped with background lines?

狂风中的少年 提交于 2021-01-27 12:30:53
问题 For example, in the following app screenshot, I want to get the bounding box tightly rounded over CA-85S (the text on the horizontal blue line), and Almaden Expy (text that overlapped with the blue line). I am extracting those bounding boxes for OCR. I've tried several approaches in openCV that none of those approaches work for me. 回答1: Using the observation that the desired text to extract is in black and has a contrast different from the blue river background lines, a potential approach is

How to Distinguish Slashed Zero From Eight (0->8) in OCR

折月煮酒 提交于 2021-01-27 06:22:21
问题 I'm using ML Kit for Firebase for my Android app (ReCalc: Receipt Calculator) and it performs very well except in the case of slashed zero . In around half or more of the cases it recognizes slashed zero as eight. One idea I have is to slice the rectangle containing the zero in regions and detect whether the regions just above and below the middle are dark or not. But actually... I'm planning to train a model to classify zeroes and eights . This is a lot of work thus I decided first to ask