GithubHelp home page GithubHelp logo

zk00006 / opentld Goto Github PK

View Code? Open in Web Editor NEW
2.1K 2.1K 1.3K 13.96 MB

OpenTLD is an open source library for real-time 2D tracking of a single object in video. This repository is no longer under development. For latest version see: http://www.tldvision.com/tld2.html

License: GNU General Public License v3.0

MATLAB 53.12% M 10.79% C++ 29.96% C 0.46% Objective-C 5.66%

opentld's People

Contributors

zk00006 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opentld's Issues

Problem with run_TLD in Windows 64

I'm getting almost the same error as in Issue #22 - Issue with lk.cpp and openCV 2.3.1

I'm running Windows 7 x64, MatLab r2010a, CV 2.3.1 and VS 2010.
It all compiles and links fine, finally, but when I try to run run_TLD it gives me :

lk(2,imgI,imgJ,ptsI,ptsJ,Level)
??? One or more output arguments not assigned during call to "lk".

Error in ==> tldTracking at 30
xFJ = lk(2,tld.img{I}.input,tld.img{J}.input,xFI,xFI); % track all points by Lucas-Kanade tracker from frame I
to frame J, estimate Forward-Backward error, and NCC for each point

Error in ==> tldProcessFrame at 25
[tBB tConf tValid tld] = tldTracking(tld,tld.bb(:,I-1),I-1,I); % frame-to-frame tracking (MedianFlow)

Error in ==> tldExample at 41
tld = tldProcessFrame(tld,i); % process frame i

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

I tried the change mentioned in Issue #22. Change the 10th param in xFJ from 0 to status, but that didn't change anything.

Mac OS X mex uses wrong gcc compiler in compile.m

Hello,

I get the following error when I run the patched compile.m on Mac OS X

 Mac
 /Applications/MATLAB_R2010b.app/bin/mex: line 305: gcc-4.0: command not found
 /Applications/MATLAB_R2010b.app/bin/mex: line 1041: g++-4.0: command not found

     mex: compile of ' "lk.cpp"' failed.

 ??? Error using ==> mex at 208
 Unable to complete successfully.

 Error in ==> compile at 52
     eval(['mex lk.cpp -O' include lib]);

I have gcc-4.2.1 on my computer. How can I tell Matlab or mex to use this compiler?

Compile errors (Ubuntu, MatLAB)

Hi there. I'm trying to run the TLD algorithm on Ubuntu 16.04 (64-bit) and MatLAB R2016b

I have not installed openCV, but rather the libraries as stated in the installation guide by

sudo apt-get install libcv-dev

When running compile.m from within MatLAB I get the error (s)

Error using mex
/tmp/mex_12399154940837_20301/lk.o: In function normCrossCorrelation(_IplImage*, _IplImage*, CvPoint2D32f*, CvPoint2D32f*, int, char*, float*, int, int)': lk.cpp:(.text+0x1a0): undefined reference to cvCreateImage'
lk.cpp:(.text+0x1b9): undefined reference to cvCreateImage' lk.cpp:(.text+0x1d6): undefined reference to cvCreateImage'
lk.cpp:(.text+0x214): undefined reference to cvGetRectSubPix' lk.cpp:(.text+0x227): undefined reference to cvGetRectSubPix'
lk.cpp:(.text+0x23b): undefined reference to cvMatchTemplate' lk.cpp:(.text+0x274): undefined reference to cvReleaseImage'
lk.cpp:(.text+0x27d): undefined reference to cvReleaseImage' lk.cpp:(.text+0x286): undefined reference to cvReleaseImage'
/tmp/mex_12399154940837_20301/lk.o: In function mexFunction': lk.cpp:(.text+0x323): undefined reference to cvReleaseImage'
lk.cpp:(.text+0x341): undefined reference to cvReleaseImage' lk.cpp:(.text+0x438): undefined reference to cvCreateImage'
lk.cpp:(.text+0x455): undefined reference to cvCreateImage' lk.cpp:(.text+0x4be): undefined reference to cvCreateImage'
lk.cpp:(.text+0x4dc): undefined reference to cvCreateImage' lk.cpp:(.text+0x553): undefined reference to cvAlloc'
lk.cpp:(.text+0x565): undefined reference to cvAlloc' lk.cpp:(.text+0x578): undefined reference to cvAlloc'
lk.cpp:(.text+0x613): undefined reference to cvAlloc' lk.cpp:(.text+0x61e): undefined reference to cvAlloc'
/tmp/mex_12399154940837_20301/lk.o:lk.cpp:(.text+0x626): more undefined references to cvAlloc' follow /tmp/mex_12399154940837_20301/lk.o: In function mexFunction':
lk.cpp:(.text+0x6c1): undefined reference to cvCalcOpticalFlowPyrLK' lk.cpp:(.text+0x73e): undefined reference to cvCalcOpticalFlowPyrLK'
collect2: error: ld returned 1 exit status

Error in compile (line 77)
eval(['mex lk.cpp -O' include lib]);

I have implemented the changes to the files as in Schloegl's pull request and thought this would sort out the error (s) I thought there were between linking MatLAB and OpenCV's libraries

Thanks
Gerard

Unexpected Standard exception from MEX file.

I tried to compile and run OpenTLD on 64bit Ubuntu. Compilation was ok with OpenCV 2.3.1 (older versions have some problems with headers).


Then I try to run, I can see the first frame and then the following error:
Unexpected Standard exception from MEX file.
What() is:/vol/vssp/signsrc/externalLibs/openCV/OpenCV-2.3.1/modules/core/src/matrix.cpp:1305: error: (-27) create() called
for the missing output array in function create

Error in tldTracking (line 30)
xFJ = lk(2,tld.img{I}.input,tld.img{J}.input,xFI,xFI); % track all points by Lucas-Kanade tracker from frame I to frame
J, estimate Forward-Backward error, and NCC for each point

Error in tldProcessFrame (line 25)
[tBB tConf tValid tld] = tldTracking(tld,tld.bb(:,I-1),I-1,I); % frame-to-frame tracking (MedianFlow)

Error in tldExample (line 41)
tld = tldProcessFrame(tld,i); % process frame i

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


accompanied with this on command line:
OpenCV Error: Null pointer (create() called for the missing output array) in create, file /vol/vssp/signsrc/externalLibs/openCV/OpenCV-2.3.1/modules/core/src/matrix.cpp, line 1305


Anyone got an idea what could be wrong?

About training the forest classifier

Hi, all

In training the forest classifier, I don't quite the following steps like measure_forest:
if (Y[I] == 1) {
if (measure_forest(x) <= thrP)
update(x,1,1);
} else {
if (measure_forest(x) >= thrN)
update(x,0,1);
}
Why the training set is controlled by thrP or thrN? In my view, as far as we get the positive samples and negative samples in prior, just update the forest with those samples. What is the purpose of measure_forest? Any one knows? Thanks in advance.

C/C++ version

Matlab isn't very nice for integration with other software -- it would be great to have a version of TLD written in C or C++ :)

I'm interested in implementing it in C/C++, if there are no current plans to do so in the near future.

Installation on Windows

Hy All!

My windows decided to give me some BSOD, so I had to get a new win os.
So the point is...
I have win7 x 64, Visual Studio 2010, and if I use Matlab 2010a with the patch, shall I use OpenCV2.2 for Win32?
(Anyway making OpenCv compatible for win7x64 is kinda messy for me. )

Thanks for the answer.

Software versions in README

Please add information about which software package versions were used/are minimum requirement for this code. This would save much effort with hunting down mysterious problems.
For example, for using ~ as a placeholder for unused functions, MATLAB >=R2009b is necessary.

Thanks,
christoph

error: (-27) in Matlb 2012b with OpenCV2.4.2 in Windows 7

I am getting this error when i try to execute run_TLD.m (compilation went fine)

Unexpected Standard exception from MEX file.
What() is:......\modules\core\src\matrix.cpp:1467: error: (-27) create() called for the missing
output array

..

Error in tldTracking (line 30)
xFJ = lk(2,tld.img{I}.input,tld.img{J}.input,xFI,xFI); % track all points by Lucas-Kanade tracker
from frame I to frame J, estimate Forward-Backward error, and NCC for each point

Error in tldProcessFrame (line 25)
[tBB tConf tValid tld] = tldTracking(tld,tld.bb(:,I-1),I-1,I); % frame-to-frame tracking (MedianFlow)

Error in tldExample (line 41)
tld = tldProcessFrame(tld,i); % process frame i

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

Tracking is very slow (about 6-9 fps)

I was tracking an object in the movie but the tracking is too slow, approximately 6-9 fps. I was wondering if anyone know how to track accurately in real-time i.e. approximately 20-25 fps.
Any pointers would be much appreciated. Thanks

Toolboxes required

I would like to know what are the toolboxes required for the tld to work

Thank you
Edwin

matrix.cpp:1483: error

I'm running
Windows 7 (x64),
MATLAB R2012b (x64),
OpenCV 2.4.3 (x64),
and VS 2010.

I managed to compile OpenTLD successfully, but I got the following error why I tried run_TLD. Obviously this is a problem in the opencv matrix.cpp file. I usually run opencv on visual studio and there is no problem, so this shouldn't be my opencv installation problem.

Unexpected Standard exception from MEX file.
What() is:......\src\opencv\modules\core\src\matrix.cpp:1483: error: (-27) create() called for the missing output array

..

Error in tldTracking (line 30)
xFJ = lk(2,tld.img{I}.input,tld.img{J}.input,xFI,xFI); % track all points by Lucas-Kanade tracker from frame I to frame
J, estimate Forward-Backward error, and NCC for each point

Error in tldProcessFrame (line 25)
[tBB tConf tValid tld] = tldTracking(tld,tld.bb(:,I-1),I-1,I); % frame-to-frame tracking (MedianFlow)

Error in tldExample (line 41)
tld = tldProcessFrame(tld,i); % process frame i

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

Undefined symbol error

First off, I'm only posting here because I don't have access to the google group (I've been waiting about a month now, who can give me access?)

I'm using Matlab 2011a, Ubuntu 11.04, and OpenCV 2.3.1. I got the compile.m file to run with no errors successfully, however I get error when I run run_TLD.m

Here is my output:

??? Invalid MEX-file '/home/ryan/OpenTLD/mex/lk.mexa64': /usr/lib/libcairo.so.2: undefined
symbol: png_get_valid, version PNG12_0

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

There were some other posts very similar to this, but they seemed to address the GCC compiler version error, which I have already fixed on my system (currently using GCC 4.3.5, compile.m runs correctly)

Any help is greatly appreciated. And access to the group would be great so I can look for issues I encounter in the future.

Thank you,

Ryan

Invalid MEX-file: lk.mexw64: The specified module could not be found.

After following the installation instructions and running the compile.m successfully. I tried to run run_TLD.m and this error happens :

Invalid MEX-file 'C:\Users\myname\Documents\GitHub\OpenTLD\mex\lk.mexw64': The specified module could not be found.

Error in tldInit (line 20)
lk(0);

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

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

Please advise on this as I have search google and everything for help. The best I got was that that this will happen if I dont have the neccessary dlls that the mex file requires. Please help!!

Thanks

Track multiple objects

I was wondering how difficult it would be to track multiple objects, within the same instance..

Does anybody have any hints on the best way to do this ?

Possible bug in fern.cpp

Hi all,

I think there is a possible bug in the fern.cpp code. Under mex/fern.cpp, line 430, I believe the code should be:

double bboxvar = bbox_var_offset(IIMG,IIMG2,BBOX+(idx[j]-1)*BBOX_STEP);

The code in the current version is:

double bboxvar = bbox_var_offset(IIMG,IIMG2,BBOX+j*BBOX_STEP);

This means that no matter which bounding box locations that have been found with the least amount of overlap, we will only be using the first numIdx indexed locations in the BBOX array, and not the ones with the least amount of overlap.

Not sure where to post this, so I figured this was the best spot to do so.

Thanks,

  • Ray.

??? Undefined function or method 'lk' for input arguments of type 'double' on windows 7.

??? Undefined function or method 'lk' for input arguments of type 'double'.

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 get the above error. Tried to follow a few fixes but none worked.
Can some one help? I have installed
Win7 x64
OpenCV 2.3.1
Matlab 2011 R2011a
VS 2010 - But using VC comiler 9.0 when selecting compilers from MATLAB using mex -setup

I have followed all the installation instructions. This seems to happen right after double clicking inside the bounding box.

Any solution would be helpful
Thanks

Running demo yields NaN,NaN,NaN,NaN,NaN bounding box on bilderbuchi fork

Running the demo from the bilderbuchi fork on Ubuntu with Octave 3.4 (compiled from source) works, however, the tracker is able to track the motorcycle in the first two frames/images, after that it produces NaN,NaN,NaN,NaN,NaN.

288,36,313,78,1
288.2968450665455,52.24886653377157,312.3566990415273,92.69400964624145,0.9524890499625599
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN
NaN,NaN,NaN,NaN,NaN

None the less, the algorithm is pretty impressive. Great work.

Regards,

Erik

Compile in windows

First i installed opencv from here: http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.2/OpenCV-2.2.0-win32-vs2010.exe/download and selected 'add path to variables.'
Second i wrote 'mex -setup' and select Visual studio 2010.

Finally i open the source folder in Matlab, run the file compile.m and got:

´PC
lk.cpp
c:\program files\matlab\r2011a\extern\include\matrix.h(337) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
lk.cpp(175) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
lk.cpp(175) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
lk.cpp(176) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
lk.cpp(176) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
lk.cpp(177) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
lk.cpp(177) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data

C:\PROGRA~1\MATLAB\R2011A\BIN\MEX.PL: Error: Compile of 'lk.cpp' failed.

??? Error using ==> mex at 208
Unable to complete successfully.

Error in ==> compile at 32
eval(['mex lk.cpp -O' include lib]);

Mac OS X compilation error

Mac
Unix
Undefined symbols for architecture x86_64:
"cvAlloc", referenced from:
mexFunction in lk.o
"cvCalcOpticalFlowPyrLK", referenced from:
mexFunction in lk.o
"cvCreateImage", referenced from:
normCrossCorrelation(IplImage, IplImage, CvPoint2D32f
, CvPoint2D32f
, int, char
, float
, int, int)in lk.o
mexFunction in lk.o
"cvGetRectSubPix", referenced from:
normCrossCorrelation(IplImage, IplImage, CvPoint2D32f
, CvPoint2D32f
, int, char
, float_, int, int)in lk.o
"cvMatchTemplate", referenced from:
normCrossCorrelation(IplImage, IplImage, CvPoint2D32f
, CvPoint2D32f_, int, char_, float_, int, int)in lk.o
"cvReleaseImage", referenced from:
normCrossCorrelation(IplImage, IplImage, CvPoint2D32f
, CvPoint2D32f_, int, char_, float_, int, int)in lk.o
_mexFunction in lk.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

mex: link of ' "lk.mexmaci64"' failed.

Error using mex (line 206)
Unable to complete successfully.

Error in compile (line 77)
eval(['mex lk.cpp -O' include lib]);

Q : How to Edit and Run OpenTLD

Hi, All
I'v already installed the 'TLD1.0_demo', etc. It run very well from my Windows 7 - 64 bit.

Now, I want to edit the code from 'zk00006-OpenTLD-8a6934d' in MATLAB.
However, if I want to run from 'run_TLD.m' , it can't run.

        ??? Undefined function or method 'lk' for input arguments of type 'double'. 
        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); 

My Questions :

  1. WHY ? Should I run all of the .m files which are inside of 'zk00006-OpenTLD-8a6934d' ?
  2. Or should I install another software like OpenCV and VisualStudio to make it 'Run' ?
  3. Should I make it into .exe files instead of directly edit & click run in MATLAB ?
  4. Ow do you have any idea, which .m file should I edit if the TLD shows the x,y,s position like Zdenek Kalal video ?

Thanks all
Regards,

Edmond N
email : [email protected]

Updated TLD

Hey there!

I would like to use TLD for my PhD and I have two issues that maybe somebody could help me with.

First, I Need to record the position of the box at each frame and write it in my output data. Any idea?

Second, I would like to make TLD able to re-use what it has learned in a previous tracking. Any suggestion?

All the best!

how to slove this problem ?? need help from rayryeng

hi, when run the code with Kalal's in matlab the step compile task has successfully finished,but happen a wrong in runing run_TLD see following:
??? Invalid MEX-file
'D:\TLD_Kalal\zk00006-OpenTLD-8a6934d\zk00006-OpenTLD-8a6934d\mex\lk.mexw32': 找不到指定的模块。

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 donnot kown why and how to solve it . in the mex folder there is a file lk.mexw32 which comes after taking compile task, so i donot the real reason of the problem!!!

Error compiling mex files on 64 bit Ubuntu

I followed the download instructions, and after fixing the include directories, etc., and getting the "compile.m" function to work successfully, I then tried to run the tracker on a directory of images. Things seemed to work OK for a second, and the first image within my directory popped up with the interactive bounding box as seen in the tutorial. I tried to select the initial bounding box of a face and double clicked inside it and received this error in the Matlab console:


??? Invalid MEX-file '/home/ely/Desktop/Classroom_Project/Research_Code/Predator_Tracking/zk00006-OpenTLD-8a6934d/mex/lk.mexa64': /home/ely/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6:
version `GLIBCXX_3.4.11' not found (required by /usr/local/lib/libopencv_contrib.so.2.2).

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 49
[bb,conf] = tldExample(opt);


I am using Matlab R2010 A with Ubuntu 10.04 64-bit. Any help is very appreciated.

Cheers,
Ely

Resize and Move the yellow box

Can anybody help me?
I ran the Open TLD and it is working fine.
Now I just want to use my own video and track the object.
For that I need to re-size the yellow box and move the co-ordinates.
Could you tell me which .m file I should be updating to achieve this?

How to modify OpenTLD to support object recognition?

From what I have gathered, OpenTLD is a tracker and detector, it tracks what you tell it to and detects the object frame by frame. I feel that this can be applied to the broader scope of object recognition, where the software learns many object and can name the objects it sees in a frame. I'm aware of openTLD's one object tracking limitations, but there shouldn't be a limitation to find all the recognizable objects correct? It should be able to go through the database of saved objects and look for those objects in a frame.

Any thoughts on this? Can this be done easily? Better yet, has anyone made modifications for this already?

thanks

How to track movie in RGB mode

At present when I load a movie from a file , it tracks it in grayscale mode. Does anyone know how to track it in RGB or color mode.

Thanks

Regards,
Shahab Hameed

Error while compiling OpenTLD compile.m

I am trying to compile the mex files needed to run OpenTLD project.

Link : https://github.com/zk00006/OpenTLD

Using:

OpenCV 2.4.9 64-bit, Matlab 2013b 64-bit

When trying to run compile.m, I get the following error.

Creating library C:\Users\Saurabh\AppData\Local\Temp\mex_sT0LV8\templib.x and object C:\Users\Saurabh\AppData\Local\Temp\mex_sT0LV8\templib.exp
lk.obj : error LNK2019: unresolved external symbol cvAlloc referenced in function mexFunction
lk.obj : error LNK2019: unresolved external symbol cvCreateImage referenced in function "void __cdecl normCrossCorrelation(struct _IplImage *,struct _IplImage *,struct CvPoint2D32f *,struct CvPoint2D32f *,int,char *,float *,int,int)" (?normCrossCorrelation@@YAXPEAU_IplImage@@0PEAUCvPoint2D32f@@1HPEADPEAMHH@Z)
lk.obj : error LNK2019: unresolved external symbol cvReleaseImage referenced in function "void __cdecl normCrossCorrelation(struct _IplImage *,struct _IplImage *,struct CvPoint2D32f *,struct CvPoint2D32f *,int,char *,float *,int,int)" (?normCrossCorrelation@@YAXPEAU_IplImage@@0PEAUCvPoint2D32f@@1HPEADPEAMHH@Z)
lk.obj : error LNK2019: unresolved external symbol cvGetRectSubPix referenced in function "void __cdecl normCrossCorrelation(struct _IplImage *,struct _IplImage *,struct CvPoint2D32f *,struct CvPoint2D32f *,int,char *,float *,int,int)" (?normCrossCorrelation@@YAXPEAU_IplImage@@0PEAUCvPoint2D32f@@1HPEADPEAMHH@Z)
lk.obj : error LNK2019: unresolved external symbol cvMatchTemplate referenced in function "void __cdecl normCrossCorrelation(struct _IplImage *,struct _IplImage *,struct CvPoint2D32f *,struct CvPoint2D32f *,int,char *,float *,int,int)" (?normCrossCorrelation@@YAXPEAU_IplImage@@0PEAUCvPoint2D32f@@1HPEADPEAMHH@Z)
lk.obj : error LNK2019: unresolved external symbol cvCalcOpticalFlowPyrLK referenced in function mexFunction
lk.mexw64 : fatal error LNK1120: 6 unresolved externals

C:\PROGRA~1\MATLAB\R2013B\BIN\MEX.PL: Error: Link of 'lk.mexw64' failed.

Unable to complete successfully.

Error in compile (line 32)
eval(['mex lk.cpp -O' include lib]);

I know it has something to do with using wrong bit version(32/64) of one of the OpenCV or Matlab to build, but still can't resolve the issue.

Not good perf in running detectors in a video.

I ran some video containing human moving and want to tracking that human. I run example video "motor bike" with a good result. 👍
But when I run on my video, it produces lousy results. Yellow bounding box sometimes does not move. Is there anyone supported this project, pls have a discussion.

I got an error when I run compile.m

Ubuntu 15.04
Opencv 3.0.0
Matlab R2014a

I downloaded opentld source from here and modify 'include', and 'libpath'
and also comment out ifdef _CHAR16T ....
and I got and error like this,,

Unix
lk.o: In function normCrossCorrelation(_IplImage*, _IplImage*, CvPoint2D32f*, CvPoint2D32f*, int, char*, float*, int, int)': lk.cpp:(.text+0x186): undefined reference tocvCreateImage'
lk.cpp:(.text+0x19f): undefined reference to cvCreateImage' lk.cpp:(.text+0x1bc): undefined reference tocvCreateImage'
lk.cpp:(.text+0x1fa): undefined reference to cvGetRectSubPix' lk.cpp:(.text+0x20d): undefined reference tocvGetRectSubPix'
lk.cpp:(.text+0x221): undefined reference to cvMatchTemplate' lk.cpp:(.text+0x259): undefined reference tocvReleaseImage'
lk.cpp:(.text+0x262): undefined reference to cvReleaseImage' lk.cpp:(.text+0x26b): undefined reference tocvReleaseImage'
lk.o: In function mexFunction': lk.cpp:(.text+0x301): undefined reference tocvReleaseImage'
lk.cpp:(.text+0x31b): undefined reference to cvReleaseImage' lk.o:lk.cpp:(.text+0x339): more undefined references tocvReleaseImage' follow
lk.o: In function mexFunction': lk.cpp:(.text+0x445): undefined reference tocvCreateImage'
lk.cpp:(.text+0x462): undefined reference to cvCreateImage' lk.cpp:(.text+0x4cb): undefined reference tocvCreateImage'
lk.cpp:(.text+0x4e9): undefined reference to cvCreateImage' lk.cpp:(.text+0x562): undefined reference tocvAlloc'
lk.cpp:(.text+0x574): undefined reference to cvAlloc' lk.cpp:(.text+0x587): undefined reference tocvAlloc'
lk.cpp:(.text+0x63a): undefined reference to cvAlloc' lk.cpp:(.text+0x645): undefined reference tocvAlloc'
lk.o:lk.cpp:(.text+0x64d): more undefined references to cvAlloc' follow lk.o: In functionmexFunction':
lk.cpp:(.text+0x6f9): undefined reference to cvCalcOpticalFlowPyrLK' lk.cpp:(.text+0x78f): undefined reference tocvCalcOpticalFlowPyrLK'
collect2: error: ld returned 1 exit status

mex: link of ' "lk.mexa64"' failed.

성공적으로 완료할 수 없습니다.

오류 발생: compile (line 77)
eval(['mex lk.cpp -O' include lib]);

so I hope to know what is the problem.
Thank you.

Installation and OpenCV 3.3

Hi,
I am trying to use TLD for the first time. I changed the path in compile.m file
based on the instruction on page https://github.com/zk00006/OpenTLD/wiki/Installation
In Original TLD opencv2.2 was used I modified my libpath to include files 'libopencv*so.3.3'
The compile file ran without any errors.

However, I try to run run_TLD.m I get the following error.
Invalid MEX-file '/home/ITS/abshinde/Downloads/OpenTLD-master/mex/lk.mexa64': libopencv_calib3d.so.3.3: cannot open shared object file: No such file or
directory.
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 tried searching on forums but could not get relevant info. Can you point me in right direction

hi every body please help

I got this error when i tried to compile TLD

  • windows 7 64 bit

  • VS2010
    -matlab 2011b 64 bit

    -opencv 2.2

    PC
    lk.cpp
    lk.cpp(18) : fatal error C1083: Cannot open include file: 'cv.h': No such file or directory

    C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Compile of 'lk.cpp' failed.

??? Error using ==> mex at 208
Unable to complete successfully.

Error in ==> compile at 32
eval(['mex lk.cpp -O' include lib]);


please any help....

Codec Error in Ubuntu

Hi,

When I try to run this program I'm getting the following error, "The file requires the following codec(s) to be installed on your system: video/x-cinepak". I'm using a AVI file as video input. Has anyone faced this issue before? Could you please suggest a solution?

Thanks and regards,
Sandeep

Problem Compiling

Can someone help me with this error? I'm trying to compile the program, but I'm getting this error. Hope someone can help me...

tld

Errors when run compile.m

Hi,

I am installing the TLD application based on the instructions shown on https://github.com/zk00006/OpenTLD/wiki/Installation

Using:

OpenCV 2.4.2

Matlab R2010b x 64bits

Win7 x 64

VS2010 Professional

Everything works fine until I executed this step "6) In Matlab, run compile.m"

"
PC
Creating library C:\Users\Ko\AppData\Local\Temp\mex_VUBK1k\templib.x and object C:\Users\Ko\AppData\Local\Temp\mex_VUBK1k\templib.exp

lk.obj : error LNK2019: unresolved external symbol cvReleaseImage referenced in function "void __cdecl normCrossCorrelation(struct _IplImage *,struct _IplImage *,struct CvPoint2D32f *,struct CvPoint2D32f *,int,char *,float *,int,int)" (?normCrossCorrelation@@YAXPEAU_IplImage@@0PEAUCvPoint2D32f@@1HPEADPEAMHH@Z)

lk.obj : error LNK2019: unresolved external symbol cvMatchTemplate referenced in function "void __cdecl normCrossCorrelation(struct _IplImage *,struct _IplImage *,struct CvPoint2D32f *,struct CvPoint2D32f *,int,char *,float *,int,int)" (?normCrossCorrelation@@YAXPEAU_IplImage@@0PEAUCvPoint2D32f@@1HPEADPEAMHH@Z)

lk.obj : error LNK2019: unresolved external symbol cvGetRectSubPix referenced in function "void __cdecl normCrossCorrelation(struct _IplImage *,struct _IplImage *,struct CvPoint2D32f *,struct CvPoint2D32f *,int,char *,float *,int,int)" (?normCrossCorrelation@@YAXPEAU_IplImage@@0PEAUCvPoint2D32f@@1HPEADPEAMHH@Z)

lk.obj : error LNK2019: unresolved external symbol cvCreateImage referenced in function "void __cdecl normCrossCorrelation(struct _IplImage *,struct _IplImage *,struct CvPoint2D32f *,struct CvPoint2D32f *,int,char *,float *,int,int)" (?normCrossCorrelation@@YAXPEAU_IplImage@@0PEAUCvPoint2D32f@@1HPEADPEAMHH@Z)

lk.obj : error LNK2019: unresolved external symbol cvCalcOpticalFlowPyrLK referenced in function mexFunction

lk.obj : error LNK2019: unresolved external symbol cvAlloc referenced in function mexFunction

lk.mexw64 : fatal error LNK1120: 6 unresolved externals

C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Link of 'lk.mexw64' failed.

??? Error using ==> mex at 208
Unable to complete successfully.

Error in ==> compile at 32
eval(['mex lk.cpp -O' include lib]);

"

I have searched through many websites but to no avail. Hopefully, someone can enlighten me on this problem. All solutions are greatly appreciated

Cheers,
Ko

problems with octave in linux

have resolved quite a lot of problems, but got stuck here. Please help.

error: X and Y size must match Z dimensions
error: called from:
error: /usr/share/octave/3.2.4/m/general/interp2.m at line 326, column 2
error: /usr/share/octave/packages/3.2/image-1.0.12/imremap.m at line 106, column 8
error: /usr/share/octave/packages/3.2/image-1.0.12/imremap.m at line 83, column 8
error: /usr/share/octave/packages/3.2/image-1.0.12/imresize.m at line 101, column 7
error: /home/vinit/Downloads/tld/zk00006-OpenTLD-4649a5d/tld/tldPatch2Pattern.m at line 20, column 9
error: /home/vinit/Downloads/tld/zk00006-OpenTLD-4649a5d/tld/tldGetPattern.m at line 41, column 14
error: /home/vinit/Downloads/tld/zk00006-OpenTLD-4649a5d/tld/tldGeneratePositiveData.m at line 45, column 5
error: /home/vinit/Downloads/tld/zk00006-OpenTLD-4649a5d/tld/tldInit.m at line 82, column 15
error: /home/vinit/Downloads/tld/zk00006-OpenTLD-4649a5d/tld/tldExample.m at line 35, column 5
error: run_TLD.m at line 42, column 12

thanks

--Vinit

Issue with lk.cpp and openCV 2.3.1

Hi,

I am using Matlab R2011a and openCV 2.3.1 on a MacBook Pro (os x 10.6.8).

I successfully compiled the mex files as detailed here: https://github.com/zk00006/OpenTLD/wiki/Installation.

However, at runtime, I received the following error:


??? Unexpected Standard exception from MEX file.
What() is:/Users/liam/projects/OpenCV-2.3.1/modules/core/src/matrix.cpp:1305:
error: (-27) create() called for the missing output array in function create

Error in ==> tldTracking at 30
xFJ = lk(2,tld.img{I}.input,tld.img{J}.input,xFI,xFI); % track all points by
Lucas-Kanade tracker from frame I to frame J, estimate Forward-Backward error,
and NCC for each point

Error in ==> tldProcessFrame at 25
[tBB tConf tValid tld] = tldTracking(tld,tld.bb(:,I-1),I-1,I); % frame-to-frame
tracking (MedianFlow)

Error in ==> tldExample at 41
tld = tldProcessFrame(tld,i); % process frame i

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


I tracked the problem down to line 186 of lk.cpp, and changed the line from:

        cvCalcOpticalFlowPyrLK( IMG[J], IMG[I], PYR[J], PYR[I], points[1], points[2], nPts, cvSize(win_size,win_size), Level, 0     , 0, cvTermCriteria(CV_TERMCRIT_ITER|CV_TERMCRIT_EPS,20,0.03), CV_LKFLOW_INITIAL_GUESSES | CV_LKFLOW_PYR_A_READY | CV_LKFLOW_PYR_B_READY );

to:

        cvCalcOpticalFlowPyrLK( IMG[J], IMG[I], PYR[J], PYR[I], points[1], points[2], nPts, cvSize(win_size,win_size), Level, status     , 0, cvTermCriteria(CV_TERMCRIT_ITER|CV_TERMCRIT_EPS,20,0.03), CV_LKFLOW_INITIAL_GUESSES | CV_LKFLOW_PYR_A_READY | CV_LKFLOW_PYR_B_READY );

i.e. changed the 10th argument from '0' to 'status', and this solved the problem.

Hope this helps.

Possible bug in tldTrainNN

I have found a possible bug resetting all the positive examples of the model. I guess it doesn't happen often, but have a look at this:

function [conf1,conf2,isin] = tldNN(x,tld)

isin = nan(3,size(x,2));

if isempty(tld.nex) % IF negative examples in the model are not defined THEN everything is positive
conf1 = ones(1,size(x,2));
conf2 = ones(1,size(x,2));
return;
end


then in tldTrainNN

   [conf1,~,isin] = tldNN(x(:,i),tld); % measure Relative similarity

   % Positive
   if y(i) == 1 && conf1 <= tld.model.thr_nn % 0.65
       if isnan(isin(2))
           tld.pex = x(:,i);
           continue;
       end

if there are no negative examples in the model (tld.nex), the list of positive ones (many possible) (tld.pex) will be reset to just one example!

Is it a desired behaviour?

Bug with the Key Events

Hy

The key event doesn't work for me properly. If I callback is on, it shuts down on any key event. But if I comment it out, it doesn't react at all, but it think function handleKey(~, evnt) should work (tdldemo.m). How can I make this work like in the demo?

And one more thing, I'd like to follow the detection with the cursor, how can I get out the cordinates? I thought maybe I could use the center of the bbox with an other extra cpp (winapi SetCursorPos), but it doesn't work.
I mean if I use even const in the SetC..Pos call, it puts the cursor on the left-upper corner (position zero-zero). Do you have any Idea about this?

My idea: In the tdldisplay.m I call bb_cent for the cp.

plot(cp(1,:),cp(2,:),'.','color','red');
bb_cent(cp);

bb_cent looks like this:

include <windows.h>

include "mex.h"

void bb_cent(double *bb1) {

int _x = bb1[0];
int _y = bb1[1];
SetCursorPos(_x, _y);

}

void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{

switch (nrhs) {

    case 0: {
        mexPrintf("Not enough argument");
        return;
            }

    case 1: {
        // Input
        double *bb1 = mxGetPr(prhs[0]);
        //bb_cent(bb1);
        SetCursorPos(900,450);
        return;
            }
}

}
But It doesn't put the cursor to the right point just only to the zero-zero. What causes this error? :S

no compilation, flann error with opencv 2.4.2 with mac 10.8

I finally got opencv compiled and working with mountain lion. I can't get openTLD to compile in Matlab. I keep getting a flann error. and while I doubt this is the fault of openTLD, is there a workaround it?

/usr/local/include/opencv2/flann/params.h: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator]':

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.