handlers

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Health

type Health struct {
	// contains filtered or unexported fields
}

Health is a HTTP Handler

func NewHealth

func NewHealth(l logging.Logger) *Health

NewHealth creates a new Health handler

func (*Health) ServeHTTP

func (h *Health) ServeHTTP(rw http.ResponseWriter, r *http.Request)

ServeHTTP is a http handler which reports the service health

type Post

type Post struct {
	// contains filtered or unexported fields
}

Post is a http handler which detects faces using the OpenCV library and GoCV

func NewPost

func NewPost(cascadeLocation string) *Post

NewPost creates a new face processor handler with default parameters

func NewPostWithParams added in v0.1.8

func NewPostWithParams(cascadeLocation string, scaleFactor float64, minNeighbors int) *Post

NewPostWithParams creates a new face processor handler Face detection parameters can be tuned by setting scaleFactor and minNeighbors

func (*Post) ServeHTTP

func (p *Post) ServeHTTP(rw http.ResponseWriter, r *http.Request)

ServeHTTP handles the request

type Response

type Response struct {
	Faces  []image.Rectangle
	Bounds image.Rectangle
}

Response for the function

Jump to

Keyboard shortcuts

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