Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
Hololens (RS4)
Windows SDK 10.0.17134
Unity 2017.4.3f1
HoloToolkit-Unity-2017.4.0.0
  • Loading branch information
EnoxSoftware committed Jul 20, 2018
1 parent bb93310 commit 63c0c63
Show file tree
Hide file tree
Showing 20 changed files with 665 additions and 28,813 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace HoloLensWithDlibFaceLandmarkDetectorExample
/// An example of AR head projection using OpenCVForUnity and DlibLandmarkDetector on Hololens.
/// </summary>
[RequireComponent(typeof(HololensCameraStreamToMatHelper))]
public class HoloLensARHeadExample : MonoBehaviour
public class HoloLensARHeadExample : ExampleSceneBase
{
[SerializeField, HeaderAttribute ("Preview")]

Expand Down Expand Up @@ -323,8 +323,10 @@ bool hasUpdatedDetectionResult {
}

// Use this for initialization
void Start ()
protected override void Start ()
{
base.Start ();

displayCameraPreviewToggle.isOn = displayCameraPreview;
useSeparateDetectionToggle.isOn = useSeparateDetection;
displayAxesToggle.isOn = displayAxes;
Expand Down Expand Up @@ -576,7 +578,7 @@ public void OnFrameMatAcquired (Mat bgraMat, Matrix4x4 projectionMatrix, Matrix4

OpenCVForUnity.Rect rect = rects [0];

// Adjust to Dilb's result.
// correct the deviation of the detection result of the face rectangle of OpenCV and Dlib.
rect.y += (int)(rect.height * 0.1f);

//detect landmark points
Expand Down Expand Up @@ -632,7 +634,7 @@ public void OnFrameMatAcquired (Mat bgraMat, Matrix4x4 projectionMatrix, Matrix4

OpenCVForUnity.Rect rect = resultObjects [0];

// Adjust to Dilb's result.
// correct the deviation of the detection result of the face rectangle of OpenCV and Dlib.
rect.y += (int)(rect.height * 0.1f);

//detect landmark points
Expand Down Expand Up @@ -715,7 +717,7 @@ void Update ()

OpenCVForUnity.Rect rect = rects [0];

// Adjust to Dilb's result.
// correct the deviation of the detection result of the face rectangle of OpenCV and Dlib.
rect.y += (int)(rect.height * 0.1f);

//detect landmark points
Expand Down Expand Up @@ -760,7 +762,7 @@ void Update ()

OpenCVForUnity.Rect rect = resultObjects [0];

// Adjust to Dilb's result.
// correct the deviation of the detection result of the face rectangle of OpenCV and Dlib.
rect.y += (int)(rect.height * 0.1f);

//detect landmark points
Expand Down Expand Up @@ -1008,11 +1010,7 @@ void OnDestroy ()
/// </summary>
public void OnBackButtonClick ()
{
#if UNITY_5_3 || UNITY_5_3_OR_NEWER
SceneManager.LoadScene ("HoloLensWithDlibFaceLandmarkDetectorExample");
#else
Application.LoadLevel ("HoloLensWithDlibFaceLandmarkDetectorExample");
#endif
LoadScene ("HoloLensWithDlibFaceLandmarkDetectorExample");
}

/// <summary>
Expand Down
Loading

0 comments on commit 63c0c63

Please sign in to comment.