Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FDetect ¶
type FDetect struct {
// contains filtered or unexported fields
}
FDetect struct contains Pigo face detector general settings.
func GetFaceDetector ¶
GetFaceDetector returns an instance of facedetector with path to binary cascade file
func (*FDetect) DetectFacesInImageFile ¶
DetectFacesInImageFile detect faces in a image file
type FaceDetector ¶
type FaceDetector interface { // Init initializes the face detector with maximum and minimum size of expected face Init(minSize, maxSize int) error // DetectFacesInImageFile detects a list of faces in an image file DetectFacesInImageFile(sourceFilePath string) ([]image.Rectangle, error) }
faceDetector interface defines face detection interface ResizeImage expects
type ResizeResult ¶
ResizeResult contains details of the resizing done
func ResizeImage ¶
func ResizeImage(fd FaceDetector, srcPath, dstPath string, size uint) (ResizeResult, error)
ResizeImage uses an instance of FaceDetector to detect face in srcPath and generates a thumbnail of sizexsize in dstPath If no facedetector is given or no faces are detected, then the center of image is used for the thumbnail
func ResizeToAspectRatio ¶
func ResizeToAspectRatio(fd FaceDetector, srcPath, dstPath string, w, h uint) (ResizeResult, error)
ResizeToAspectRatio crops image to meet the aspect ratio of w:h
Click to show internal directories.
Click to hide internal directories.