High-quality-ellipse-detection
High-quality-ellipse-detection copied to clipboard
Error Mexing
Hello everyone,
I am having issues generating the mex file. I have gone through all the posts and solutions regarding this problem. Particularly, implementing the solution for problem #7 fixed many errors I was receiving. However, after adding using namespace std;
and replacing char *
with std::string
I am still getting one error that I cannot seem to solve. The error I am receiving is listed below.
Building with 'MinGW64 Compiler (C++)'. C:\generateEllipseCandidates.cpp: In function 'bool isArcSegment(point2i*, int, rect*, image_double, image_char, image_char, double, double, rect*, rect*)': C:\generateEllipseCandidates.cpp:2050:4: warning: case label value is less than minimum value for type case OPP_POL : opp_pol_cnt++; break;//ͳ¼Æ·´¼«ÐÔµÄpixelÊýÁ¿ ^~~~
The instruction I used is:
mex generateEllipseCandidates.cpp -IC:\OpenCV\build\include -IC:\OpenCV\build\include\opencv -IC:\OpenCV\build\include\opencv2 -LC:\OpenCV\build\x64\vc11\lib -IC:\MATLAB\R2020a\extern\include -LC:\MATLAB\R2020a\extern\lib\win64\microsoft -lopencv_core249 -lopencv_highgui249 -lopencv_imgproc249 -llibmwlapack.lib
Any advice is greatly appreciated. Thank you for your time and consideration.
For anyone having a similar issue as per the above post, the problem appears mainly due to compiler and software version. Instead of using the MinGW64 Compiler in Matlab, I have had better success using a Visual Studio compiler. If Visual Studio is installed on your computer, Matlab will automatically detect and use the compiler. I have found that using the following combination of software versions resolved this issue:
Matlab: r2016b OpenCV: 2.4.9 Visual Studio: 2013 Community with update 5
Hope this helps.
After using your method mexing was successful, Thank You. But on running LCS_ellipse.m the following error occurs.
Invalid MEX-file 'C:\Users\kodey\Documents\High-quality-ellipse-detection-master\generateEllipseCandidates.mexw64': The specified module could not be found.
Apparently, it's an issue with .dll files as explained here
Any help on how the solve the issue is greatly appreciated. Thanks in advance.
I have the same problem, Hope Helps.
Invalid: The specified module could not be found. Error ellipseDetectionByArcSupportLSs (line 21) [candidates, edge, normals, lsimg] = generateEllipseCandidates(I, 2, specified_polarity);%1,sobel; 2,canny Error LCS_ellipse (line 32) [ellipses, ~, posi] = ellipseDetectionByArcSupportLSs(I, Tac, Tr, specified_polarity);