Documentation ¶
Overview ¶
Package gozbar config bindings for golang. Read the ZBar documents for details
Package gozbar image bindings for golang. Read the ZBar documents for details
Package gozbar scanner bindings for golang. Read the ZBar documents for details
Package gozbar symbol bindings. Read the ZBar documents for details
Index ¶
- Constants
- type Image
- type Scanner
- type Symbol
- func (s *Symbol) AddonName() string
- func (s *Symbol) Data() string
- func (s *Symbol) Each(f func(string))
- func (s *Symbol) LocSize() uint
- func (s *Symbol) LocX(index uint) int
- func (s *Symbol) LocY(index uint) int
- func (s *Symbol) Name() string
- func (s *Symbol) Next() *Symbol
- func (s *Symbol) Quality() int
- func (s *Symbol) Type() C.zbar_symbol_type_t
Constants ¶
const ( NONE = C.ZBAR_NONE PARTIAL = C.ZBAR_PARTIAL EAN8 = C.ZBAR_EAN8 UPCE = C.ZBAR_UPCE ISBN10 = C.ZBAR_ISBN10 UPCA = C.ZBAR_UPCA EAN13 = C.ZBAR_EAN13 ISBN13 = C.ZBAR_ISBN13 I25 = C.ZBAR_I25 CODE39 = C.ZBAR_CODE39 PDF417 = C.ZBAR_PDF417 QRCODE = C.ZBAR_QRCODE CODE128 = C.ZBAR_CODE128 SYMBOL = C.ZBAR_SYMBOL ADDON = C.ZBAR_ADDON ADDON2 = C.ZBAR_ADDON2 ADDON5 = C.ZBAR_ADDON5 )
Symbol types (Scanner.SetConfig() argument symbology)
const ( CFG_ENABLE = C.ZBAR_CFG_ENABLE CFG_ADD_CHECK = C.ZBAR_CFG_ADD_CHECK CFG_EMIT_CHECK = C.ZBAR_CFG_EMIT_CHECK CFG_ASCII = C.ZBAR_CFG_ASCII CFG_NUM = C.ZBAR_CFG_NUM CFG_MIN_LEN = C.ZBAR_CFG_MIN_LEN CFG_MAX_LEN = C.ZBAR_CFG_MAX_LEN CFG_POSITION = C.ZBAR_CFG_POSITION CFG_X_DENSITY = C.ZBAR_CFG_X_DENSITY CFG_Y_DENSITY = C.ZBAR_CFG_Y_DENSITY )
Configuration keys
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
Image contains a zbar image and the grayscale values.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner contains a reference to zbar scanner.
func (*Scanner) SetConfig ¶
func (s *Scanner) SetConfig(symbology C.zbar_symbol_type_t, config C.zbar_config_t, value int) error
SetConfig gives the zbar scanner the configuration to run.. Read the ZBar docs for details.
type Symbol ¶
type Symbol struct {
// contains filtered or unexported fields
}
Symbol is a wrapper around a zbar symbol.
func (*Symbol) Each ¶
Each will iterate over all symbols after this symbol. passing them into the provided callback
func (*Symbol) LocSize ¶
Retrieve the number of points in the location polygon. The location polygon defines the image area that the symbol was extracted from. Returns the number of points in the location polygon Note:
this is currently not a polygon, but the scan locations where the symbol was decoded
func (*Symbol) LocX ¶
LocX retrieves location polygon x-coordinates. Points are specified by 0-based index. Returns:
the x-coordinate for a point in the location polygon. -1 if index is out of range
func (*Symbol) LocY ¶
LocY retrieves location polygon y-coordinates. Points are specified by 0-based index. Returns:
the y-coordinate for a point in the location polygon. -1 if index is out of range
func (*Symbol) Quality ¶
Quality retrieves a symbol confidence metric. Returns an unscaled, relative quantity: larger values are better than smaller values, where "large" and "small" are application dependent. Note:
expect the exact definition of this quantity to change as the metric is refined. Currently, only the ordered relationship between two values is defined and will remain stable in the future
func (*Symbol) Type ¶
func (s *Symbol) Type() C.zbar_symbol_type_t
Type returns the symbol type. Compare it with types in constants to get the accurate symbol type.