libfacedetection

package module
v0.0.0-...-406b589 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

README

libfacedetection-go

inspired by https://github.com/chai2010/libfacedetection-go

See also

[https://github.com/ShiqiYu/libfacedetection]

Example

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 {
	Confidence int
	X          int
	Y          int
	W          int
	H          int
	Landmarks  []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