timknapen / ofxsurftracker Goto Github PK
View Code? Open in Web Editor NEWsimple openCV SURF tracking addon for openFrameworks.
License: MIT License
simple openCV SURF tracking addon for openFrameworks.
License: MIT License
hi
your addon looks very interesting.
any plans to update it to OF 0.9.x?
Hi there, I've found this amazing addon of yours today and I would love to use it in my projects, however, I've faced some issues while running the example.
Errors I get in the example code:
void ofApp::draw() {
...
"Life: " + ofToString(surfTracker.objectLifeTime, 2)
...
}
^ Error: No member named 'objectLifeTime'.
I can easily fix this by removing the line as it only provides information.
void ofApp::update() {
...
surfTracker.detect(vidGrabber.getPixels(), CAM_W, CAM_H);
...
}
^Error: No matching member function for call to 'detect'.
I have managed to fix this by adding .getData() as in vidGrabber.getPixels().getData()
Errors I get in the ofxSURFTracker.cpp file from the addon:
void ofxSURFTracker::detect(ofImage &img){
...
detect(img.getPixels(), inputWidth, inputHeight);
}
^ Error: No matching member function for call to 'detect'.
I have managed to fix this by adding .getData() as in img.getPixels().getData()
void ofxSURFTracker::detect(unsigned char *pix, int inputWidth, int inputHeight){
...
croppedImg.setFromPixels(inputImg.getRoiPixels(), width, height);
...
}
^ Error: No matching member function for call to 'setFromPixels'.
Again I have managed to fix this by adding .getData() as in inputImg.getRoiPixels().getData()
ofImage ofxSURFTracker::getCroppedImage(){
...
newImg.setFromPixels(croppedImg.getPixels(), croppedImg.getWidth(), croppedImg.getHeight(), OF_IMAGE_COLOR);
...
}
^ Error: No matching member function for call to 'setFromPixels'.
Yet again I have managed to fix this by adding .getData() as in croppedImg.getPixels().getData()
Now I can run the example and see the detection working, however, when I toggle spacebar it does not learn or match any features.
Any help would be appreciated.
P.s I run this on macOS 10.12.2 and my openFrameworks version is 0.9.8.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.