I am trying to use piotr dollar's model to detect edges in IOS as suggested here. https://docs.opencv.org/3.1.0/d0/da5/tutorial_ximgproc_prediction.html
String modelFilename = "./model.yml.gz";
Ptr<StructuredEdgeDetection> pDollar = createStructuredEdgeDetection(modelFilename);
pDollar->detectEdges(image, edges);
While the above code works in my machine. (Mac OS). I am unable to make it work on IOS. I am getting the following error.
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(3.4.2)
../cv3.4/opencv-3.4.2/modules/ximgproc/src/structured_edge_detection.cpp:432: error: (-215:Assertion failed)
modelFile.isOpened() in function 'StructuredEdgeDetectionImpl'
i have already looked at the following links.
https://stackoverflow.com/a/49753953/381786 https://github.com/opencv/opencv/issues/8106
Any pointers on how to do this.