-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix inheritance issues for `cv::face::*FaceRecognizer` * fix header guards * remove extra debug code Signed-off-by: Cocoa <[email protected]> --------- Signed-off-by: Cocoa <[email protected]>
- Loading branch information
Showing
4 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#ifndef EVISION_CUDA_IPC_H | ||
#define EVISION_CUDA_H | ||
#define EVISION_CUDA_IPC_H | ||
|
||
#pragma once | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
defmodule Evision.Face.FaceRecognizerTest do | ||
use ExUnit.Case | ||
|
||
setup do | ||
%Evision.Mat{} = image = Evision.imread( | ||
Path.join([__DIR__, "testdata", "back.jpg"]), | ||
flags: Evision.Constant.cv_IMREAD_GRAYSCALE()) | ||
%{image: Evision.Mat.as_type(image, :s32)} | ||
end | ||
|
||
describe "functions from base class Evision.Face.FaceRecognizer is available in sub-classes" do | ||
test "Evision.Face.EigenFaceRecognizer.t()", %{image: image} do | ||
module = Evision.Face.EigenFaceRecognizer | ||
face_recogniser = module.create() | ||
face_recogniser = module.train(face_recogniser, [image], Nx.tensor([0], type: :s32)) | ||
assert face_recogniser.__struct__ == module | ||
end | ||
|
||
test "Evision.Face.FisherFaceRecognizer.t()", %{image: image} do | ||
module = Evision.Face.FisherFaceRecognizer | ||
face_recogniser = module.create() | ||
face_recogniser = module.train(face_recogniser, [image, image], Nx.tensor([0, 1], type: :s32)) | ||
assert face_recogniser.__struct__ == module | ||
end | ||
|
||
test "Evision.Face.LBPHFaceRecognizer.t()", %{image: image} do | ||
module = Evision.Face.LBPHFaceRecognizer | ||
face_recogniser = module.create() | ||
face_recogniser = module.train(face_recogniser, [image], Nx.tensor([0], type: :s32)) | ||
assert face_recogniser.__struct__ == module | ||
end | ||
end | ||
end |