OpenCV Error on iOS

ios

#1

When I stop and start again the detection, I am getting the following error:

OpenCV Error: Assertion failed (0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows) in Mat, file /Users/MisterBuilder/.jenkins-slave/workspace/opencv-ios/src/modules/core/src/matrix.cpp, line 284
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /Users/MisterBuilder/.jenkins-slave/workspace/opencv-ios/src/modules/core/src/matrix.cpp:284: error: (-215) 0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows in function Mat

This is probably caused by the fact the camera was already open


#2

@ohad_navon I’m sorry for the delayed response.
How do you stop/start the detector? Do you create multiple detectors or just one?
I couldn’t reproduce your issue here. If you still have the problem, Can you share a sample project with the problem so I can debug it myself?


#3

I init it with
detector = AFDXDetector(delegate: self, using: AFDX_CAMERA_FRONT, maximumFaces: 1)
Just one detector, I start/stop it using the start/stop methods.