Documentation ¶
Overview ¶
Package pvl is the GoCV wrapper around the Intel OpenVINO toolkit's Photography vision Library (PVL).
For further details, please see: https://software.intel.com/en-us/openvino-toolkit
Index ¶
- Constants
- type Face
- func (f *Face) Close() error
- func (f *Face) IsLeftEyeClosed() bool
- func (f *Face) IsRightEyeClosed() bool
- func (f *Face) IsSmiling() bool
- func (f *Face) LeftEyePosition() image.Point
- func (f *Face) MouthPosition() image.Point
- func (f *Face) Ptr() C.Face
- func (f *Face) RIPAngle() int
- func (f *Face) ROPAngle() int
- func (f *Face) Rectangle() image.Rectangle
- func (f *Face) RightEyePosition() image.Point
- type FaceDetector
- func (f *FaceDetector) Close() error
- func (f *FaceDetector) DetectBlink(img gocv.Mat, face Face)
- func (f *FaceDetector) DetectEye(img gocv.Mat, face Face)
- func (f *FaceDetector) DetectFaceRect(img gocv.Mat) []Face
- func (f *FaceDetector) DetectMouth(img gocv.Mat, face Face)
- func (f *FaceDetector) DetectSmile(img gocv.Mat, face Face)
- func (f *FaceDetector) GetBlinkThreshold() int
- func (f *FaceDetector) GetMaxDetectableFaces() int
- func (f *FaceDetector) GetMinFaceSize() int
- func (f *FaceDetector) GetRIPAngleRange() int
- func (f *FaceDetector) GetROPAngleRange() int
- func (f *FaceDetector) GetSmileThreshold() int
- func (f *FaceDetector) IsTrackingModeEnabled() bool
- func (f *FaceDetector) SetBlinkThreshold(thresh int)
- func (f *FaceDetector) SetMaxDetectableFaces(max int)
- func (f *FaceDetector) SetMinFaceSize(min int)
- func (f *FaceDetector) SetRIPAngleRange(rip int)
- func (f *FaceDetector) SetROPAngleRange(rop int)
- func (f *FaceDetector) SetSmileThreshold(thresh int)
- func (f *FaceDetector) SetTrackingModeEnabled(enabled bool)
- type FaceRecognizer
- func (f *FaceRecognizer) Clear()
- func (f *FaceRecognizer) Close() error
- func (f *FaceRecognizer) CreateNewPersonID() int
- func (f *FaceRecognizer) DeregisterFace(faceID int64)
- func (f *FaceRecognizer) DeregisterPerson(personID int)
- func (f *FaceRecognizer) Empty() bool
- func (f *FaceRecognizer) GetNumRegisteredPersons() int
- func (f *FaceRecognizer) Recognize(img gocv.Mat, faces []Face) (personIDs, confidences []int)
- func (f *FaceRecognizer) RegisterFace(img gocv.Mat, face Face, personID int, saveToFile bool) int64
- func (f *FaceRecognizer) Save(name string)
- func (f *FaceRecognizer) SetTrackingModeEnabled(enabled bool)
Constants ¶
const UnknownFace = -10000
UnknownFace is when the FaceRecognizer cannot identify a Face.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Face ¶
type Face struct {
// contains filtered or unexported fields
}
Face is a wrapper around cv::pvl::Face.
func (*Face) IsLeftEyeClosed ¶
IsLeftEyeClosed checks if the right sys is closed or not.
func (*Face) IsRightEyeClosed ¶
IsRightEyeClosed checks if the right sys is closed or not.
func (*Face) IsSmiling ¶
IsSmiling Face? :) You must call FaceDetector's DetectEye() and DetectSmile() with this Face first, or this function will throw an exception.
func (*Face) LeftEyePosition ¶
LeftEyePosition of Face.
func (*Face) RightEyePosition ¶
RightEyePosition of Face.
type FaceDetector ¶
type FaceDetector struct {
// contains filtered or unexported fields
}
FaceDetector is a wrapper around the cv::pvl::FaceDetector.
func NewFaceDetector ¶
func NewFaceDetector() FaceDetector
NewFaceDetector returns a new PVL FaceDetector.
func (*FaceDetector) DetectBlink ¶
func (f *FaceDetector) DetectBlink(img gocv.Mat, face Face)
DetectBlink uses PVL FaceDetector to detect blink on a Face.
func (*FaceDetector) DetectEye ¶
func (f *FaceDetector) DetectEye(img gocv.Mat, face Face)
DetectEye uses PVL FaceDetector to detect eyes on a Face.
func (*FaceDetector) DetectFaceRect ¶
func (f *FaceDetector) DetectFaceRect(img gocv.Mat) []Face
DetectFaceRect tries to detect Faces from the image Mat passed in as the param. The Mat must be a grayed image that has only one channel and 8-bit depth.
func (*FaceDetector) DetectMouth ¶
func (f *FaceDetector) DetectMouth(img gocv.Mat, face Face)
DetectMouth uses PVL FaceDetector to detect mouth on a Face.
func (*FaceDetector) DetectSmile ¶
func (f *FaceDetector) DetectSmile(img gocv.Mat, face Face)
DetectSmile uses PVL FaceDetector to detect smile on a Face.
func (*FaceDetector) GetBlinkThreshold ¶
func (f *FaceDetector) GetBlinkThreshold() int
GetBlinkThreshold gets the threshold value used for evaluating blink.
func (*FaceDetector) GetMaxDetectableFaces ¶
func (f *FaceDetector) GetMaxDetectableFaces() int
GetMaxDetectableFaces Returns the maximum number of detected faces.
func (*FaceDetector) GetMinFaceSize ¶
func (f *FaceDetector) GetMinFaceSize() int
GetMinFaceSize gets the minimum face size in pixel.
func (*FaceDetector) GetRIPAngleRange ¶
func (f *FaceDetector) GetRIPAngleRange() int
GetRIPAngleRange returns RIP(Rotation-In-Plane) angle range for face detection.
func (*FaceDetector) GetROPAngleRange ¶
func (f *FaceDetector) GetROPAngleRange() int
GetROPAngleRange returns ROP(Rotation-Out-Of-Plane) angle range for face detection.
func (*FaceDetector) GetSmileThreshold ¶
func (f *FaceDetector) GetSmileThreshold() int
GetSmileThreshold gets the threshold value used for evaluating smiles.
func (*FaceDetector) IsTrackingModeEnabled ¶
func (f *FaceDetector) IsTrackingModeEnabled() bool
IsTrackingModeEnabled checks if the PVL FaceDetector tracking mode is enabled.
func (*FaceDetector) SetBlinkThreshold ¶
func (f *FaceDetector) SetBlinkThreshold(thresh int)
SetBlinkThreshold sets the threshold value used for evaluating blink. When the blink score is equal or greater than this threshold, the eye is considered closing. Default value is 50.
func (*FaceDetector) SetMaxDetectableFaces ¶
func (f *FaceDetector) SetMaxDetectableFaces(max int)
SetMaxDetectableFaces sets the maximum number of detected faces.
func (*FaceDetector) SetMinFaceSize ¶
func (f *FaceDetector) SetMinFaceSize(min int)
SetMinFaceSize sets the minimum face size in pixel.
func (*FaceDetector) SetRIPAngleRange ¶
func (f *FaceDetector) SetRIPAngleRange(rip int)
SetRIPAngleRange sets RIP(Rotation-In-Plane) angle range for face detection. Rotated faces within this angle range can be detected when detect method is invoked. If you specify small value for the range, Detection takes lesser time since it doesn't need to find much rotated faces. Default value is 135.
func (*FaceDetector) SetROPAngleRange ¶
func (f *FaceDetector) SetROPAngleRange(rop int)
SetROPAngleRange sets ROP(Rotation-Out-Of-Plane) angle range for face detection. Rotated faces within this angle range can be detected when detect method is invoked. If you specify small value for the range, Detection takes lesser time since it doesn't need to find much rotated faces. Default value is 90.
func (*FaceDetector) SetSmileThreshold ¶
func (f *FaceDetector) SetSmileThreshold(thresh int)
SetSmileThreshold sets the threshold value used for evaluating smiles. When the blink score is equal or greater than this threshold, the eye is considered smiling. Default value is 48.
func (*FaceDetector) SetTrackingModeEnabled ¶
func (f *FaceDetector) SetTrackingModeEnabled(enabled bool)
SetTrackingModeEnabled sets if the PVL FaceDetector tracking mode is enabled.
type FaceRecognizer ¶
type FaceRecognizer struct {
// contains filtered or unexported fields
}
FaceRecognizer is a wrapper around the cv::pvl::FaceRecognizer.
func LoadFaceRecognizer ¶
func LoadFaceRecognizer(name string) FaceRecognizer
LoadFaceRecognizer loads data from file and returns a FaceRecognizer.
func NewFaceRecognizer ¶
func NewFaceRecognizer() FaceRecognizer
NewFaceRecognizer returns a new PVL FaceRecognizer.
func (*FaceRecognizer) CreateNewPersonID ¶
func (f *FaceRecognizer) CreateNewPersonID() int
CreateNewPersonID gets the next available ID from the PVL FaceRecognizer to be added to the database.
func (*FaceRecognizer) DeregisterFace ¶
func (f *FaceRecognizer) DeregisterFace(faceID int64)
DeregisterFace deregisters the previously registered face from the internal database.
func (*FaceRecognizer) DeregisterPerson ¶
func (f *FaceRecognizer) DeregisterPerson(personID int)
DeregisterPerson deregisters the previously registered person from the internal database.
func (*FaceRecognizer) Empty ¶
func (f *FaceRecognizer) Empty() bool
Empty checks if FaceRecognizer has no data.
func (*FaceRecognizer) GetNumRegisteredPersons ¶
func (f *FaceRecognizer) GetNumRegisteredPersons() int
GetNumRegisteredPersons gets the number of people in the current database.
func (*FaceRecognizer) Recognize ¶
func (f *FaceRecognizer) Recognize(img gocv.Mat, faces []Face) (personIDs, confidences []int)
Recognize recognizes faces with the given image and face information.
func (*FaceRecognizer) RegisterFace ¶
RegisterFace registers face information into the internal database.
func (*FaceRecognizer) Save ¶
func (f *FaceRecognizer) Save(name string)
Save FaceRecognizer data to file.
func (*FaceRecognizer) SetTrackingModeEnabled ¶
func (f *FaceRecognizer) SetTrackingModeEnabled(enabled bool)
SetTrackingModeEnabled sets if the PVL FaceRecognizer tracking mode is enabled.