From 6c3ae43b1b2a1d608864236690c9b34aaf230e53 Mon Sep 17 00:00:00 2001 From: TJ Borromeo Date: Mon, 21 Sep 2015 18:41:13 -0700 Subject: [PATCH 01/18] Updating to Ubuntu 14.04 Just because. --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2af10e5..828aa3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,8 @@ # VERSION 0.1 # DOCKER-VERSION 0.1.6 -from ubuntu:12.04 +# update to 14.04, but lock versions at 12.04 for now +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 @@ -15,4 +16,4 @@ 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 -run npm install opencv || cat npm-debug.log +run npm install opencv@3.2.0 || cat npm-debug.log From c37b4ae9321a6988cdc45dfc886b9e368866ba80 Mon Sep 17 00:00:00 2001 From: TJ Borromeo Date: Mon, 21 Sep 2015 18:52:34 -0700 Subject: [PATCH 02/18] Bump versioning Pointing out that node's opencv is locked to v3.2.0. This should be updated (IMO) whenever it is known that node's opencv is stable and that prebuilt binaries are checked into the osx-binaries branch. --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 828aa3b..2327dd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,10 @@ # 2) Build: wget https://raw.github.com/dotcloud/docker/v0.1.6/contrib/docker-build/docker-build && python docker-build $USER/node-opencv < Dockerfile # 3) Test: docker run $USER/node-opencv node -e "console.log(require('opencv').version)" # -# VERSION 0.1 -# DOCKER-VERSION 0.1.6 +# VERSION 0.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 @@ -16,4 +16,5 @@ 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 +# ensure npm installs at v3.2.0 vice tip run npm install opencv@3.2.0 || cat npm-debug.log From cbaff9a1336393c35cad3502d36e37e4333a70ed Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 11:24:40 -0400 Subject: [PATCH 03/18] Make FaceRecognizer require OpenCV <= v2.4.8. For some reason OpenCV shipped a broken branch build on Ubuntu 2.4.2 64 bit. Thanks to @gluxon for noticing this: https://github.com/peterbraden/node-opencv/issues/56#issuecomment-20263153 Rather than try and be clever, I'm just gonna up the version requirements. This fixes #56 #41 #105 #240 and #275 --- src/FaceRecognizer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 6273a988bf92d04336c4c9e60ff87ec394587f8c Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 11:29:20 -0400 Subject: [PATCH 04/18] Bump version requirements --- .travis.yml | 2 -- Makefile | 5 +++-- README.md | 2 +- package.json | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6dc5c5d..d0196cf 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: node_js node_js: - - '0.10' - - '0.11' - '0.12' - "iojs-v1.0.4" diff --git a/Makefile b/Makefile index bcacd40..a9462b6 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,4 @@ release: @echo "Publishing to NPM" @npm publish +.PHONY: release 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/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", From 0b723e99aa4b9b2dff8ca41ed7ecf9af4385c6cb Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 11:41:53 -0400 Subject: [PATCH 05/18] build on travis/osx --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index d0196cf..70004d8 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,13 @@ language: node_js +os: + - linux + - osx + +matrix: + allow_failures: + - os: osx + node_js: - '0.12' - "iojs-v1.0.4" From d9fee0f814afc1b278dd3b9a1506a66a57869893 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 12:27:01 -0400 Subject: [PATCH 06/18] try docker and travis --- .travis.yml | 6 ++++++ Dockerfile | 1 + 2 files changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 70004d8..a1d67bc 100755 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,10 @@ node_js: - '0.12' - "iojs-v1.0.4" +sudo: required +services: + - docker + compiler: clang env: @@ -43,6 +47,8 @@ before_install: # or if we put [publish binary] in the commit message - if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then PUBLISH_BINARY=true; fi; - platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/") + - docker build -t peterbraden/node-opencv . + - docker run peterbraden/node-opencv /bin/sh -c "cd /root/node-opencv; make test" install: # ensure source install works diff --git a/Dockerfile b/Dockerfile index 2af10e5..dd98f18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,3 +16,4 @@ 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 run npm install opencv || cat npm-debug.log +run add . /root/node-opencv From ae84a6891bebda4d602bbe00766b690b7a610897 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 12:38:33 -0400 Subject: [PATCH 07/18] Revert "try docker and travis" This reverts commit d9fee0f814afc1b278dd3b9a1506a66a57869893. --- .travis.yml | 6 ------ Dockerfile | 1 - 2 files changed, 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index a1d67bc..70004d8 100755 --- a/.travis.yml +++ b/.travis.yml @@ -12,10 +12,6 @@ node_js: - '0.12' - "iojs-v1.0.4" -sudo: required -services: - - docker - compiler: clang env: @@ -47,8 +43,6 @@ before_install: # or if we put [publish binary] in the commit message - if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then PUBLISH_BINARY=true; fi; - platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/") - - docker build -t peterbraden/node-opencv . - - docker run peterbraden/node-opencv /bin/sh -c "cd /root/node-opencv; make test" install: # ensure source install works diff --git a/Dockerfile b/Dockerfile index dd98f18..2af10e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,4 +16,3 @@ 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 run npm install opencv || cat npm-debug.log -run add . /root/node-opencv From 52da870c3f2c469a2d6a67e06332b989e10e1489 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 18:41:09 +0200 Subject: [PATCH 08/18] Revert "Revert "try docker and travis"" This reverts commit ae84a6891bebda4d602bbe00766b690b7a610897. --- .travis.yml | 6 ++++++ Dockerfile | 1 + 2 files changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 70004d8..a1d67bc 100755 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,10 @@ node_js: - '0.12' - "iojs-v1.0.4" +sudo: required +services: + - docker + compiler: clang env: @@ -43,6 +47,8 @@ before_install: # or if we put [publish binary] in the commit message - if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then PUBLISH_BINARY=true; fi; - platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/") + - docker build -t peterbraden/node-opencv . + - docker run peterbraden/node-opencv /bin/sh -c "cd /root/node-opencv; make test" install: # ensure source install works diff --git a/Dockerfile b/Dockerfile index 2af10e5..dd98f18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,3 +16,4 @@ 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 run npm install opencv || cat npm-debug.log +run add . /root/node-opencv From f172d5ceaa44fd516fbef29a6e407db08e4a2d83 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 19:08:26 +0200 Subject: [PATCH 09/18] Correct travis / docker build --- .travis.yml | 3 +-- Dockerfile | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a1d67bc..ecdcd6d 100755 --- a/.travis.yml +++ b/.travis.yml @@ -47,8 +47,6 @@ before_install: # or if we put [publish binary] in the commit message - if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then PUBLISH_BINARY=true; fi; - platform=$(uname -s | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/") - - docker build -t peterbraden/node-opencv . - - docker run peterbraden/node-opencv /bin/sh -c "cd /root/node-opencv; make test" install: # ensure source install works @@ -56,6 +54,7 @@ install: # test our module - npm test - node lib/opencv.js + - docker build -t peterbraden/node-opencv . before_script: - echo "Publishing native platform Binary Package? ->" $PUBLISH_BINARY diff --git a/Dockerfile b/Dockerfile index dd98f18..5361267 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,5 +15,7 @@ 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 -run npm install opencv || cat npm-debug.log -run add . /root/node-opencv +WORKDIR /root/node-opencv +add . /root/node-opencv +run npm install --unsafe-perm --build-from-source || cat npm-debug.log +run make test From ee29e56c73e16f8887ed36f46cedf514364f32d5 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 19:19:53 +0200 Subject: [PATCH 10/18] add 12:04 dockerfile --- test/Dockerfile-ubuntu-12-04 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/Dockerfile-ubuntu-12-04 diff --git a/test/Dockerfile-ubuntu-12-04 b/test/Dockerfile-ubuntu-12-04 new file mode 100644 index 0000000..2af10e5 --- /dev/null +++ b/test/Dockerfile-ubuntu-12-04 @@ -0,0 +1,18 @@ +# This file describes how to build node-opencv into a runnable linux container with all dependencies installed +# To build: +# 1) Install docker (http://docker.io) +# 2) Build: wget https://raw.github.com/dotcloud/docker/v0.1.6/contrib/docker-build/docker-build && python docker-build $USER/node-opencv < Dockerfile +# 3) Test: docker run $USER/node-opencv node -e "console.log(require('opencv').version)" +# +# VERSION 0.1 +# DOCKER-VERSION 0.1.6 + +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 +run npm install opencv || cat npm-debug.log From 5d48db4bd09e80fc28549f493bdbb21c9d87d345 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 19:21:53 +0200 Subject: [PATCH 11/18] unpeg version - version in npm should _always_ be stable --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2327dd9..3919141 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,4 +17,4 @@ 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 # ensure npm installs at v3.2.0 vice tip -run npm install opencv@3.2.0 || cat npm-debug.log +run npm install opencv || cat npm-debug.log From 5663d6fac124701dbd3ed99b54deff51e17163fd Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 19:28:14 +0200 Subject: [PATCH 12/18] add Dockerfile 14.04 --- test/Dockerfile-ubuntu-14-04 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/Dockerfile-ubuntu-14-04 diff --git a/test/Dockerfile-ubuntu-14-04 b/test/Dockerfile-ubuntu-14-04 new file mode 100644 index 0000000..3919141 --- /dev/null +++ b/test/Dockerfile-ubuntu-14-04 @@ -0,0 +1,20 @@ +# This file describes how to build node-opencv into a runnable linux container with all dependencies installed +# To build: +# 1) Install docker (http://docker.io) +# 2) Build: wget https://raw.github.com/dotcloud/docker/v0.1.6/contrib/docker-build/docker-build && python docker-build $USER/node-opencv < Dockerfile +# 3) Test: docker run $USER/node-opencv node -e "console.log(require('opencv').version)" +# +# VERSION 0.2 +# DOCKER-VERSION 8.1.2 + +# update to 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 +# ensure npm installs at v3.2.0 vice tip +run npm install opencv || cat npm-debug.log From b96c99e5c1a438129c994aeac4dd639ed859fdaa Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 19:32:50 +0200 Subject: [PATCH 13/18] build in travis --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ecdcd6d..f60e146 100755 --- a/.travis.yml +++ b/.travis.yml @@ -54,7 +54,8 @@ install: # test our module - npm test - node lib/opencv.js - - docker build -t peterbraden/node-opencv . + - docker build -t peterbraden/node-opencv-ubuntu-12-04 -f test/Dockerfile-ubuntu-12-04 . + - docker build -t peterbraden/node-opencv-ubuntu-12-04 -f test/Dockerfile-ubuntu-14-04 . before_script: - echo "Publishing native platform Binary Package? ->" $PUBLISH_BINARY From b5f62f1f34a407c3fd8728fb246851c507f27e2b Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 19:38:03 +0200 Subject: [PATCH 14/18] disable osx until https://github.com/travis-ci/travis-ci/issues/2311 --- .travis.yml | 2 +- Makefile | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f60e146..b376422 100755 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: node_js os: - linux - - osx +# - osx matrix: allow_failures: diff --git a/Makefile b/Makefile index a9462b6..0d4c2d8 100644 --- a/Makefile +++ b/Makefile @@ -33,3 +33,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-12-04 -f test/Dockerfile-ubuntu-14-04 . + +.PHONY: travis-build From 83237831ac05bfb361cc4d719a08043f0840e73b Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 19:39:50 +0200 Subject: [PATCH 15/18] typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b376422..be279c2 100755 --- a/.travis.yml +++ b/.travis.yml @@ -55,7 +55,7 @@ install: - 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-12-04 -f test/Dockerfile-ubuntu-14-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 From 2f82d00951fa08a3a578788b687383bb87d56d13 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 19:47:51 +0200 Subject: [PATCH 16/18] disable iojs build until I can resolve nan issues --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index be279c2..6c0f797 100755 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ matrix: node_js: - '0.12' - - "iojs-v1.0.4" +# - "iojs-v1.0.4" sudo: required services: From b7ae20129458f2c1edbeb389c4947148b6cf8110 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 19:57:46 +0200 Subject: [PATCH 17/18] stupid whitespace --- .editorconfig | 2 +- Makefile | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) 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/Makefile b/Makefile index 0d4c2d8..9878379 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,6 @@ 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-12-04 -f test/Dockerfile-ubuntu-14-04 . - + 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 From 00bb8d98588951acfb3338e9c3a57c64408c5f40 Mon Sep 17 00:00:00 2001 From: Peter Braden Date: Tue, 22 Sep 2015 20:09:33 +0200 Subject: [PATCH 18/18] disable broken example --- examples/salt.js | 2 ++ 1 file changed, 2 insertions(+) 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); } } +*/