diff --git a/contrib/face.go b/contrib/face.go index 69cdf0b7..620e4ced 100644 --- a/contrib/face.go +++ b/contrib/face.go @@ -17,11 +17,11 @@ type PredictResponse struct { Confidence float32 `json:"confidence"` } -var _ IFaceRecognizer = (*LBPHFaceRecognizer)(nil) -var _ IFaceRecognizer = (*FisherFaceRecognizer)(nil) -var _ IBasicFaceRecognizer = (*FisherFaceRecognizer)(nil) -var _ IFaceRecognizer = (*EigenFaceRecognizer)(nil) -var _ IBasicFaceRecognizer = (*EigenFaceRecognizer)(nil) +var _ FaceRecognizer = (*LBPHFaceRecognizer)(nil) +var _ FaceRecognizer = (*FisherFaceRecognizer)(nil) +var _ BasicFaceRecognizer = (*FisherFaceRecognizer)(nil) +var _ FaceRecognizer = (*EigenFaceRecognizer)(nil) +var _ BasicFaceRecognizer = (*EigenFaceRecognizer)(nil) // LBPHFaceRecognizer is a wrapper for the OpenCV Local Binary Patterns // Histograms face recognizer. diff --git a/contrib/face_recognizer.go b/contrib/face_recognizer.go index f811a4c7..1abaf185 100644 --- a/contrib/face_recognizer.go +++ b/contrib/face_recognizer.go @@ -11,7 +11,7 @@ import ( "gocv.io/x/gocv" ) -type IFaceRecognizer interface { +type FaceRecognizer interface { Empty() bool Train(images []gocv.Mat, labels []int) Update(newImages []gocv.Mat, newLabels []int) @@ -24,7 +24,7 @@ type IFaceRecognizer interface { Close() error } -type IBasicFaceRecognizer interface { +type BasicFaceRecognizer interface { GetEigenValues() gocv.Mat GetEigenVectors() gocv.Mat GetLabels() gocv.Mat @@ -36,14 +36,6 @@ type IBasicFaceRecognizer interface { LoadFile(fname string) } -type FaceRecognizer struct { - p unsafe.Pointer -} - -type BasicFaceRecognizer struct { - FaceRecognizer -} - func faceRecognizer_Empty(fr C.FaceRecognizer) bool { b := C.FaceRecognizer_Empty(fr) return bool(b)