detector

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0, MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (

	// max. legal count of modules per QR code edge (177)
	MAX_MODULE_COUNT_PER_EDGE = 180
	// min. legal count per modules per QR code edge (11)
	MIN_MODULE_COUNT_PER_EDGE = 9

	// More or less arbitrary cutoff point for determining if two finder patterns might belong
	// to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their
	// estimated modules sizes.
	DIFF_MODSIZE_CUTOFF_PERCENT = 0.05

	// More or less arbitrary cutoff point for determining if two finder patterns might belong
	// to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their
	// estimated modules sizes.
	DIFF_MODSIZE_CUTOFF = 0.5
)

Variables

This section is empty.

Functions

func ModuleSizeComparator

func ModuleSizeComparator(possibleCenters []*detector.FinderPattern) func(int, int) bool

ModuleSizeComparator A comparator that orders FinderPatterns by their estimated module size.

Types

type MultiDetector

type MultiDetector struct {
	*detector.Detector
}

MultiDetector Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code is rotated or skewed, or partially obscured.

func NewMultiDetector

func NewMultiDetector(image *gozxing.BitMatrix) *MultiDetector

func (*MultiDetector) DetectMulti

func (this *MultiDetector) DetectMulti(hints map[gozxing.DecodeHintType]interface{}) ([]*common.DetectorResult, error)

type MultiFinderPatternFinder

type MultiFinderPatternFinder struct {
	*detector.FinderPatternFinder
}

This class attempts to find finder patterns in a QR Code. Finder patterns are the square markers at three corners of a QR Code.

This class is thread-safe but not reentrant. Each thread must allocate its own object.

In contrast to {@link FinderPatternFinder}, this class will return an array of all possible QR code locations in the image.

Use the TRY_HARDER hint to ask for a more thorough detection.

func NewMultiFinderPatternFinder

func NewMultiFinderPatternFinder(image *gozxing.BitMatrix, resultPointCallback gozxing.ResultPointCallback) *MultiFinderPatternFinder

NewMultiFinderPatternFinder Creates a finder that will search the image for three finder patterns.

@param image image to search

func (*MultiFinderPatternFinder) FindMulti

func (this *MultiFinderPatternFinder) FindMulti(hints map[gozxing.DecodeHintType]interface{}) ([]*detector.FinderPatternInfo, error)

Jump to

Keyboard shortcuts

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