GithubHelp home page GithubHelp logo

Errors when run compile.m about opentld HOT 22 OPEN

zk00006 avatar zk00006 commented on July 29, 2024
Errors when run compile.m

from opentld.

Comments (22)

davidhere40 avatar davidhere40 commented on July 29, 2024 1

I had the same issue. You'll get the above errors if you are mixing 32 bit and 64 bit. Your openCV must have been compiled as 32bit.
I got it to compile by changing the libpath to:
libpath = 'C:\OpenCV-2.4.0\opencv\build\x64\vc10\lib';

This is because my matlab is 64bit, but I compiled openCV as 32bit. So, I found some precompiled libraries and used those.

from opentld.

Ska-K avatar Ska-K commented on July 29, 2024

Same issue here, but with Win7 32b, MATLAB 2009b and VS2008. Did you find any solution? I'm trying to guess what happens.

Edit:

OK, got it. Actually it's a silly error. As you can see in compile.m, you need to have OpenCV headers and libs in the proper directories:

include = ' -Ic:\OpenCV2.2\include\opencv\ -Ic:\OpenCV2.2\include\';
libpath = 'c:\OpenCV2.2\lib\';

Do it manually if it's necessary, it will work. :)

from opentld.

 avatar commented on July 29, 2024

Thanks a lot for the solution provided. I managed to resolve the problem.

from opentld.

JLLL avatar JLLL commented on July 29, 2024

Hi, i got this error, compile of 'lk.cpp' failed.

Cannot open include file: 'opencv2/core/core_c.h'

I tried to put "opencv\build\include\opencv2\core in the include string but still unable to solve it. Any help?

from opentld.

ygx2011 avatar ygx2011 commented on July 29, 2024

opencv 2.4.3
win7 64bit
vs2010b
??? Invalid MEX-file 'C:\Users\yinggaoxuan\Desktop\TLD\mex\lk.mexw64':
C:\Users\yinggaoxuan\Desktop\TLD\mex\lk.mexw64 不是有效的 Win32 应用程序。

.

Error in ==> tldInit at 20
lk(0);

Error in ==> tldExample at 34
tld = tldInit(opt,[]);% train initial detector and initialize the 'tld' structure

Error in ==> run_TLD at 42
[bb,conf] = tldExample(opt);

I'll be very glad if someone can help me.

from opentld.

ygx2011 avatar ygx2011 commented on July 29, 2024

Any help?

from opentld.

ygx2011 avatar ygx2011 commented on July 29, 2024

opencv 2.4.3
win7 64bit
vs2010b
??? Invalid MEX-file 'C:\Users\yinggaoxuan\Desktop\TLD\mex\lk.mexw64':
C:\Users\yinggaoxuan\Desktop\TLD\mex\lk.mexw64 is not a valid Win32 application

.

Error in ==> tldInit at 20
lk(0);

Error in ==> tldExample at 34
tld = tldInit(opt,[]);% train initial detector and initialize the 'tld' structure

Error in ==> run_TLD at 42
[bb,conf] = tldExample(opt);

I'll be very glad if someone can help me.

from opentld.

the13thson avatar the13thson commented on July 29, 2024

If I'm not mistaken - their software only runs on OpenCV 2.2 --- I may be wrong, but I'm also trying to get it work, and I read that last night.

from opentld.

ygx2011 avatar ygx2011 commented on July 29, 2024

I have a classmate,his computer is 32bit,and his opencv is 2.4.3,it can runs on his computer,now,I have the same error with kolz.

from opentld.

niunuinui avatar niunuinui commented on July 29, 2024

i think u need OpenCV dll in x64 when you compile compile.m in a WIN7 x64 PC.
So add OpenCV x64 dll instead of x86 dll to PATH, then "not a valid Win32 application" issue must be solved

from opentld.

freakbird avatar freakbird commented on July 29, 2024

@kolz @davidhere40

I am also using OpenCV - 2.4.9 and Matlab 2013b both 64-bit.
and getting the same issue.
C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Link of 'lk.mexw64' failed.

Any directions on how to resolve it?

from opentld.

ygx2011 avatar ygx2011 commented on July 29, 2024

i think the problem is the mix of c and matlab,you can run the C code on ubuntu,and i konw a way to run the matlab code on OS X,not windows.

from opentld.

freakbird avatar freakbird commented on July 29, 2024

I was able to solve the issue, it was some syntax issue as I was using a recent version of Matlab. It's funny how all the forums online pointed me towards the 32-64 bit problem. Anyway I am posting the solution here so that in future it might help someone.

This was the modification I made in compile.m. Lines 25-30

files = dir(fullfile(libpath, '*.lib'));
lib = [];
for i = 1:length(files),
    lib = [lib ' ' libpath '\' files(i).name];
end

It was not reading the .lib files in the variable lib properly before and thus error in linking.

from opentld.

simonsayshi avatar simonsayshi commented on July 29, 2024

@davidhere40 I believe I met the mixing issue too. however I failed to configure the 64bit when I use Cmake. I've searched a lot but none solved my problem. below is the error.
Plus, do I have to install vs2010 if I'm going to compile 64bit with the vs2010 win64 option? it seems MS doesn't provide vs2010 anymore

capture

from opentld.

davidhere40 avatar davidhere40 commented on July 29, 2024

from opentld.

simonsayshi avatar simonsayshi commented on July 29, 2024

@davidhere40 thanks for reply! here attached the rest error message
And I do have a MS account. the link you gave me is exactly what I searched for the older VS version but the vs2010 is not available to download. However there is Visual Studio 2010 VC++ Redistributable at the bottom and I installed it,but the issue remains:(
this problem is driving me crazy:(

can you still run this compile.m on your PC?

image

from opentld.

davidhere40 avatar davidhere40 commented on July 29, 2024

from opentld.

simonsayshi avatar simonsayshi commented on July 29, 2024

@davidhere40 now I successfully compiled the 64bit(yes I'm still dealing with it:( ) but when I run compile.m I met the issue:
https://github.com/zk00006/OpenTLD/issues/52

every time I feel close to the result, I ran into errors :(
any solution for this?

from opentld.

davidhere40 avatar davidhere40 commented on July 29, 2024

from opentld.

davidhere40 avatar davidhere40 commented on July 29, 2024

from opentld.

simonsayshi avatar simonsayshi commented on July 29, 2024

@davidhere40 now I solved this problem..I just change matlab from 2017a to 2014b..........
now it can track the object I circled.
but I still have question, since it mark objects in each frame, is that possible to save the frames having bounding box on the objects as a single image?

from opentld.

davidhere40 avatar davidhere40 commented on July 29, 2024

from opentld.

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.