|
13 | 13 |
|
14 | 14 | class HOGDescriptor : public Nan::ObjectWrap {
|
15 | 15 | public:
|
16 |
| - cv::HOGDescriptor hog; |
| 16 | + std::shared_ptr<cv::HOGDescriptor> hog; |
17 | 17 |
|
18 | 18 | static Nan::Persistent<v8::FunctionTemplate> constructor;
|
19 | 19 |
|
20 |
| - cv::HOGDescriptor* getNativeObjectPtr() { return &hog; } |
21 |
| - cv::HOGDescriptor getNativeObject() { return hog; } |
| 20 | + cv::HOGDescriptor* getNativeObjectPtr() { return hog.get(); } |
| 21 | + std::shared_ptr<cv::HOGDescriptor> getNativeObject() { return hog; } |
22 | 22 |
|
23 |
| - typedef InstanceConverter<HOGDescriptor, cv::HOGDescriptor> Converter; |
| 23 | + typedef InstanceConverter<HOGDescriptor, std::shared_ptr<cv::HOGDescriptor>> Converter; |
24 | 24 |
|
25 | 25 | static const char* getClassName() {
|
26 | 26 | return "HOGDescriptor";
|
27 | 27 | }
|
28 | 28 |
|
29 |
| - static FF_GETTER_JSOBJ(HOGDescriptor, winSize, hog.winSize, FF_UNWRAP_SIZE_AND_GET, Size::constructor); |
30 |
| - static FF_GETTER_JSOBJ(HOGDescriptor, blockSize, hog.blockSize, FF_UNWRAP_SIZE_AND_GET, Size::constructor); |
31 |
| - static FF_GETTER_JSOBJ(HOGDescriptor, blockStride, hog.blockStride, FF_UNWRAP_SIZE_AND_GET, Size::constructor); |
32 |
| - static FF_GETTER_JSOBJ(HOGDescriptor, cellSize, hog.cellSize, FF_UNWRAP_SIZE_AND_GET, Size::constructor); |
33 |
| - static FF_GETTER(HOGDescriptor, nbins, hog.nbins); |
34 |
| - static FF_GETTER(HOGDescriptor, derivAperture, hog.derivAperture); |
35 |
| - static FF_GETTER(HOGDescriptor, histogramNormType, hog.histogramNormType); |
36 |
| - static FF_GETTER(HOGDescriptor, nlevels, hog.nlevels); |
37 |
| - static FF_GETTER(HOGDescriptor, winSigma, hog.winSigma); |
38 |
| - static FF_GETTER(HOGDescriptor, L2HysThreshold, hog.L2HysThreshold); |
39 |
| - static FF_GETTER(HOGDescriptor, gammaCorrection, hog.gammaCorrection); |
40 |
| - static FF_GETTER(HOGDescriptor, signedGradient, hog.signedGradient); |
| 29 | + static FF_GETTER_JSOBJ(HOGDescriptor, winSize, hog->winSize, FF_UNWRAP_SIZE_AND_GET, Size::constructor); |
| 30 | + static FF_GETTER_JSOBJ(HOGDescriptor, blockSize, hog->blockSize, FF_UNWRAP_SIZE_AND_GET, Size::constructor); |
| 31 | + static FF_GETTER_JSOBJ(HOGDescriptor, blockStride, hog->blockStride, FF_UNWRAP_SIZE_AND_GET, Size::constructor); |
| 32 | + static FF_GETTER_JSOBJ(HOGDescriptor, cellSize, hog->cellSize, FF_UNWRAP_SIZE_AND_GET, Size::constructor); |
| 33 | + static FF_GETTER(HOGDescriptor, nbins, hog->nbins); |
| 34 | + static FF_GETTER(HOGDescriptor, derivAperture, hog->derivAperture); |
| 35 | + static FF_GETTER(HOGDescriptor, histogramNormType, hog->histogramNormType); |
| 36 | + static FF_GETTER(HOGDescriptor, nlevels, hog->nlevels); |
| 37 | + static FF_GETTER(HOGDescriptor, winSigma, hog->winSigma); |
| 38 | + static FF_GETTER(HOGDescriptor, L2HysThreshold, hog->L2HysThreshold); |
| 39 | + static FF_GETTER(HOGDescriptor, gammaCorrection, hog->gammaCorrection); |
| 40 | + static FF_GETTER(HOGDescriptor, signedGradient, hog->signedGradient); |
41 | 41 |
|
42 | 42 | static NAN_MODULE_INIT(Init);
|
43 | 43 |
|
|
0 commit comments