06-21 17:04:06.732: E/AndroidRuntime(10162): FATAL EXCEPTION: Thread-10
06-21 17:04:06.732: E/AndroidRuntime(10162): java.lang.Exception: Unknown exception in JNI code {video::calcOpticalFlowPyrLK_11()}
06-21 17:04:06.732: E/AndroidRuntime(10162): at org.opencv.video.Video.calcOpticalFlowPyrLK_1(Native Method)
06-21 17:04:06.732: E/AndroidRuntime(10162): at org.opencv.video.Video.calcOpticalFlowPyrLK(Video.java:406)
06-21 17:04:06.732: E/AndroidRuntime(10162): at pt.rmarques.app.DemoView.objectDetection(DemoView.java:658)
06-21 17:04:06.732: E/AndroidRuntime(10162): at pt.rmarques.app.DemoView.processFrame(DemoView.java:339)
06-21 17:04:06.732: E/AndroidRuntime(10162): at pt.rmarques.app.DemoViewBase.run(DemoViewBase.java:240)
06-21 17:04:06.732: E/AndroidRuntime(10162): at java.lang.Thread.run(Thread.java:1020)
Mat mPreviousFrameROI = some_mat;
Mat mCurrentFrameROI = another_mat;
MatOfByte status = new MatOfByte();
MatOfFloat err = new MatOfFloat();
Size winSize = new Size(21,21);
MatOfPoint2f mCurrentScenePoints = new MatOfPoint2f();
// Video.calcOpticalFlowPyrLK(mPreviousFrameROI, mCurrentFrameROI, previousPoints, mCurrentScenePoints, status, err); //Same error with this one
Video.calcOpticalFlowPyrLK(mPreviousFrameROI, mCurrentFrameROI, previousPoints, mCurrentScenePoints, status, err, winSize, 1);