Giter Club home page Giter Club logo

Comments (16)

kyamagu avatar kyamagu commented on July 18, 2024

What is your environment and PATH? You cannot use vs2010 dll's with vs2008. Also, it is recommended you use vs2010 whenever possible.

from mexopencv.

yxwang11 avatar yxwang11 commented on July 18, 2024

Thank you very much for your answer. I think I use the VS2008 environment in my computer. The Path is "C:\OpenCV2.4.2\build\x86\vc9\bin;".

This evening, I tried to use the complied mexw32 file directly in matalb, it also doesn't work. So I think that, maybe the compile progress haven't done correctly. But, it is very strange that when I compile it in matlab, it haven't gives out any wrong.

Can you give me some suggestions? Thank you very much!

2012-10-26

Yuxia Wang

发件人:Kota Yamaguchi
发送时间:2012-10-26 21:19
主题:Re: [mexopencv] Matlab crashs when I use mexopencv (#21)
收件人:"kyamagu/mexopencv"[email protected]
抄送:"yxwang11"[email protected]

What is your environment and PATH? You cannot use vs2010 dll's with vs2008. Also, it is recommended you use vs2010 whenever possible.

Reply to this email directly or view it on GitHub.

from mexopencv.

kyamagu avatar kyamagu commented on July 18, 2024

It might be because of an unconfirmed issue in VS2008. See #7

Though I'm not sure what exactly is the reason, you can try compiling opencv from source. Make sure you set the same _SECURE_SCL flags both in opencv and matlab (i.e., mexopts.bat). Also make sure you clean compiled mex files before you compile them again.

from mexopencv.

yxwang11 avatar yxwang11 commented on July 18, 2024

I have read that "question and answers" you refered.

I think maybe I should use VS2010. So I would install a VS2010 and try it again.

Thanks a lot. You are so kind for sharing your software and so kind to answer my questions patiently.

I will try to use it with VS2010. And, maybe I would bother you more, if I have probleme in that procedure. Thank you again!

2012-10-26

Yuxia Wang

发件人:Kota Yamaguchi
发送时间:2012-10-26 21:35
主题:Re: [mexopencv] Matlab crashs when I use mexopencv (#21)
收件人:"kyamagu/mexopencv"[email protected]
抄送:"yxwang11"[email protected]

It might be because of an unconfirmed issue in VS2008. See #7
Though I'm not sure what exactly is the reason, you can try compiling opencv from source. Make sure you set the same _SECURE_SCL flags both in opencv and matlab (i.e., mexopts.bat). Also make sure you clean compiled mex files before you compile them again.

Reply to this email directly or view it on GitHub.

from mexopencv.

yxwang11 avatar yxwang11 commented on July 18, 2024

Hi, Kota Yamaguchi

Recent two days, I tried many methods to make the mexopencv work in my matlab. But, finally, I failed.

I tried to compile the mexopencv in matlab 2012a with the compiler of VS2010, and replace the folder of bin and lib under the build with the new dll and lib file. I also rebuild my opencv2.4.2 with CMake and VS2010 with the option /D"_SECURE_SCL=1 ". I also modify the mexopts.bat in matlab with the D_SECURE_SCL=1 .

I can compile the mexopencv in matlab, but the matlab still crashes when I run any function in cv

I don't know what's wrong with my settings?

from mexopencv.

kyamagu avatar kyamagu commented on July 18, 2024

I have no clue. Are you still using the same path? Is everything running in 32-bit arch?

Kota

On Oct 29, 2012, at 2:03 AM, yxwang11 [email protected] wrote:

Hi, Kota Yamaguchi

Recent two days, I tried many methods to make the mexopencv work in my matlab. But, finally, I failed.

I tried to compile the mexopencv in matlab 2012a with the compiler of VS2010, and replace the folder of bin and lib under the build with the new dll and lib file. I also rebuild my opencv2.4.2 with CMake and VS2010 with the option /D"_SECURE_SCL=1 ". I also modify the mexopts.bat in matlab with the D_SECURE_SCL=1 .

I can compile the mexopencv in matlab, but the matlab still crashes when I run any function in cv

I don't know what's wrong with my settings?


Reply to this email directly or view it on GitHub.

from mexopencv.

yxwang11 avatar yxwang11 commented on July 18, 2024

I use the environment path of opencv2.4.2 for VS2010. And all software is running in 32-bit arch. But the matlab still crashes.

2012-10-29

Yuxia Wang

发件人:Kota Yamaguchi
发送时间:2012-10-29 21:22
主题:Re: [mexopencv] Matlab crashs when I use mexopencv (#21)
收件人:"kyamagu/mexopencv"[email protected]
抄送:"yxwang11"[email protected]

I have no clue. Are you still using the same path? Is everything running in 32-bit arch?

Kota

On Oct 29, 2012, at 2:03 AM, yxwang11 [email protected] wrote:

Hi, Kota Yamaguchi

Recent two days, I tried many methods to make the mexopencv work in my matlab. But, finally, I failed.

I tried to compile the mexopencv in matlab 2012a with the compiler of VS2010, and replace the folder of bin and lib under the build with the new dll and lib file. I also rebuild my opencv2.4.2 with CMake and VS2010 with the option /D"_SECURE_SCL=1 ". I also modify the mexopts.bat in matlab with the D_SECURE_SCL=1 .

I can compile the mexopencv in matlab, but the matlab still crashes when I run any function in cv

I don't know what's wrong with my settings?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

from mexopencv.

kyamagu avatar kyamagu commented on July 18, 2024

What is your mex -setup? Make sure you clean all mexw32 files before you re-compile mexopencv. Probably you'd want to make sure all dll's are set up correctly from dependency walker http://www.dependencywalker.com/ . Also, it might give you some info if you run a debugger, http://www.mathworks.com/help/matlab/matlab_external/debugging-c-c-language-mex-files.html

On Oct 29, 2012, at 9:26 AM, yxwang11 [email protected] wrote:

I use the environment path of opencv2.4.2 for VS2010. And all software is running in 32-bit arch. But the matlab still crashes.

2012-10-29

Yuxia Wang

发件人:Kota Yamaguchi
发送时间:2012-10-29 21:22
主题:Re: [mexopencv] Matlab crashs when I use mexopencv (#21)
收件人:"kyamagu/mexopencv"[email protected]
抄送:"yxwang11"[email protected]

I have no clue. Are you still using the same path? Is everything running in 32-bit arch?

Kota

On Oct 29, 2012, at 2:03 AM, yxwang11 [email protected] wrote:

Hi, Kota Yamaguchi

Recent two days, I tried many methods to make the mexopencv work in my matlab. But, finally, I failed.

I tried to compile the mexopencv in matlab 2012a with the compiler of VS2010, and replace the folder of bin and lib under the build with the new dll and lib file. I also rebuild my opencv2.4.2 with CMake and VS2010 with the option /D"_SECURE_SCL=1 ". I also modify the mexopts.bat in matlab with the D_SECURE_SCL=1 .

I can compile the mexopencv in matlab, but the matlab still crashes when I run any function in cv

I don't know what's wrong with my settings?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

from mexopencv.

yxwang11 avatar yxwang11 commented on July 18, 2024

When I use dependency walker to open one mexw32 file, it gives two error message: "Error openning file, the system can't find the file of LIBMEX.DLL";"Error openning file, the system can't find the file of LIBMX.DLL"; When I double click that error message, it gives the path of that dll,"C:\mexopencv+cv\LIBMEX.DLL was not found".

I don't know whether I didn't download complete your file or I set other points wrong?

2012-10-29

Yuxia Wang

发件人:Kota Yamaguchi
发送时间:2012-10-29 21:32
主题:Re: [mexopencv] Matlab crashs when I use mexopencv (#21)
收件人:"kyamagu/mexopencv"[email protected]
抄送:"yxwang11"[email protected]

What is your mex -setup? Make sure you clean all mexw32 files before you re-compile mexopencv. Probably you'd want to make sure all dll's are set up correctly from dependency walker http://www.dependencywalker.com/ . Also, it might give you some info if you run a debugger, http://www.mathworks.com/help/matlab/matlab_external/debugging-c-c-language-mex-files.html

On Oct 29, 2012, at 9:26 AM, yxwang11 [email protected] wrote:

I use the environment path of opencv2.4.2 for VS2010. And all software is running in 32-bit arch. But the matlab still crashes.

2012-10-29

Yuxia Wang

发件人:Kota Yamaguchi
发送时间:2012-10-29 21:22
主题:Re: [mexopencv] Matlab crashs when I use mexopencv (#21)
收件人:"kyamagu/mexopencv"[email protected]
抄送:"yxwang11"[email protected]

I have no clue. Are you still using the same path? Is everything running in 32-bit arch?

Kota

On Oct 29, 2012, at 2:03 AM, yxwang11 [email protected] wrote:

Hi, Kota Yamaguchi

Recent two days, I tried many methods to make the mexopencv work in my matlab. But, finally, I failed.

I tried to compile the mexopencv in matlab 2012a with the compiler of VS2010, and replace the folder of bin and lib under the build with the new dll and lib file. I also rebuild my opencv2.4.2 with CMake and VS2010 with the option /D"_SECURE_SCL=1 ". I also modify the mexopts.bat in matlab with the D_SECURE_SCL=1 .

I can compile the mexopencv in matlab, but the matlab still crashes when I run any function in cv

I don't know what's wrong with my settings?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

from mexopencv.

kyamagu avatar kyamagu commented on July 18, 2024

libmex.dll will be loaded when you launch matlab. It's not a problem to see
this error in dependency walker.

On Mon, Oct 29, 2012 at 10:27 AM, yxwang11 [email protected] wrote:

When I use dependency walker to open one mexw32 file, it gives two error
message: "Error openning file, the system can't find the file of
LIBMEX.DLL";"Error openning file, the system can't find the file of
LIBMX.DLL"; When I double click that error message, it gives the path of
that dll,"C:\mexopencv+cv\LIBMEX.DLL was not found".

I don't know whether I didn't download complete your file or I set other
points wrong?

2012-10-29

Yuxia Wang

发件人:Kota Yamaguchi
发送时间:2012-10-29 21:32
主题:Re: [mexopencv] Matlab crashs when I use mexopencv (#21)
收件人:"kyamagu/mexopencv"[email protected]
抄送:"yxwang11"[email protected]

What is your mex -setup? Make sure you clean all mexw32 files before you
re-compile mexopencv. Probably you'd want to make sure all dll's are set up
correctly from dependency walker http://www.dependencywalker.com/ . Also,
it might give you some info if you run a debugger,
http://www.mathworks.com/help/matlab/matlab_external/debugging-c-c-language-mex-files.html

On Oct 29, 2012, at 9:26 AM, yxwang11 [email protected] wrote:

I use the environment path of opencv2.4.2 for VS2010. And all software
is running in 32-bit arch. But the matlab still crashes.

2012-10-29

Yuxia Wang

发件人:Kota Yamaguchi
发送时间:2012-10-29 21:22
主题:Re: [mexopencv] Matlab crashs when I use mexopencv (#21)
收件人:"kyamagu/mexopencv"[email protected]
抄送:"yxwang11"[email protected]

I have no clue. Are you still using the same path? Is everything running
in 32-bit arch?

Kota

On Oct 29, 2012, at 2:03 AM, yxwang11 [email protected] wrote:

Hi, Kota Yamaguchi

Recent two days, I tried many methods to make the mexopencv work in my
matlab. But, finally, I failed.

I tried to compile the mexopencv in matlab 2012a with the compiler of
VS2010, and replace the folder of bin and lib under the build with the new
dll and lib file. I also rebuild my opencv2.4.2 with CMake and VS2010 with
the option /D"_SECURE_SCL=1 ". I also modify the mexopts.bat in matlab with
the D_SECURE_SCL=1 .

I can compile the mexopencv in matlab, but the matlab still crashes
when I run any function in cv

I don't know what's wrong with my settings?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-9868612.

from mexopencv.

yxwang11 avatar yxwang11 commented on July 18, 2024

Ok, I will try to find other error using your suggestions tomorrow. But, now I must go to my dorm because it is very late night now in my country, if not I will be locked outside of my dorm building, lol. Thank you~~. I will try to work hard with it tomorrow~

2012-10-29

Yuxia Wang

发件人:Kota Yamaguchi
发送时间:2012-10-29 22:54
主题:Re: [mexopencv] Matlab crashs when I use mexopencv (#21)
收件人:"kyamagu/mexopencv"[email protected]
抄送:"yxwang11"[email protected]

libmex.dll will be loaded when you launch matlab. It's not a problem to see
this error in dependency walker.

On Mon, Oct 29, 2012 at 10:27 AM, yxwang11 [email protected] wrote:

When I use dependency walker to open one mexw32 file, it gives two error
message: "Error openning file, the system can't find the file of
LIBMEX.DLL";"Error openning file, the system can't find the file of
LIBMX.DLL"; When I double click that error message, it gives the path of
that dll,"C:\mexopencv+cv\LIBMEX.DLL was not found".

I don't know whether I didn't download complete your file or I set other
points wrong?

2012-10-29

Yuxia Wang

发件人:Kota Yamaguchi
发送时间:2012-10-29 21:32
主题:Re: [mexopencv] Matlab crashs when I use mexopencv (#21)
收件人:"kyamagu/mexopencv"[email protected]
抄送:"yxwang11"[email protected]

What is your mex -setup? Make sure you clean all mexw32 files before you
re-compile mexopencv. Probably you'd want to make sure all dll's are set up
correctly from dependency walker http://www.dependencywalker.com/ . Also,
it might give you some info if you run a debugger,
http://www.mathworks.com/help/matlab/matlab_external/debugging-c-c-language-mex-files.html

On Oct 29, 2012, at 9:26 AM, yxwang11 [email protected] wrote:

I use the environment path of opencv2.4.2 for VS2010. And all software
is running in 32-bit arch. But the matlab still crashes.

2012-10-29

Yuxia Wang

发件人:Kota Yamaguchi
发送时间:2012-10-29 21:22
主题:Re: [mexopencv] Matlab crashs when I use mexopencv (#21)
收件人:"kyamagu/mexopencv"[email protected]
抄送:"yxwang11"[email protected]

I have no clue. Are you still using the same path? Is everything running
in 32-bit arch?

Kota

On Oct 29, 2012, at 2:03 AM, yxwang11 [email protected] wrote:

Hi, Kota Yamaguchi

Recent two days, I tried many methods to make the mexopencv work in my
matlab. But, finally, I failed.

I tried to compile the mexopencv in matlab 2012a with the compiler of
VS2010, and replace the folder of bin and lib under the build with the new
dll and lib file. I also rebuild my opencv2.4.2 with CMake and VS2010 with
the option /D"_SECURE_SCL=1 ". I also modify the mexopts.bat in matlab with
the D_SECURE_SCL=1 .

I can compile the mexopencv in matlab, but the matlab still crashes
when I run any function in cv

I don't know what's wrong with my settings?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-9868612.


Reply to this email directly or view it on GitHub.

from mexopencv.

amroamroamro avatar amroamroamro commented on July 18, 2024

MATLAB puts itself on the PATH environment variable during installation, so you should have $MATLABROOT\bin and $MATLABROOT\bin\win32 on the path. Still I don't think that's what causing the crash... You should try debugging as suggested above.

from mexopencv.

shicai avatar shicai commented on July 18, 2024

I met the same problem with:
win 7 64bit, matlab 2012a 64bit, and vs 2010.

finally, get solved!

from mexopencv.

hikingman30 avatar hikingman30 commented on July 18, 2024

I used win 7 64 bit, matlab R 2012b and vs2010. The compilation passed, but it is said

Error using cv.cvtColor
Invalid MEX-file 'C:\Users\(Username)\Documents\GitHub\mexOCV\mexopencv\+cv\cvtColor.mexw64': The specified module
could not be found.

I changed the D_Secure flag to 1 before compiling. BTW, my opencv is stored in C:/opencv243, the version is 2.4.3
Thanks for your concerns.

from mexopencv.

amroamroamro avatar amroamroamro commented on July 18, 2024

@yxwang11: could you give this another try, there was recently a fix related to _SECURE_SCL problems

from mexopencv.

yxwang11 avatar yxwang11 commented on July 18, 2024

Thank you very much. You are a so excellent and kind person. I will try it on.

At 2013-03-19 03:28:17,Amro [email protected] wrote:

@yxwang11: could you give this another try, there was recently a fix related to _SECURE_SCL problems

¡ª
Reply to this email directly or view it on GitHub.

from mexopencv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.