Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Conflicts:
	Dockerfile
  • Loading branch information
borromeotlhs committed Sep 23, 2015
2 parents f888846 + 709df98 commit e35522f
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 15 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 2 additions & 0 deletions examples/salt.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*
var cv = require('../lib/opencv');
cv.readImage("./files/mona.png", function(err, im) {
Expand All @@ -18,3 +19,4 @@ function salt(img, n) {
img.set(y, x, 255);
}
}
*/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"url": "https://github.com/peterbraden/node-opencv.git"
},
"engines": {
"node": ">=0.10"
"node": ">=0.12"
},
"binary": {
"module_name": "opencv",
Expand Down
2 changes: 1 addition & 1 deletion src/FaceRecognizer.cc
Original file line number Diff line number Diff line change
@@ -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 <nan.h>
Expand Down
13 changes: 13 additions & 0 deletions test/Dockerfile-ubuntu-12-04
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions test/Dockerfile-ubuntu-14-04
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e35522f

Please sign in to comment.