我使用的是unity版本是2019.2.0f
OpenCV for Unity 2.3.3
需要自取链接:https://pan.baidu.com/s/1jTyrX69zsYQWOnJxolfI9w
提取码:smtv
之前的链接找不到了 下面是2.2.4版本的
链接: https://pan.baidu.com/s/1IAipTQxarDSVWJMtuwfs5A
提取码: 9wvk
using UnityEngine;
using UnityEngine.SceneManagement;
using System;
using System.Collections;
using System.Collections.Generic;
using OpenCVForUnity.ObjdetectModule;
using OpenCVForUnity.CoreModule;
using OpenCVForUnity.ImgprocModule;
using OpenCVForUnity.UnityUtils;
using OpenCVForUnity.ImgcodecsModule;
using UnityEngine.UI;
using OpenCVForUnity.UnityUtils.Helper;
namespace OpenCVForUnityExample
{
/// <summary>
/// Face Detection Example
/// An example of human face detection using the CascadeClassifier class.
/// http://docs.opencv.org/3.2.0/db/d28/tutorial_cascade_classifier.html
/// </summary>
public class MyFaceDetection : MonoBehaviour
{
public static MyFaceDetection instance;
CascadeClassifier cascade;
public RawImage icon;
#if UNITY_WEBGL && !UNITY_EDITOR
IEnumerator getFilePath_Coroutine;
#endif
private void Awake()
{
if (instance == null)
{
instance = this;
}
}
// Use this for initialization
void Start ()
{
#if UNITY_WEBGL && !UNITY_EDITOR
getFil