Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Mexing #20

Open
GarrettFrank opened this issue Jun 28, 2020 · 3 comments
Open

Error Mexing #20

GarrettFrank opened this issue Jun 28, 2020 · 3 comments

Comments

@GarrettFrank
Copy link

GarrettFrank commented Jun 28, 2020

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.

@GarrettFrank
Copy link
Author

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.

@SriramKodey
Copy link

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.

@Ucarrot319
Copy link

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants