Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit ccfe79a

Browse files
Merge pull request justadudewhohacks#542 from justadudewhohacks/fix-ci
fix ci
2 parents bc69acf + 97f268e commit ccfe79a

File tree

6 files changed

+131
-127
lines changed

6 files changed

+131
-127
lines changed

.travis.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
language: node_js
22

33
node_js:
4+
# node version does not matter here, since we run builds with docker
45
- '6'
5-
- '8'
6-
- '10'
7-
- 'node'
86

97
sudo: required
108

@@ -13,25 +11,27 @@ services:
1311

1412
env:
1513
- BUILD_TASK=test
16-
TAG=3.0.0-contrib
14+
TAG=3.0.0-contrib-node6
1715
- BUILD_TASK=test
18-
TAG=3.1.0-contrib
16+
TAG=3.1.0-contrib-node6
1917
- BUILD_TASK=test
20-
TAG=3.2.0-contrib
18+
TAG=3.2.0-contrib-node6
2119
- BUILD_TASK=test
22-
TAG=3.3.0-contrib
20+
TAG=3.3.0-contrib-node6
2321
- BUILD_TASK=cover
24-
TAG=3.4.0-contrib
22+
TAG=3.4.0-contrib-node6
2523
- BUILD_TASK=test
26-
TAG=3.4.0-contrib-world
24+
TAG=3.4.0-contrib-world-node6
2725
- BUILD_TASK=test
28-
TAG=3.4.1-contrib
26+
TAG=3.4.6-node6
2927
- BUILD_TASK=test
30-
TAG=3.4.2-contrib
28+
TAG=3.4.6-contrib-node6
3129
- BUILD_TASK=test
32-
TAG=3.4.3
30+
TAG=3.4.6-contrib-node8
3331
- BUILD_TASK=test
34-
TAG=3.4.3-contrib
32+
TAG=3.4.6-contrib-node10
33+
- BUILD_TASK=test
34+
TAG=3.4.6-contrib-node11
3535

3636
before_install:
3737
- chmod +x ./ci/$BUILD_TASK/$BUILD_TASK.sh

cc/modules/objdetect/HOGDescriptor.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ NAN_METHOD(HOGDescriptor::New) {
8585
}
8686

8787
HOGDescriptor* self = new HOGDescriptor();
88-
self->hog = cv::HOGDescriptor(
88+
self->hog = std::make_shared<cv::HOGDescriptor>(
8989
winSize,
9090
blockSize,
9191
blockStride,
@@ -115,7 +115,7 @@ NAN_METHOD(HOGDescriptor::GetDefaultPeopleDetector) {
115115
}
116116

117117
NAN_METHOD(HOGDescriptor::CheckDetectorSize) {
118-
FF_RETURN(Nan::New(HOGDescriptor::Converter::unwrap(info.This()).checkDetectorSize()));
118+
FF_RETURN(Nan::New(HOGDescriptor::Converter::unwrap(info.This())->checkDetectorSize()));
119119
}
120120

121121
NAN_METHOD(HOGDescriptor::SetSVMDetector) {
@@ -124,19 +124,19 @@ NAN_METHOD(HOGDescriptor::SetSVMDetector) {
124124
if (!FF_HAS_ARG(0) || FloatArrayConverter::unwrap(&detector, info[0])) {
125125
FF_THROW("expected detector to be an Array of type Number");
126126
}
127-
HOGDescriptor::Converter::unwrapPtr(info.This())->setSVMDetector(detector);
127+
HOGDescriptor::Converter::unwrap(info.This())->setSVMDetector(detector);
128128
}
129129

130130
NAN_METHOD(HOGDescriptor::Save) {
131131
FF_METHOD_CONTEXT("HOGDescriptor::Save");
132132
FF_ARG_STRING(0, std::string path);
133-
FF_UNWRAP(info.This(), HOGDescriptor)->hog.save(path);
133+
FF_UNWRAP(info.This(), HOGDescriptor)->hog->save(path);
134134
}
135135

136136
NAN_METHOD(HOGDescriptor::Load) {
137137
FF_METHOD_CONTEXT("HOGDescriptor::Load");
138138
FF_ARG_STRING(0, std::string path);
139-
FF_UNWRAP(info.This(), HOGDescriptor)->hog.load(path);
139+
FF_UNWRAP(info.This(), HOGDescriptor)->hog->load(path);
140140
}
141141

142142
NAN_METHOD(HOGDescriptor::Compute) {

cc/modules/objdetect/HOGDescriptor.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,31 @@
1313

1414
class HOGDescriptor : public Nan::ObjectWrap {
1515
public:
16-
cv::HOGDescriptor hog;
16+
std::shared_ptr<cv::HOGDescriptor> hog;
1717

1818
static Nan::Persistent<v8::FunctionTemplate> constructor;
1919

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; }
2222

23-
typedef InstanceConverter<HOGDescriptor, cv::HOGDescriptor> Converter;
23+
typedef InstanceConverter<HOGDescriptor, std::shared_ptr<cv::HOGDescriptor>> Converter;
2424

2525
static const char* getClassName() {
2626
return "HOGDescriptor";
2727
}
2828

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);
4141

4242
static NAN_MODULE_INIT(Init);
4343

0 commit comments

Comments
 (0)