node-opencv
node-opencv copied to clipboard
calcOpticalFlowPyrLK is not a function
Hello, The example of optical-flow doesn't work for me
var flow = old_frame.calcOpticalFlowPyrLK(newFrame, goodFeatures, lk_params.winSize, lk_params.maxLevel, lk_params.criteria); ^ TypeError: old_frame.calcOpticalFlowPyrLK is not a function at /home/zahar/workplace/openCV/node-opencv/examples/optical-flow.js:44:30
what causes this?
I'm getting the same error. When I examine the methods attached to the Matrix prototype in node, calcOpticalFlowPyrLK isn't even listed.
@ZaharAd I was able to fix this by using the github master branch instead of the version installed automatically by npm. The version on npm doesn't have these features yet, but the github version does. The dependencies in your package.json should look something like this to use the github version, at least until they update the version on npm:
"dependencies": {
"opencv": "git://github.com/peterbraden/node-opencv.git"
},