Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FaceSampler ¶
type FaceSampler struct {
// contains filtered or unexported fields
}
FaceSampler is an abstraction around the necessary OpenCV resources in order to sample a model of a face or facial-expression
func NewFaceSampler ¶
func NewFaceSampler(settings Settings) (*FaceSampler, error)
NewFaceSampler is the FaceSampler constructor
func (*FaceSampler) Close ¶
func (s *FaceSampler) Close() error
Close closes all closers within a FaceSampler, should be used in a defer statement immediately after checking the error from NewFaceSampler
func (*FaceSampler) Run ¶
func (s *FaceSampler) Run() error
Run samples a face NSamples times, and saves each sample to a file
type Settings ¶
type Settings struct { // CaptureDeviceID (default is 0) CaptureDeviceID int // FaceAlgoPath is the path of the classifier algorithm XML file to use // (no default, this is a required argument) FaceAlgoPath string // WindowTitle is the title to be displayed on the window // (default is "Face Trainer") WindowTitle string // NSamples is how many samples to take in one run of the sampler // (default is 10) NSamples int // SaveSamplesDir is the directory where .jpg samples will be saved to // (default is the current directory ".") SaveSamplesDir string }
Settings contains necessary values to initialize a FaceSampler
Click to show internal directories.
Click to hide internal directories.