Hey guys,
My Code:
status = new MatOfByte();
err = new MatOfFloat();
Video.calcOpticalFlowPyrLK(previousMatFrame, currentMatFrame, prevuisMatOfPoint2f, pointsWichAreFound, status, err);
byte statusS[] = status.toArray();
//the exception after status.toArray();
08-14 14:00:11.086: E/AndroidRuntime(6639): java.lang.RuntimeException: Native Mat has unexpected type or size: Mat [ 6*1*CV_32FC2, isCont=true, isSubmat=false, nativeObj=0x6c0bb388, dataAddr=0x6c0b3f00 ]
08-14 14:00:11.086: E/AndroidRuntime(6639): at org.opencv.core.MatOfByte.toArray(MatOfByte.java:54)
08-14 14:00:11.086: E/AndroidRuntime(6639): at de.itintouch.mausapp.activitys.MausActivity.onCameraFrame(MausActivity.java:266)
08-14 14:00:11.086: E/AndroidRuntime(6639): at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:387)
08-14 14:00:11.086: E/AndroidRuntime(6639): at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:321)
08-14 14:00:11.086: E/AndroidRuntime(6639): at java.lang.Thread.run(Thread.java:864)
If i delete line 54 for converting the status object into an array, the application runs in normal case without errors. What could it be?? Please help me.