Code Monkey home page Code Monkey logo

Comments (3)

otiai10 avatar otiai10 commented on July 18, 2024

If points below are clear in your server, you can use this package, I guess.

  1. Install tesseract-ocr
  2. Install go
  3. go get github.com/otiai10/gosseract

However I haven't used ec2 yet, I'll try to use gosseract in ec2 by myself.

Please leave comment when you try and get any result. ๐Ÿ‘

from gosseract.

otiai10 avatar otiai10 commented on July 18, 2024
  • Amazon Linux AMI 2014.09.1 (HVM)
  • t2.micro

ssh

% ssh -i my.pem [email protected]

c++

$ sudo yum install gcc-c++

leptonica

$ sudo yum install autoconf automake libtool
$ sudo yum install libpng-devel libjpeg-devel libtiff-devel zlib-devel
$ sudo chown -R ec2-user. /usr/local
$ cd /usr/local/src/
$ wget http://leptonica.googlecode.com/files/leptonica-1.69.tar.gz
$ sudo tar -xzf leptonica-1.69.tar.gz
$ cd ./leptonica-1.69
$ ./configure
$ make
$ make install

tesseract

$ cd /usr/local/src
$ wget http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz
$ wget http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz
$ tar -xzf tesseract-ocr-3.02.02.tar.gz
$ tar -xzf tesseract-ocr-3.02.eng.tar.gz
$ cd tesseract-ocr
$ ./autogen.sh
$ ./configure
$ make install
$ which tessaract
/usr/local/bin/tesseract

test run for tessearct

$ cd
$ wget https://raw.githubusercontent.com/otiai10/gosseract/master/.samples/png/sample000.png
$ tesseract sample000.png out.txt
Tesseract Open Source OCR Engine v3.02.02 with Leptonica
$ cat out.txt.txt
01:37:58

$

golang

$ sudo yum install go
$ which go
/usr/bin/go
$ go get github.com/otiai10/gosseract
package github.com/otiai10/gosseract: cannot download, $GOPATH not set. For more details see: go help gopath
$ mkdir -p proj/go
$ export GOPATH=~/proj/go
$ go get github.com/otiai10/gosseract

source code

package main

import (
    "fmt"
    "github.com/otiai10/gosseract"
)

func main() {
    out := gosseract.Must(map[string]string{"src": "sample000.png"})
    fmt.Println(out)
}

execution

$ go run main.go
01:37:58


from gosseract.

otiai10 avatar otiai10 commented on July 18, 2024

@pjebs It works in AWS EC2 instance.

from gosseract.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.