libfacedetection

package module
v0.0.0-...-80e89f8 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

README


libfacedetection binding for Go

Example (hello.go)

package main

import (
	"github.com/chai2010/libfacedetection-go"
)

func main() {
	m := GetImage("./libfacedetection/images/keliamoniz2.jpg")
	rgb, w, h := libfacedetection.NewRGBImageFrom(m)

	faces := libfacedetection.DetectFaceRGB(rgb, w, h, w*3)
	fmt.Printf("%#v\n", faces)
}

// output:
// []libfacedetection.Face{
//     libfacedetection.Face{X:183, Y:137, W:150, H:150, Neighbors:94, Angle:0}
// }

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRGBImageFrom

func NewRGBImageFrom(m image.Image) (rgb []byte, w, h int)

Types

type Face

type Face struct {
	X         int
	Y         int
	W         int
	H         int
	Neighbors int
	Angle     int
}

func DetectFaceRGB

func DetectFaceRGB(rgb []byte, w, h, stride int) []Face

func DetectFaceRGBA

func DetectFaceRGBA(m *image.RGBA) []Face

Jump to

Keyboard shortcuts

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