Code Monkey home page Code Monkey logo

opentld's Introduction

Introduction

This is a C++ implementation of OpenTLD that was originally published in MATLAB by Zdenek Kalal. OpenTLD is used for tracking objects in video streams. What makes this algorithm outstanding is that it does not make use of any training data. This implementation is based solely on open source libraries, meaning that you do not need any commercial products to compile or run it.

The easiest way to get started is to download the precompiled binaries that are available for Windows and Ubuntu 12.04.
There is also a PPA available for Ubuntu 12.04. You just have to execute these commands:

sudo add-apt-repository ppa:opentld/ppa
sudo apt-get update
sudo apt-get install opentld

If you have a webcam attached to your PC, you can simply execute opentld (on Linux) or opentld.exe (on Windows) in order to try it out. You can use the graphical configuration dialog as well, you just have to execite qopentld (on Linux) or qopentld.exe (on Windows).
For other configuration options, please see below.

A documentation of the internals as well as other possibly helpful information is contained in this master thesis.

Usage

Keyboard shortcuts

  • q quit
  • b remember current frame as background model / clear background
  • c clear model and stop tracking git
  • l toggle learning
  • a toggle alternating mode (if true, detector is switched off when tracker is available)
  • e export model to file specified in configuration parameter "modelExportFile"
  • i import model from file specified in configuration parameter "modelPath"
  • r clear model, let user reinit tracking

Command line options

Synopsis

opentld [option arguments] [arguments]

option arguments

  • [-a <startFrameNumber>] video starts at the frameNumber startFrameNumber
  • [-b <x,y,w,h>] Initial bounding box
  • [-d <device>] select input device: device=(IMGS|CAM|VID|STREAM)
    IMGS: capture from images
    CAM: capture from connected camera
    VID: capture from a video
    STREAM: capture from RTSP stream
  • [-e <path>] export model after run to path
  • [-f] shows foreground
  • [-i <path>] path to the images or to the video.
  • [-j <number>] show trajectory for the last number frames
  • [-h] shows help
  • [-m <path>] if specified load a model from path. An initialBoundingBox must be specified or selectManually must be true.
  • [-n <number>] Specifies the video device to use (defaults to 0). Useful to select a different camera when multiple cameras are connected.
  • [-p path] prints results into the file path
  • [-s] if set, user can select initial bounding box
  • [-t <theta>] threshold for determining positive results
  • [-z <lastFrameNumber>] video ends at the frameNumber lastFrameNumber. If lastFrameNumber is 0 or the option argument isn't specified means all frames are taken.

Arguments

[CONFIG_FILE] path to config file

Config file

Look into the sample-config-file for more information.

Building

Dependencies

  • OpenCV
  • CMake
  • libconfig++ (optional)
  • Qt4 (optional)

Compiling

CMake

OpenTLD uses CMake to create native build environments such as make, Eclipse, Microsoft Visual Studio. If you need help look at Running CMake.

You can use cmake-gui, if you need a graphical user interface.

Use CMake to build the project. You can use "cmake-gui", if you need a graphical user interface.

Gui

  • Specify the source path (root path of the dictionary) and the binary path (where to build the program, out of source build recommended)
  • Configure
  • Select compiler
  • Adjust the options (if needed)
  • Configure
  • Generate

Command line
If you have uncompressed the source in $OPENTLD, type in a console:

cd $OPENTLD
mkdir ../build
cd ../build
cmake ../$OPENTLD -DBUILD_QOPENTLD=ON -DUSE_SYSTEM_LIBS=OFF

CMake options

  • BUILD_QOPENTLD build the graphical configuration dialog (requieres Qt)
  • USE_SYSTEM_LIBS don't use the included cvblob version but the installed version (requieres cvblob)

Windows (Microsoft Visual Studio)

Navigate to the binary directory and build the solutions you want (You have to compile in RELEASE mode):

  • opentld build the project
  • INSTALL install the project

Note: vcomp.lib is necessary when you try to compile it with OpenMP support and the Express versions of MSVC. This file is included in the Windows Server SDK.

Linux (make)

Navigate with the terminal to the build directory

  • make build the project
  • make install build and install the project

Mac

  • brew install python
  • brew install gfortran
  • easy_install numpy
  • brew install cmake
  • brew install opencv
  • cmake build the project

Debian package

  • Navigate with the terminal into the root dictionary of OpenTLD (OpenTLD/)
  • Type debuild -us -uc
  • Delete the temporary files in the source tree with debuild clean

opentld's People

Contributors

chrox avatar dewdrops avatar gnebehay avatar godspeed1989 avatar jmfs avatar jsenecal avatar kornerc avatar lukaso avatar sebastianborggrewe avatar stonelinks avatar werkov avatar 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

opentld's Issues

opentld.exe Binary File Sizes not matching - Windows

I ran CMake to get the Visual Studio solution build and then compiled 32 bit release version in my vs 2012 Express for desktop . My open tld.exe is only 113 kb but the precompiled binary that I downloaded for version 1.3 is 178 kb. I pulled in the opencv2.2 dlls that it requested for running opentld but it pulls up my web cam with no video display and it crashes if I issue any commands.

The precompiled binary is working fine.

How can I fix this?

OpenTLD does not work with recent version of OpenCV

Operating System: Ubuntu 11.10
I have precompiled recent version of OpenCV and I would like to compile OpenTLD with this version. I changed linked library in src/CMakeLists.txt file: highgui -> opencv_highgui; cv => opencv_core. Application compiled properly. However after running application, select boundary box and press Enter I received 'Segmentation fault'. The same if boundary box is defined in config file.

Compile options

I got all libraries compiled. How to compile my own program properly so that:

  1. OpenMP does not cause a seg fault
  2. the algos run as fast as in the opentld program.

What are the correct flags? There might be some issues in DetectorCascade regarding #pragma omp parallel for. Perhaps some variables should be private instead of shared shared, or at least atomic.

osx support?

when I type make I get the following error:

➜ OpenTLD git:(master) ✗ make


-- CMAKE_SOURCE_DIR = /Users/sophrinix/Projects/cppOpenTld/OpenTLD
-- CMAKE_INSTALL_PREFIX = /usr/local
-- CMAKE_BUILD_TYPE = Release
-- CMAKE_BINARY_DIR = /Users/sophrinix/Projects/cppOpenTld/OpenTLD
-- Change a value with: cmake -D=


-- Configuring done
-- Generating done
-- Build files have been written to: /Users/sophrinix/Projects/cppOpenTld/OpenTLD
[ 3%] Building C object src/CMakeFiles/config.dir/config/grammar.c.o
[ 6%] Building C object src/CMakeFiles/config.dir/config/libconfig.c.o
/Users/sophrinix/Projects/cppOpenTld/OpenTLD/src/config/libconfig.c: In function ‘__config_locale_override’:
/Users/sophrinix/Projects/cppOpenTld/OpenTLD/src/config/libconfig.c:90: error: ‘locale_t’ undeclared (first use in this function)
/Users/sophrinix/Projects/cppOpenTld/OpenTLD/src/config/libconfig.c:90: error: (Each undeclared identifier is reported only once
/Users/sophrinix/Projects/cppOpenTld/OpenTLD/src/config/libconfig.c:90: error: for each function it appears in.)
/Users/sophrinix/Projects/cppOpenTld/OpenTLD/src/config/libconfig.c:90: error: expected ‘;’ before ‘loc’
/Users/sophrinix/Projects/cppOpenTld/OpenTLD/src/config/libconfig.c:91: error: ‘loc’ undeclared (first use in this function)
/Users/sophrinix/Projects/cppOpenTld/OpenTLD/src/config/libconfig.c:121:2: warning: #warning "No way to modify calling thread's locale!"
make[2]: *** [src/CMakeFiles/config.dir/config/libconfig.c.o] Error 1
make[1]: *** [src/CMakeFiles/config.dir/all] Error 2
make: *** [all] Error 2

What am I doing wrong/ how can I get this to work on osx (snow leopard 64 bit mode)

Access Violations in VarianceFilter.cpp:67

integralImg and integralImg_squared are getting initialized with a size of 337920, but the off[3], off[2], off[1], and off[0] are trying to index this data with values of 340059, 283035, 340032, 283008.

My code is simple. Am I doing something wrong?

int main(int argc, char* argv[])
{
    tld::TLD tracker;
    cv::VideoCapture video("14117949_a.mpg");

    if(!video.grab())
    {
        std::cout << "Error loading the video..." << std::endl;
        return 0;
    }
    cv::Mat img, gray;
    video >> img;
    cv::cvtColor(img, gray, CV_BGR2GRAY);

    tracker.detectorCascade->imgWidth = img.cols;
    tracker.detectorCascade->imgHeight = img.rows;
    tracker.detectorCascade->imgWidthStep = img.step;

    cv::Rect InitialRect(40,40,120,120);
    tracker.selectObject(gray, &InitialRect); //Access Violation
}

Segmentation fault after pressing the "q"-Key

OS-Version: Ubuntu 12.04

What steps will reproduce the problem?

  1. Start OpenTLD in terminal with opentld
  2. Press the q-Key in the MainWindow

What is the result?
Segmentation fault
Output:

Segmentation fault (core dumped)

Compile without cmake

Hello,
I am including this OpenTLD code on a project, and I would like to know if it is possible to compile this OpenTLD code without Cmake, just like the usual g++ ......
Someone knows if it's possible?

Thank you all

OpenTLD crashes with bounding boxes drawn successively over time

I'm running OpenTLD on a Windows 7 PC, using MS Visual Studio 2005. I can consistently crash the program if I draw bounding boxes repeatedly over a sequence of images (the target is difficult to track in the images, so the tracker cannot lock onto the target).

When the crash occurs, a window indicates that opentld.exe has stopped working. Going into the debugger, Visual Studio displays an error window with a message like this: "Unhandled exception at 0x0041f859 in opentld.exe: 0xC0000005: Access violation reading location 0x38251454." The Visual Studio debugging window indicates that the error has stopped in the EnsembleClassifier::calcConfidence method, when trying to execute the line: "conf += posteriors[i * numIndices + featureVector[i]];"

A little further investigation shows that when the crash occurs, the posteriors[] array only has memory allocated for one float, and the featureVector[] array only has memory allocated for one int. It appears that these arrays are not being initialized and properly sized, and do not contain the expected content.

Unable to input videos

Is there some trick to running OpenTLD with an mpg4 video file? The docs say to use opentld -d=VID -i=path/to/video.mpg4 but this gives me the error:

Error: Unable to initialize camera

Why is it trying to initialize the camera when I've specified input from a video file? What video formats does OpenTLD support?

Segmentation fault in export model

I got the Segmentation fault while exporting model after run through whole video without problem.

Here is the gdb feedback:
Program received signal SIGSEGV, Segmentation fault.
0x031a0240 in __fprintf_chk () from /lib/libc.so.6

I use Ubuntu 10.10 and OpenCV lastest 2.4.9

Add support for camera selection using -d option

It would be nice to be able to select a particular video device (e.g. /dev/video1) on the command line using the -d option. At the moment, the first video device is hard coded in the source and so there is no way to select an alternate camera that might be attached to the PC.

Thanks!

Starting frame option isn't working in a video

If I load a video and specify a starting frame with the option -a, then the tracker starts counting from that number but at the beginning of a video.

For example, if I specify -a900 and the video is 1000 frames long, then the tracker starts tracking at time t=0 seconds and for a duration of 1000-100 frames.

Using OpenTLD in a Managed Application

I have tried compiling OpenTLD as a dll and importing into a c# application. I am able to create and delete objects in the unmanaged dll from the managed application using pInvoke. But as after I create a pointer to Main the application will crash if I do any of the following:

  • Delete the Unmanaged object containing a pointer to Main
  • Run any of the main->tld-> functions
  • Even cvReleaseImage(&img); crashes the application

The message that I get is 'System.AccessViolationException' occurred - Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Has anyone used OpenTLD as a dll in a managed application? Are there any memory issues that I should be aware of?

More mem leaks

I have browsed through the code to detect mem. leaks etc. because my app crashed every once in a while. Basically what I did was that I looked for:

'new' 'new[]', 'malloc', 'calloc', and checked that there were 'delete', 'delete[]', 'free', 'free', respectively.

In many parts of the code I detected these kinds of problems:

void fnct() {
this->a = new char[N];
}

where fnct() was called repetively. This causes mem. leaks. Instead it must be

void fnct() {
if(this->a != NULL) {
delete[] a;
}

this->a = new char[N];
}

I can pin point the places or even share the code when I am confident that the code, with my modifications, is safe.

Add QT-config dialog

After Refactoring in the past months the old QT-config dialog isn't working.
The dialog should start the main-program (opentld) with the correct cli arguments.

Trouble installing on Ubuntu

Very interested, having a little trouble getting started though. Cmake is not a specialty of mine - can you provide clearer instructions on how to install?

I have libcv, libhighgui, and libcvaux with associated -dev packages installed. Then I clone the git repo:

git clone https://github.com/gnebehay/OpenTLD.git

Then I run cmake-gui. I select the OpenTLD folder just checked out (should it be OpenTLD/src?), and pick a newly created folder in another directory as the build folder.

Then I press "configure" and get a popup that says "Error in configuration process, project files may be invalid."

The error is duplicated 4 times for different folders, the first one says:

CMake Error at src/imacq/CMakeLists.txt:3 (find_package):
  Could not find module FindOpenCV.cmake or a configuration file for package
  OpenCV.

  Adjust CMAKE_MODULE_PATH to find FindOpenCV.cmake or set OpenCV_DIR to the
  directory containing a CMake configuration file for OpenCV.  The file will
  have one of the following names:

    OpenCVConfig.cmake
    opencv-config.cmake

Can you get me going? Do I need to compile OpenCV instead of using repository version? I'm using Ubuntu 10.04 64-bit, otherwise I would just get started with the provided .deb installer.

Corrupted Video Feed on SL6.3

I working on a non-administrative account. I compiled OpenCV manually and then used cmake with the
-DCMAKE_INSTALL_PREFIX:PATH=~/opentld/
So that it would install in a local folder.
The program compiles and runs without any errors, but the video feed is corrupted like so:
screen

Needless to say I've got other utilities on my computer which get the video feed from /dev/video0 just fine. I've got no idea how to proceed.

Make error on mac?

Using opencv3:

[ 2%] Building CXX object src/3rdparty/cvblobs/CMakeFiles/cvblobs.dir/blob.cpp.o
In file included from /Users/alefveld/Downloads/OpenTLD-master-2/src/3rdparty/cvblobs/blob.cpp:17:
/Users/alefveld/Downloads/OpenTLD-master-2/src/3rdparty/cvblobs/blob.h:21:10: fatal error: 'opencv/cxcore.h' file not found

include <opencv/cxcore.h>

     ^

1 error generated.
make[2]: *** [src/3rdparty/cvblobs/CMakeFiles/cvblobs.dir/blob.cpp.o] Error 1
make[1]: *** [src/3rdparty/cvblobs/CMakeFiles/cvblobs.dir/all] Error 2
make: *** [all] Error 2

opentld.exe says "Unable to open video" with various AVI containers

I'm on Windows 7 using the pre-compiled opentld.exe from OpenTLD_1.3.0. I'd like to run opentld.exe on some AVI files. When I use the following command line, I receive the error "Error: Unable to open video":
opentld.exe -d VID -z 0 -i cam1.avi

This error is generated from "ImAcq.cpp" on line 56 when the video capture is NULL.

I've converted my AVI files to each of the pre-loaded AVI formats provided in "Any Video Converter 5". Same error is observed.

opentld.exe runs perfectly with a webcam (great job btw!).

How should I proceed?

Thank you,
Alex

Error while running make in mac os

I got this error while running make "non-aggregate type 'const CvPoint' cannot be initialized with an
initializer list" .Please help.
screen shot 2016-02-05 at 2 40 42 pm

Poor Tracking Compared to Matlab Version of TLD

I have been running the panda images (1-3000). I have made all kinds of adjustments in the config file but it fails to track the panda in more than 80% of the images. I noticed how well the matlab version tracks the panda in a video. Since my application is for a camera that stays fixed. I am thinking that it would be better to enhance the functionality by redirecting the tracking window to the area of motion by using a simple 2frame comparison for detecting motion. Any comments?

Has any one implemented a display for the bounding box image reference windows that it is storing for tracking? It would be good for debugging.

Results not reproducible

I use opentld.lib (and of course, cvblobs.lib) as static lib in my VS2008 application (I do not use the main.lib and config++.lib). I usually got different results running on the same video sequence several times, i.e., the results were not reproducible, especially when executed outside the VS environment. I believe it is due to the random intialization and random_shuffle(negativeIndices.begin(), negativeIndices.end());

I tried to set srand(0) and create a new TLD() in the beginning of every run but it does not help.
srand(0);
if(myTLD){
delete myTLD;
myTLD = new TLD();
}

I also tried with no luck random_shuffle(negativeIndices.begin(), negativeIndices.end(), myrandom);
where myrandom is defined as int myrandom (int i)
{
static bool seeded = seed();
return std::rand()%i;
}

Any thoughts, guys? any ...
Thanks you.

build fails on OSX

Following your install-steps for OSX, I get

Linking CXX executable ../../bin/opentld
ld: warning: directory not found for option '-L/usr/local/share/OpenCV/3rdparty/lib'
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/opentld] Error 1
make[1]: *** [src/opentld/CMakeFiles/opentld.dir/all] Error 2
make: *** [all] Error 2

and indeed, brew did not install any opencv-3rdparty libraries as far as I can see. Even after removing the corresponding line in CMakeLists.txt: set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgomp") the error remains the same. So I removed all gomp and OpenMP linkings, since you dont list it as dependency. Then 'make' runs without errors, but the executable throws a segfault:

$ ./opentld -s
Error: Unable to grab image from video
Segmentation fault: 11

bt gives me:

Process 18184 launched: './bin/opentld' (x86_64)
Error: Unable to grab image from video
Process 18184 stopped
* thread #1: tid = 0xa8d90, 0x000000010000b3e7 opentld`Main::doWork(this=0x000000010110e040) + 103 at Main.cpp:41, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, address=0x28)
    frame #0: 0x000000010000b3e7 opentld`Main::doWork(this=0x000000010110e040) + 103 at Main.cpp:41
   38   {
   39       Trajectory trajectory;
   40       IplImage *img = imAcqGetImg(imAcq);
-> 41       Mat grey(img->height, img->width, CV_8UC1);
   42       cvtColor(cv::Mat(img), grey, CV_BGR2GRAY);
   43   
   44       tld->detectorCascade->imgWidth = grey.cols;
(lldb) bt
* thread #1: tid = 0xa8d90, 0x000000010000b3e7 opentld`Main::doWork(this=0x000000010110e040) + 103 at Main.cpp:41, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, address=0x28)
    frame #0: 0x000000010000b3e7 opentld`Main::doWork(this=0x000000010110e040) + 103 at Main.cpp:41
    frame #1: 0x0000000100006615 opentld`main(argc=2, argv=0x00007fff5fbffbc0) + 453 at OpenTLD.cpp:60
    frame #2: 0x00007fff8833b5fd libdyld.dylib`start + 1

So ... are you dependend of OpenMP/GOMP and forgot to list it in the install instructions? Or did an older OpenCV version come with OpenMP/GOMP as 3rdparty lib, which is not the case any more? Do you think the runtime-error above is because of the missing OpenMP/GOMP-linking or something else?

P.S. With the original CMakeLists I also get a lot of clang: warning: argument unused during compilation: '-fopenmp'.

OpenTLD crashing at startup because of OpenCV

Afeter having compiled successflluy OpenTLD with Cmake 2.8.12, Opencv 2.4.11, GTK2.0-dev on Ubuntu 14.04.3 LTS, the following error appears:

OpenTLD appeares soon...
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /home/user/opencv-2.4.11/modules/highgui/src/window.cpp, line 483
terminate called after throwing an instance of 'cv::Exception'
what(): /home/user/opencv-2.4.11/modules/highgui/src/window.cpp:483: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow

tld->processimage(cv::Mat) is really slow at the first frame

Hi!

I'm trying to use the openTLD lib in an iOS apllication. First I detect a face with a Face detector and want to track it. After I detected a face call SelectObject on tld with a grayscaled image.
From the next Frame I'm calling tld->imagePrcess(rgbImage) to process the image/track the face. The first call of the imageProcess tooks 5 minutes and I can't figure out what am I doing wrong. After that every frame is computed in 100ms. What can be the problem?

Error after finish tracking video file

When we process video file and file finishes (end of file) we receive error. Error: Unable to grab frame + OpenCV error of bad argument to CvGetSize function.
IMHO, first error should stay, but second error could be removed. The simplest way of removing this error is adding if(img != NULL) condition (with else{ break;} at the end) for block of code from line number 122 to line number 228 in Main.cpp file.

Many leaks found, lets fix them

Hi there,

I've been playing around with you library (great work by the way) and noticed some memory leaking. I fired up a memory leak detector tool for Visual Studio (called "visual leak detector") which showed the location of many small leaks which could easily compound over time.

I'm just wondering if you are actively maintaining/developing this library, if so I'd be happy to help contribute some fixes for this, or to identify the locations of the leaks.

Many of the leaks are small but occur in functions that are called many times thus can add up. For instance in Clustering::clusterConfidentIndices() two arrays are allocated (distances and clusterIndices) but never freed. This function is called by DetectorCascade::detect which is in turn called by TLD::processImage.

There are others too which the tool showed up. Let me know if you are keen to fix them up :)

Keep up the great work,
Jason

libopentld

I'm using PC (Windows 7, 32bit, Visual Studio 2010).
After using CMake, I tried to build the solutions.

I got an error "libopentld.lib can not open".
I got same error on Mac (Lion, Xcode 4.2).

Could you tell me the solution?

OpenTLD in Images

I have tested the binary file, Opentld in my computer. When it comes to images , the program is out of normal without response. My OS is Win7.
Thank you for your attention , looking forward to your reply .

Ubuntu 11.10 - Parse error in last line of config file

System: Ubuntu 11.10
After compilation and invoking 'tld <sample-config.cfg>' I received : Parse error. Error was in line 39 (last line of config file - '#modelExportFile="model"; #File model is exported to'). When I removed this line, program works good.

Creating Multiple OpenTLD objects to Track Multiple objects

Instead of running multiple instances of OpenTLD application, would there be any problems in creating a class called OpenTLD and creating multiple instances of the class for tracking multiple objects? The OPenTLD class that I created has its own Main* etc.. and thus when used as an imported dll could easily track multiple objects.

Does any of the code have any static variables / objects that may be shared by all Main objects? This is the only problem that I am anticipating. If anyone has any advice please let me know. At present when I create the second OpenTLD object it works fine until I start running the TLD methods on the second object then the application crashes.

Error LNK2019 when building

Hello,
I am using Windows 7 64bits, Visual Studio 2013 and OpenCV 2411.
I think I linked everything to link in the properties of both projects main and opentld. When I build separately the main project first, there is no error, just somes warnings and main.lib is created. But when I try to build opentld or all the projects, I have 11 errors:

"error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl libconfig::Setting::operator int(void)const " (_imp??BSetting@libconfig@@QEBAHXZ) referenced in function "public: int __cdecl tld::Config::init(int,char * *)" (?init@Config@tld@@QEAAHHPEAPEAD@Z) C:\Users\marie.burckbuchler\Documents\GitHub "
in file: main.lib(Config.obj) in the project opentld

all the errors are similar to each other.

And there are a lot of Warnings: 134, mostly:
"warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)"
in file libconfig.hpp on different lines in the project main

Could someone give me a clue on what could be the problem?
Thank you!

Manual setting bounding box doesn't work

I use command "-s" to select the initial box manually. The window appeared with the instruction "Draw a bounding box then press Enter", I drew a box without any problem but when I pressed Enter, nothing happened. I even can draw a new box. I try to press Enter everywhere (terminal, image windows) but nothing happened.

Ubuntu 10.10 OpenCV 2.4.9

And yet the closing up of window seems impossible. I have to use Ctrl-C to close the program.

Bounding Box remains in frame, even though object tracked is not in the frame

How to recreate issue:

  1. Run opentld

  2. Press 'r', select an object and press 'enter'

  3. Learn for a while, and then get the object out of the frame

  4. Yellow bounding box remains in the frame, even though object tracked is out of the frame

The problem appeared after commit: 'Another memory fix (special thanks to jasoncatchpole)', and specifically at TLD.cpp , lines 102-108. I added this after line 108:

else
{
prevBB->x = -1;
prevBB->y = -1;
prevBB->width = -1;
prevBB->height = -1;
}

and it seems to have fixed the issue. Please verify.

Thnx!

Problem when rotating the model

Hi, thanks for building the C++ version OpenTLD

I just found a problem when I tested it today.

I marked the model, which is a logo on my cup. When I rotate the cup, the box covering the model became smaller and smaller until the model cannot be seen in the sight. At that moment, the box became cover and follow the edge of my cup and the background.

I think it should be caused by the learning procedure of the algorithm. and to solve that I need to add a threshold of the recall value. but due to the large number of files, can anyone give me an idea what file should I modify?

I find a TODO in line 78 of file MedianFlowTracker.cpp, but not sure whether this related and how to change it.

its closed when I load video

Hi,
I tried to import a video by qopendtld.exe but when I imported the video and click ok the window just closed! anybody know why does it happy?

pls: can we choose the roi buy just using mouse instead of type in coordinates ?

Thanks a lot!

Qt Cmake issue

I'm running Ubuntu 11.04. I built and installed OpenTLD and played around with it for a while, and from what I saw it worked awesome. I want to build it with Qt support, and for cmake ran "cmake -DBUILD_WITH_QT=true" and got the following error:

CMake Error in src/CMakeLists.txt:
Cannot find source file "qtconfiggui.ui". Tried extensions .c .C .c++ .cc
.cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

I checked and the file it's looking for is not there. Any quick fix for this?

PS - This implementation is really great!! A lot better than the others that I tried! Keep up the great work.

Memory Leak

After compiling the program, I've noticed the memory increased drastically. I used Visual Leak Detector to try to debug it, but I want to make sure if anyone else is getting a leak, so I know it's not something on my machine.

Mem leak + some inconsistencies

  1. This does not leak hugely, but anyway. In Main, initialBB is never released.
  2. TLD::processImage(), why cvtColor(img..., CV_RGB2GRAY), instead of CV_BGR2GRAY?
  3. In Main, cv::Mat grey is created and given to tld through TLD::selectObject(). In that function a cv::Mat header is made and the actual data "owner" is grey in Main::doWork(). This is a bit difficult to digest at first but the danger is present when using TLD in other programs and the user does not realise that the grey image must exist throughout the life of an instance of TLD.

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.