Documentation ¶
Index ¶
- func Load(ctx *cli.Context) error
- func Reset(*cli.Context) error
- func Save(ctx *cli.Context) error
- type Area
- type BinarizeConfig
- type BorderConfig
- type CheckConfig
- type ColorGroup
- type Config
- type ConvertConfig
- type FfmpegConfig
- type MarginConfig
- type NoOnEdgeConfig
- type OcrConfig
- type OptimizerConfig
- type Range
- type RelativeValue
- func (rv *RelativeValue) Assign(s string) error
- func (rv RelativeValue) Calculate(base int) int
- func (rv RelativeValue) Equal(ratio float64, offset int) bool
- func (rv RelativeValue) MarshalJSON() ([]byte, error)
- func (rv *RelativeValue) String() string
- func (rv *RelativeValue) UnmarshalJSON(b []byte) error
- type Replace
- type SliceConfig
- type TesseractConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Area ¶
type Area struct { Left RelativeValue `json:"left"` Right RelativeValue `json:"right"` Top RelativeValue `json:"top"` Bottom RelativeValue `json:"bottom"` }
type BinarizeConfig ¶
type BinarizeConfig struct { Crop Area `json:"crop"` TextColors []ColorGroup `json:"textColors"` Optitmizer OptimizerConfig `json:"optimizer"` }
type BorderConfig ¶
type BorderConfig struct { Color []ColorGroup `json:"colors"` Level RelativeValue `json:"level"` }
type CheckConfig ¶
type CheckConfig struct { MaskLevel float64 `json:"maskLevel"` Cropped ColorGroup `json:"cropped"` Background ColorGroup `json:"background"` Text ColorGroup `json:"text"` Discarded ColorGroup `json:"discarded"` }
type ColorGroup ¶
func MustNewColorGroup ¶
func MustNewColorGroup(s string) ColorGroup
func (*ColorGroup) Assign ¶
func (cg *ColorGroup) Assign(s string) error
func (ColorGroup) MarshalJSON ¶
func (cg ColorGroup) MarshalJSON() ([]byte, error)
func (*ColorGroup) String ¶
func (cg *ColorGroup) String() string
func (*ColorGroup) UnmarshalJSON ¶
func (cg *ColorGroup) UnmarshalJSON(b []byte) error
type Config ¶
type Config struct { Ffmpeg FfmpegConfig `json:"ffmpeg"` Tesseract TesseractConfig `json:"tesseract"` Slice SliceConfig `json:"slice"` Binarize BinarizeConfig `json:"binarize"` Check CheckConfig `json:"check"` Ocr OcrConfig `json:"ocr"` Convert ConvertConfig `json:"convert"` }
var Value Config
type ConvertConfig ¶
type ConvertConfig struct { Replace []Replace `json:"replace"` Format string `json:"format"` Merge RelativeValue `json:"merge"` }
type FfmpegConfig ¶
type MarginConfig ¶
type MarginConfig struct { X RelativeValue `json:"x"` Y RelativeValue `json:"y"` }
type NoOnEdgeConfig ¶
type OcrConfig ¶
type OcrConfig struct { Cache RelativeValue `json:"cache"` Margin MarginConfig `json:"margin"` Format string `json:"format"` JpgQuality int `json:"jpgQuality"` Replace []Replace `json:"replace"` }
type OptimizerConfig ¶
type OptimizerConfig struct { Connectivity int `json:"connectivity"` Size Range `json:"size"` Width Range `json:"width"` Height Range `json:"height"` Border BorderConfig `json:"border"` NoOnEdge NoOnEdgeConfig `json:"noOnEdge"` }
type Range ¶
type Range struct { Min RelativeValue `json:"min"` Max RelativeValue `json:"max"` }
func MustNewRange ¶
type RelativeValue ¶
func MustNewRelativeValue ¶
func MustNewRelativeValue(s string) RelativeValue
func (*RelativeValue) Assign ¶
func (rv *RelativeValue) Assign(s string) error
func (RelativeValue) Calculate ¶
func (rv RelativeValue) Calculate(base int) int
func (RelativeValue) MarshalJSON ¶
func (rv RelativeValue) MarshalJSON() ([]byte, error)
func (*RelativeValue) String ¶
func (rv *RelativeValue) String() string
func (*RelativeValue) UnmarshalJSON ¶
func (rv *RelativeValue) UnmarshalJSON(b []byte) error
type SliceConfig ¶
type TesseractConfig ¶
Click to show internal directories.
Click to hide internal directories.