基于Dragonboard 410c android系统实现人的眼球识别功能
时间:02-17
来源:互联网
点击:
="line" id="LC83">
((DetectionBasedTracker*)thiz)->run();
="line" id="LC84">
}
="line" id="LC85">
catch(cv::Exception e)
="line" id="LC86">
{
="line" id="LC87">
LOGD("nativeStart catched cv::Exception: %s", e.what());
="line" id="LC88">
jclass je = jenv->FindClass("org/opencv/core/CvException");
="line" id="LC89">
if(!je)
="line" id="LC90">
je = jenv->FindClass("java/lang/Exception");
="line" id="LC91">
jenv->ThrowNew(je, e.what());
="line" id="LC92">
}
="line" id="LC93">
catch (...)
="line" id="LC94">
{
="line" id="LC95">
LOGD("nativeStart catched unknown exception");
="line" id="LC96">
jclass je = jenv->FindClass("java/lang/Exception");
="line" id="LC97">
jenv->ThrowNew(je, "Unknown exception in JNI code {highgui::VideoCapture_n_1VideoCapture__()}");
="line" id="LC98">
}
="line" id="LC99">
}
="line">
="line">
="line" id="LC101">
JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeStop
="line" id="LC102">
(JNIEnv * jenv, jclass, jlong thiz)
="line" id="LC103">
{
="line" id="LC104">
try
="line" id="LC105">
{
="line" id="LC106">
((DetectionBasedTracker*)thiz)->stop();
="line" id="LC107">
}
="line" id="LC108">
catch(cv::Exception e)
="line" id="LC109">
{
="line" id="LC110">
LOGD("nativeStop catched cv::Exception: %s", e.what());
="line" id="LC111">
jclass je = jenv->FindClass("org/opencv/core/CvException");
="line" id="LC112">
if(!je)
="line" id="LC113">
je = jenv->FindClass("java/lang/Exception");
="line" id="LC114">
jenv->ThrowNew(je, e.what());
="line" id="LC115">
}
="line" id="LC116">
catch (...)
="line" id="LC117">
{
="line" id="LC118">
LOGD("nativeStop catched unknown exception");
="line" id="LC119">
jclass je = jenv->FindClass("java/lang/Exception");
="line" id="LC120">
jenv->ThrowNew(je, "Unknown exception in JNI code {highgui::VideoCapture_n_1VideoCapture__()}");
="line" id="LC121">
}
="line" id="LC122">
}
="line">
="line">
="line" id="LC124">
JNIEXPORT void JNICALL Java_org_opencv_samples_fd_DetectionBasedTracker_nativeSetFaceSize
="line" id="LC125">
(JNIEnv * jenv, jclass, jlong thiz, jint faceSize)
="line" id="LC126">
{
="line" id="LC127">
try
="line" id="LC128">
{
="line" id="LC129">
if (faceSize > 0)
="line" id="LC130">
{
="line" id="LC131">
DetectionBasedTracker::Parameters DetectorParams = \
="line" id="LC132">
((DetectionBasedTracker*)thiz)->getParameters();
="line" id="LC133">
DetectorParams.minObjectSize = faceSize;
="line" id="LC134">
((DetectionBasedTracker*)thiz)->setParameters(DetectorParams);
="line" id="LC135">
}
="line" id="LC136">
="line" id="LC137">
}
="line" id="LC138">
catch(cv::Exception e)
="line" id="LC139">
{
="line" id="LC140">
LOGD("nativeStop catched cv::Exception: %s", e.what());
="line" id="LC141">
jclass je = jenv->FindClass("org/opencv/core/CvException");
="line" id="LC142">
if(!je)
="line" id="LC143">
je = jenv->FindClass("java/lang/Exception");
="line" id="LC144">
jenv->ThrowNew(je, e.what());
="line" id="LC145">
}
="line" id="LC146">
catch (...)
="line" i
DragonBoard 410c 眼球识别 Android 相关文章: