Error while using OpenCV absdiff on Android
I'm trying to use absdiff function in order to implement basic motion detection on android. My code looks following:
public Mat OnCameraFrame(CameraBridgeViewBase.ICvCameraViewFrame inputFrame)
{
Mat frame = inputFrame.Gray();
if (firstFrame == null)
{
firstFrame = frame;
}
else
{
Mat temp = new Mat();
Core.Absdiff(firstFrame, frame, temp);
Imgproc.Threshold(temp, temp, 25, 255, Imgproc.ThreshBinary);
return temp;
}
return frame;
}
But in line where Absdiff function is executed I get an error like:
at cv::Mat::create(int, int const*, int)+103 [0x7e7ed304]
at cv::_OutputArray::create(int, int const*, int, int, bool, int) const+1064 [0x7e801af1]
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Fatal signal 11 (SIGSEGV) at 0x77a482e1 (code=2), thread 8967 (Thread-2162)
I'd be grateful for any kind of help, because I'm totally out of ideas. Sorry for the bad formatting, but I don't get it. Greets, Maciek
xamarin ? mono ? what the hell are you doing ?
I'm doing an Android app with use of Visual studio and Xamarin and I'm using Opencv Android SDK
Hello, you solved the problem?
@juparmer, please don't post answers, if you don't have any ..
Sorry, just i want the answer.