demo

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Go native demos

This directory contains a few real time face detection demos running in a native Go environment.

Dependencies

Run

$ go run main.go

Notice

For the WASM port check this subfolder:

https://github.com/esimov/pigo/tree/master/wasm

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constructor

type Constructor struct {
	ImgCtx *gg.Context

	ShowPupilDet    bool
	ShowLandmarkDet bool
	// contains filtered or unexported fields
}

func NewConstructor

func NewConstructor(
	imgCtx *gg.Context,
	faceClassifier *pigo.Pigo,
	puplocCascade *pigo.PuplocCascade,
	flpcs map[string][]*pigo.FlpCascade,
	opts ...DetectionOptions,
) (*Constructor, error)

func (*Constructor) DetectAndDraw

func (c *Constructor) DetectAndDraw(frame *image.YCbCr)

func (*Constructor) DrawArc

func (c *Constructor) DrawArc(x, y, w float64, color color.RGBA)

func (*Constructor) DrawRect

func (c *Constructor) DrawRect(x, y, w, h float64, color color.RGBA)

type DetectionOptions

type DetectionOptions func(*Constructor) error

func WithLandmarkDetection

func WithLandmarkDetection() DetectionOptions

WithLandmarkDetection instantiates the constructor with the landmark points detection enabled.

func WithPupilDetection

func WithPupilDetection() DetectionOptions

WithPupilDetection instantiates the constructor with pupil detection enabled.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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