Giter Site home page Giter Site logo

sumingxuan / gosseract Goto Github PK

View Code? Open in Web Editor NEW

This project forked from otiai10/gosseract

0.0 0.0 0.0 1.05 MB

Go package for OCR (Optical Character Recognition), by using Tesseract C++ library

Home Page: https://pkg.go.dev/github.com/otiai10/gosseract

License: MIT License

Shell 12.43% C++ 14.18% C 2.04% Go 56.36% Dockerfile 14.99%

gosseract's Introduction

gosseract OCR

Go Test Docker Test BSD Test codecov Go Report Card Maintainability License: MIT Go Reference

Golang OCR package, by using Tesseract C++ library.

OCR Server

Do you just want OCR server, or see the working example of this package? Yes, there is already-made server application, which is seriously easy to deploy!

๐Ÿ‘‰ https://github.com/otiai10/ocrserver

Example

package main

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

func main() {
	client := gosseract.NewClient()
	defer client.Close()
	client.SetImage("path/to/image.png")
	text, _ := client.Text()
	fmt.Println(text)
	// Hello, World!
}

Installation

  1. tesseract-ocr, including library and headers
  2. go get -t github.com/otiai10/gosseract/v2

Please check this Dockerfile to get started step-by-step. Or if you want the env instantly, you can just try by docker run -it --rm otiai10/gosseract.

Test

In case you have tesseract-ocr on your local, you can just hit

% go test .

Otherwise, if you DON'T want to install tesseract-ocr on your local, kick ./test/runtime which is using Docker and Vagrant to test the source code on some runtimes.

% ./test/runtime --driver docker
% ./test/runtime --driver vagrant

Check ./test/runtimes for more information about runtime tests.

Issues

gosseract's People

Contributors

otiai10 avatar yin1999 avatar huehnerhose avatar will7200 avatar moolen avatar khanbalarashidov avatar zimmski avatar awskii avatar dependabot[bot] avatar muesli avatar hfoxy avatar bake avatar guitarbum722 avatar kt3k avatar willdurand avatar ttacon avatar tomnomnom avatar thewhitetulip avatar shogg-isentia avatar pide2000 avatar pukoren avatar jxsl13 avatar jayxon avatar emil2k avatar esiqveland avatar dmorawetz avatar arthurhenrique avatar ansonl avatar

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.