Return to old version of opencv to try compilation.

This commit is contained in:
edgarsilva 2015-02-04 12:51:35 -06:00
parent 9035d9b0fb
commit 7d16f2e046
3 changed files with 24 additions and 23 deletions

View File

@ -14,8 +14,8 @@ env:
before_install: before_install:
# Fix a problem with apt-get failing later, see http://docs.travis-ci.com/user/installing-dependencies/#Installing-Ubuntu-packages # Fix a problem with apt-get failing later, see http://docs.travis-ci.com/user/installing-dependencies/#Installing-Ubuntu-packages
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo add-apt-repository -y ppa:kubuntu-ppa/backports # - sudo add-apt-repository -y ppa:kubuntu-ppa/backports
- sudo apt-get update # - sudo apt-get update
- sudo apt-get install libcv-dev - sudo apt-get install libcv-dev
- sudo apt-get install libopencv-dev - sudo apt-get install libopencv-dev
- sudo apt-get install libhighgui-dev - sudo apt-get install libhighgui-dev

View File

@ -1,6 +1,6 @@
var cv = require('../lib/opencv') var cv = require('../lib/opencv');
var trainingData = [] var trainingData = [];
/* /*
for (var i = 1; i< 41; i++){ for (var i = 1; i< 41; i++){
for (var j = 1; j<10; j++){ for (var j = 1; j<10; j++){
@ -22,5 +22,5 @@ cv.readImage("/Users/peterbraden/Downloads/orl_faces/s6/10.pgm", function(e, im)
*/ */
cv.readImage("./examples/files/mona.png", function(e, mat){ cv.readImage("./examples/files/mona.png", function(e, mat){
var th = mat.threshold(200, 200, "Threshold to Zero Inverted"); var th = mat.threshold(200, 200, "Threshold to Zero Inverted");
th.save('./examples/tmp/out.png') th.save('./examples/tmp/out.png');
}) });

View File

@ -42,17 +42,17 @@ NAN_METHOD(BackgroundSubtractorWrap::New) {
NAN_METHOD(BackgroundSubtractorWrap::CreateMOG) { NAN_METHOD(BackgroundSubtractorWrap::CreateMOG) {
NanScope(); NanScope();
int history = 200; // int history = 200;
int nmixtures = 5; // int nmixtures = 5;
double backgroundRatio = 0.7; // double backgroundRatio = 0.7;
double noiseSigma = 0; // double noiseSigma = 0;
//
if(args.Length() > 1){ // if(args.Length() > 1){
INT_FROM_ARGS(history, 0) // INT_FROM_ARGS(history, 0)
INT_FROM_ARGS(nmixtures, 1) // INT_FROM_ARGS(nmixtures, 1)
DOUBLE_FROM_ARGS(backgroundRatio, 2) // DOUBLE_FROM_ARGS(backgroundRatio, 2)
DOUBLE_FROM_ARGS(noiseSigma, 3) // DOUBLE_FROM_ARGS(noiseSigma, 3)
} // }
Local<Object> n = NanNew(BackgroundSubtractorWrap::constructor)->GetFunction()->NewInstance(); Local<Object> n = NanNew(BackgroundSubtractorWrap::constructor)->GetFunction()->NewInstance();
@ -136,3 +136,4 @@ BackgroundSubtractorWrap::BackgroundSubtractorWrap(cv::Ptr<cv::BackgroundSubtrac
}; };
#endif #endif