Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OCRCheckpoint ¶
type OCRCrop ¶
func (*OCRCrop) CropRectangle ¶ added in v0.8.0
func (*OCRCrop) MarshalJSON ¶
func (*OCRCrop) UnmarshalJSON ¶
type OCRSchema ¶ added in v0.8.0
type OCRSchema struct { Callback interface{} `json:"callback,omitempty"` Languages []string `json:"lang,omitempty"` OEM int `json:"oem,omitempty"` PSM int `json:"psm,omitempty"` Crop *OCRCrop `json:"crop,omitempty"` AllowList []interface{} `json:"allowlist,omitempty"` }
func NewNumberField ¶
func NewTextField ¶
type OCRTableField ¶ added in v0.8.0
func (*OCRTableField) MarshalJSON ¶ added in v0.8.0
func (b *OCRTableField) MarshalJSON() ([]byte, error)
func (*OCRTableField) UnmarshalJSON ¶ added in v0.8.0
func (b *OCRTableField) UnmarshalJSON(data []byte) error
type OCRTemplate ¶ added in v0.8.0
type OCRTemplate struct { Title string `json:"title,omitempty"` Version string `json:"version,omitempty"` Author string `json:"author,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` OCRSchema map[string]OCRSchema `json:"ocr_schema,omitempty"` Fingerprint string `json:"fingerprint,omitempty"` Threshold int `json:"threshold,omitempty"` Table []OCRTableField `json:"table,omitempty"` Checkpoints []OCRCheckpoint `json:"checkpoints,omitempty"` }
func FindTemplate ¶ added in v0.8.0
func FindTemplate(mediaDir string, availableTemplate []OCRTemplate) OCRTemplate
func LoadTemplate ¶
func LoadTemplate(fileName string) (OCRTemplate, error)
func LoadTemplates ¶ added in v0.8.0
func LoadTemplates(directory string) []OCRTemplate
func PickTemplate ¶ added in v0.8.0
func PickTemplate(hash *goimagehash.ImageHash, availableTemplate []OCRTemplate) OCRTemplate
func (*OCRTemplate) Hash ¶ added in v0.8.0
func (b *OCRTemplate) Hash() *goimagehash.ImageHash
func (*OCRTemplate) Match ¶ added in v0.8.0
func (b *OCRTemplate) Match(hash *goimagehash.ImageHash) bool
Click to show internal directories.
Click to hide internal directories.