#include "opencv_modules.h" #ifdef HAVE_OPENCV_OBJDETECT #include "DetectionROI.h" Nan::Persistent DetectionROI::constructor; NAN_MODULE_INIT(DetectionROI::Init) { v8::Local ctor = Nan::New(DetectionROI::New); v8::Local instanceTemplate = ctor->InstanceTemplate(); constructor.Reset(ctor); ctor->SetClassName(FF::newString("DetectionROI")); instanceTemplate->SetInternalFieldCount(1); Nan::SetAccessor(instanceTemplate, FF::newString("scale"), scale_getter, scale_setter); Nan::SetAccessor(instanceTemplate, FF::newString("locations"), locations_getter, locations_setter); Nan::SetAccessor(instanceTemplate, FF::newString("confidences"), confidences_getter, confidences_setter); Nan::Set(target,FF::newString("DetectionROI"), FF::getFunction(ctor)); }; NAN_METHOD(DetectionROI::New) { FF::TryCatch tryCatch("DetectionROI::New"); FF_ASSERT_CONSTRUCT_CALL(); DetectionROI* self = new DetectionROI(); self->Wrap(info.Holder()); info.GetReturnValue().Set(info.Holder()); }; #endif