detect

package
v0.0.0-...-1948922 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnhanceImage

func EnhanceImage(img *gocv.Mat)

EnhanceImage improves image contrast and sharpness

func ValidateSquare

func ValidateSquare(points []image.Point, width, height int) bool

ValidateSquare returns whether the 4 given points roughly correspond to a square in the image. Points should be given in the following order: - bottom-left, bottom-right, top-right, top-left - or bottom-right, then top-right, top-left, bottom-left (as returned by gocv.NewQRCodeDetector().Detect function) Parameters width and height correspond to the global image size, to check for out-of-image points.

Types

type QRCode

type QRCode [][]bool

QRCode is the representation of the code: 2-dimensional array of dots "true" means black dot, "false" means

func GetDots

func GetDots(img gocv.Mat) (QRCode, bool)

GetDots scans the input image pixels to try to extract QR-code dots. Returns the grid of dots (true is black), and a boolean telling whether extraction was successful.

Jump to

Keyboard shortcuts

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