vcodereader

package module
v0.0.0-...-4c5dc94 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2016 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

vcodereader

A golang tool to read verify code.

How to use

  1. install tesseract-ocr
  2. install go
  3. install gosseract
    • go get github.com/otiai10/gosseract
  4. install vcodereader
    • go get github.com/jesusslim/vcodereader
  5. run the example:vcodereader/example/example.go

如何使用

使用步骤参考上述 依赖于tesseract-ocr、otiai10/gosseract以及go运行环境 上述依赖安装完毕后 使用go get命令获取此项目代码 运行example文件夹下例子

Example code:

package main

import (
	"fmt"
	"github.com/jesusslim/slimgo/utils"
	"github.com/jesusslim/vcodereader"
	"time"
)

func main() {
	fmt.Println(utils.TimeFormat(time.Now(), "H:i:s"))
	//file_name := "test.png"
	//vr := vcodereader.NewVcodeReaderDefault(file_name)
	vr := vcodereader.NewVcodeReaderDefaultFromUrl("yoururl")
	//vr.SetNeedRev(true)
	r, err := vr.Read()
	if err != nil {
		fmt.Println(err.Error())
	} else {
		fmt.Println(r)
	}
	fmt.Println(utils.TimeFormat(time.Now(), "H:i:s"))
}

Documentation

Index

Constants

View Source
const (
	TYPE_PNG  = 1
	TYPE_JPEG = 2
)

Variables

This section is empty.

Functions

func GetImgFromUrl

func GetImgFromUrl(url string) (string, error)

Types

type LineInfo

type LineInfo struct {
	// contains filtered or unexported fields
}

干扰线

func NewLineInfo

func NewLineInfo(xy *Xy) *LineInfo

func (*LineInfo) Copy

func (l *LineInfo) Copy() *LineInfo

func (*LineInfo) GetPoints

func (l *LineInfo) GetPoints() []*Xy

func (*LineInfo) GetRoot

func (l *LineInfo) GetRoot() *Xy

func (*LineInfo) LenPoints

func (l *LineInfo) LenPoints() int

func (*LineInfo) PointExist

func (l *LineInfo) PointExist(x, y int) bool

type VcodeReader

type VcodeReader struct {
	// contains filtered or unexported fields
}

func NewVcodeReader

func NewVcodeReader(file_name string, check_round2 bool, max_linked int, max_jump int, save_clear_file_name_prefix string, use_client bool, need_rev bool) *VcodeReader

func NewVcodeReaderDefault

func NewVcodeReaderDefault(file_name string) *VcodeReader

func NewVcodeReaderDefaultFromUrl

func NewVcodeReaderDefaultFromUrl(url string) *VcodeReader

func (*VcodeReader) GetXyVisited

func (this *VcodeReader) GetXyVisited(x, y int) int

func (*VcodeReader) IncXyVisited

func (this *VcodeReader) IncXyVisited(x, y int) int

func (*VcodeReader) Read

func (this *VcodeReader) Read() (string, error)

func (*VcodeReader) SetNeedRev

func (this *VcodeReader) SetNeedRev(need_rev bool)

type Xy

type Xy struct {
	// contains filtered or unexported fields
}

坐标点

func NewXy

func NewXy(x, y int) *Xy

func (*Xy) GetX

func (this *Xy) GetX() int

func (*Xy) GetY

func (this *Xy) GetY() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址