Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImgToNRGBA ¶
ImgToNRGBA converts any image type to *image.NRGBA with min-point at (0, 0).
func RgbToGrayscale ¶
RgbToGrayscale converts the image to grayscale mode.
Types ¶
type CascadeParams ¶
CascadeParams contains the basic parameters to run the analyzer function over the defined image. MinSize: represents the minimum size of the face. MaxSize: represents the maximum size of the face. ShiftFactor: determines to what percentage to move the detection window over its size. ScaleFactor: defines in percentage the resize value of the detection window when moving to a higher scale.
type Detection ¶
Detection struct contains the detection results composed of the row, column, scale factor and the detection score.
type ImageParams ¶
ImageParams is a struct for image related settings. Pixels: contains the grayscale converted image pixel data. Rows: the number of image rows. Cols: the number of image columns. Dim: the image dimension.
type Pigo ¶
type Pigo struct {
// contains filtered or unexported fields
}
Pigo struct defines the basic binary tree components.
func (*Pigo) ClusterDetections ¶
ClusterDetections returns the intersection over union of multiple clusters. We need to make this comparision to filter out multiple face detection regions.
func (*Pigo) RunCascade ¶
func (pg *Pigo) RunCascade(img ImageParams, opts CascadeParams) []Detection
RunCascade analyze the grayscale converted image pixel data and run the classification function over the detection window. It will return a slice containing the detection row, column, it's center and the detection score (in case this is > than 0.0).