我正在尝试构建一个shell脚本,它允许我搜索图像中的文本。基于文本,脚本将尽力从图像中获取文本。我想要你对此输入,因为这个脚本似乎适用于大多数图像,但不是那些文本字体颜色类似于文本周围较小环境的图像。
# !/bin/bash
#
# imt-ocr.sh is image magick tessearc OCR tool that is used for finding out text in image
#
# Arguments:
# 1 -- image filename (with path)
# 2 -- text to search in image
我已经安装了activestate perl v5.8.8我安装了以下模块Image::OCR::Tesseract with the ppm
当我尝试运行以下代码时:
use Image::OCR::Tesseract 'get_ocr';
my $image = 'my_image.jp';
my $text = get_ocr($image);
我得到以下错误消息:
无效参数- -compress
1024在C:/Perl/site/lib/Image/OCR/Tesseract. 77第77行。
如果有人之前遇到了这个问题,谁可以帮助一下这个错
我试图在Angularjs控制器中使用jasminejs和Karma runner对一个方法进行单元测试,我的方法在参数中取一个图像路径并将该图像转换为文本(TESSERACT-OCR)。
当我试图调用这样的单元测试时,它不起作用:
TypeError:尝试分配给只读属性。在workFn
it('has to return text from image', inject(function($httpBackend) {
$scope.ocr("./image.png");
$httpBackend.expectPOST('/ocr'
我正在尝试使用perl从扫描的PDF中获取文本,所以我在perl中使用了PDF::OCR2模块,但我无法安装此模块,安装Image::OCR::Tesseract模块失败,我使用的是CentOS7,这是我在安装过程中的错误。
one dependency not OK (Image::OCR::Tesseract); additionally test harness failed
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
我正在尝试使用MODI在内存中已有的位图上执行OCR。我似乎找不到解决这个问题的方法,因为我找到的所有示例都使用create方法从磁盘中抓取图像并为OCR做准备。然而,我已经将图像存储在内存中,对磁盘的写入和读取消耗了太多时间。
Bitmap bmp = ...
//Instantiate the MODI.Document object
MODI.Document md = new MODI.Document();
//The Create method grabs the picture from disk snd prepares for OCR.
md.Create
我的错误在title.How中解释了,我能解决这个问题吗?我似乎找不到任何循环导入,但是我得到了错误anyways.Is,模块的设计很糟糕,还是做错了什么?
import easyocr
import argparse
import cv2
def cleanup_text(text):
# strip out non-ASCII text so we can draw the text on the image
# using OpenCV
return "".join([c if ord(c) < 128 else "" fo
当我运行exe时,在tesseract和opencv ocr中遇到一些错误。我如何解决我的问题,当我运行程序,然后显示这个错误,有什么建议吗? 这些errors是: D:\OCR\Install-0penCV-with-Tesseract-Windows\OCVTessExample\x64\Debug>OCVTessExample.exe
4.1.0
Error in pixCreateHeader: width must be > 9
Error in pixCreateNoInit: pixd not made
Error in pixCreate: pixd not ma
我正在尝试发送一个图像到ocr.space使用他们的应用程序接口与python。这是我的代码。代码运行时没有错误,但不会打印任何内容。为什么?我怎样才能让它成为print??
import requests
import json
def ocr_space_file(filename, overlay=False, api_key='helloworld', language='eng'):
""" OCR.space API request with local file.
Python3.5 - not t
我开始学习Asprise技术。我想使用一种将图像转换为文本(OCR)的方法。
import com.asprise.util.ocr.OCR;
public class Test {
public static void main(String[] args) throws IOException {
BufferedImage image = ImageIO.read(new File("D:\\HEAD2.png"));
String s = new OCR().recognizeEverything(image);
问题
我在我的不和谐的机器人中有两个函数,它不带任何参数,在内部调用另一个函数,最后返回一个列表。我不知道如何同时运行这两个函数,这将帮助我使整体功能更快一点,因为这两个功能是主要的时间采取的功能。
码
img = cv.imread('card.png')
def func1()
#some code of cropping the above image as per my need
char_list = [ocr(img1), ocr(img2), ocr(img3)] # these are the cropped 3 images and the o
当我试图为OCR执行程序时,我得到了Module not found error。
我在用Anaconda和朱庇特笔记本。
我已经安装了tesserocr并在conda控制台中激活了它,但是仍然得到了相同的错误。
import tesserocr
from PIL import Image
print (tesserocr.tesseract_version() ) # print tesseract-ocr version
print (tesserocr.get_languages() ) # prints tessdata path and list of available lang