diff --git a/.editorconfig b/.editorconfig index 162ee53..dc57784 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ charset = utf-8 # Tab indentation (no size specified) [Makefile] -indent_style = space +indent_style = tab indent_size = 2 # Indentation override for all JS under lib directory diff --git a/.travis.yml b/.travis.yml index 6dc5c5d..6c0f797 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,20 @@ language: node_js +os: + - linux +# - osx + +matrix: + allow_failures: + - os: osx + node_js: - - '0.10' - - '0.11' - '0.12' - - "iojs-v1.0.4" +# - "iojs-v1.0.4" + +sudo: required +services: + - docker compiler: clang @@ -44,6 +54,8 @@ install: # test our module - npm test - node lib/opencv.js + - docker build -t peterbraden/node-opencv-ubuntu-12-04 -f test/Dockerfile-ubuntu-12-04 . + - docker build -t peterbraden/node-opencv-ubuntu-14-04 -f test/Dockerfile-ubuntu-14-04 . before_script: - echo "Publishing native platform Binary Package? ->" $PUBLISH_BINARY diff --git a/Dockerfile b/Dockerfile index 7e0651d..930a6df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,9 @@ # 3) Test: docker run $USER/node-opencv node -e "console.log(require('opencv').version)" # # VERSION 0.2 -# DOCKER-VERSION 1.8.2 +# DOCKER-VERSION 8.1.2 -# update to 14.04, but lock versions at 12.04 for now +# update to 14.04 from ubuntu:14.04 run apt-get update -qq run apt-get install -y software-properties-common python-software-properties diff --git a/Makefile b/Makefile index bcacd40..9878379 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ VERSION := $(shell node -e "console.log(require('./package.json').version)") -.PHONY: default release smoke - test: npm test +.PHONY: test smoke: npm install --build-from-source node smoke/smoketest.js npm test +.PHONY: smoke release: @@ -32,3 +32,10 @@ release: @echo "Publishing to NPM" @npm publish +.PHONY: release + + +travis-build: + docker build -t peterbraden/node-opencv-ubuntu-12-04 -f test/Dockerfile-ubuntu-12-04 . + docker build -t peterbraden/node-opencv-ubuntu-14-04 -f test/Dockerfile-ubuntu-14-04 . +.PHONY: travis-build diff --git a/README.md b/README.md index c538350..cedc471 100755 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ detection. This can be used for face detection etc. mat.detectObject(haar_cascade_xml, opts, function(err, matches){}) ``` -For convenience in face recognition, cv.FACE_CASCADE is a cascade that can be used for frontal face recognition. +For convenience in face detection, cv.FACE_CASCADE is a cascade that can be used for frontal face detection. Also: diff --git a/examples/salt.js b/examples/salt.js index 737e834..25c9861 100755 --- a/examples/salt.js +++ b/examples/salt.js @@ -1,3 +1,4 @@ +/* var cv = require('../lib/opencv'); cv.readImage("./files/mona.png", function(err, im) { @@ -18,3 +19,4 @@ function salt(img, n) { img.set(y, x, 255); } } +*/ diff --git a/package.json b/package.json index b4c916e..226053a 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "url": "https://github.com/peterbraden/node-opencv.git" }, "engines": { - "node": ">=0.10" + "node": ">=0.12" }, "binary": { "module_name": "opencv", diff --git a/src/FaceRecognizer.cc b/src/FaceRecognizer.cc index 535a18c..3814d45 100644 --- a/src/FaceRecognizer.cc +++ b/src/FaceRecognizer.cc @@ -1,7 +1,7 @@ #include "FaceRecognizer.h" #include "OpenCV.h" -#if ((CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >=4)) +#if ((CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >=4) && (CV_SUBMINOR_VERSION>=4)) #include "Matrix.h" #include diff --git a/test/Dockerfile-ubuntu-12-04 b/test/Dockerfile-ubuntu-12-04 new file mode 100644 index 0000000..735625d --- /dev/null +++ b/test/Dockerfile-ubuntu-12-04 @@ -0,0 +1,13 @@ +# This is a dockerfile to test the build on ubuntu 12.04 +from ubuntu:12.04 +run apt-get update -qq +run apt-get install -y software-properties-common python-software-properties +run add-apt-repository -y ppa:kubuntu-ppa/backports +run apt-get update +run apt-get install -y libcv-dev libcvaux-dev libhighgui-dev libopencv-dev +run curl -sL https://deb.nodesource.com/setup | bash - +run apt-get install -y nodejs +WORKDIR /root/node-opencv +add . /root/node-opencv +run npm install --unsafe-perm --build-from-source || cat npm-debug.log +run make test diff --git a/test/Dockerfile-ubuntu-14-04 b/test/Dockerfile-ubuntu-14-04 new file mode 100644 index 0000000..262a37d --- /dev/null +++ b/test/Dockerfile-ubuntu-14-04 @@ -0,0 +1,13 @@ +# This is a dockerfile to test the build on ubuntu 14.04 +from ubuntu:14.04 +run apt-get update -qq +run apt-get install -y software-properties-common python-software-properties +run add-apt-repository -y ppa:kubuntu-ppa/backports +run apt-get update +run apt-get install -y libcv-dev libcvaux-dev libhighgui-dev libopencv-dev +run curl -sL https://deb.nodesource.com/setup | bash - +run apt-get install -y nodejs +WORKDIR /root/node-opencv +add . /root/node-opencv +run npm install --unsafe-perm --build-from-source || cat npm-debug.log +run make test