for motvey

parent 80312550
......@@ -153,7 +153,7 @@ int Loop(string filename)
/////////////////////////////////////////////////////////////////////////////////////////////
facePosition facePos;
if (trainClock % 7 == 0)
if (trainClock % 3 == 0)
{
cv::Mat frame(color_intrin.height, color_intrin.width, CV_8UC3, (uchar *) color_image);
if (detectAndDisplay(frame, facePos))
......
......@@ -17,6 +17,7 @@ namespace FaceDetection
using v8::Object;
using v8::String;
using v8::Number;
using v8::Value;
using namespace std;
......@@ -160,9 +161,9 @@ namespace FaceDetection
for(int i=0;i<frame.rows;i++)
{
Local<Array> row = Array::New(isolate);
row->Set(0,Number::New(isolate,frame.at<float>(i,0)));
row->Set(1,Number::New(isolate,frame.at<float>(i,1)));
row->Set(2,Number::New(isolate,frame.at<float>(i,2)));
row->Set(0,Number::New(isolate,(int)(frame.at<float>(i,0)*1000)));
row->Set(1,Number::New(isolate,(int)(frame.at<float>(i,1)*1000)));
row->Set(2,Number::New(isolate,(int)(frame.at<float>(i,2)*1000)));
myArray->Set(i,row);
}
......@@ -173,6 +174,7 @@ namespace FaceDetection
});
uv_thread_create(&texample_thread, [](void*){
faceDetector->Start([](cv::Mat mat){
((faceRequest *) faceCheckAsyncToken.data)->frame=mat;
printf("lol, callback\n");
uv_async_send(&faceCheckAsyncToken);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment