Giter Club home page Giter Club logo

cppmt's People

Contributors

bryant1410 avatar gnebehay avatar hainesr avatar kornerc avatar trobro 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

cppmt's Issues

Travis CI integration

Hi Georg!

What would you think of a Travis CI integration?
It tries to build all commits and pull requests, and runs tests (if available).
I've tried it with a small project of mine: github and travis ci
You just have to add a .travis.yml file to your project, I can do that for you, and enable building on the travis homepage.

Cheers
Clemens

bounding box not disappear

thanks for your great support , and this great library . also i want you to excuse me for my poor English . i`ve an issue when tracking an object and it the bounding box appear in random places . is there a way to have some feedback from the code when the object is not exist .
thanks in advance

Make the log level configurable

It would be nice if the user could configure the log level (e.g. in the CMT class constructor) instead of having to change the source and recompile each time.

very poor tracking performance

I tried tracking simple objects I was holding in my hand using the macbook pro's isight camera, and performance seemed to be very poor. Objects would be completely lost within a few seconds even if I don't move or change the orientation much (including when orientation changes are enabled). Perhaps I'm using it wrong or only a certain type of use case is supported?

Bug in Consensus.cpp

Hello!

There is a bug in Consensus.cpp. At line 129 you create an object of type cluster_result as follows:

cluster_result Z(N-1);

Now when there is only one point in the vector 'points' the expressoin N-1 is 0, and the array inside object Z, (which is also named Z) is initialized with length 0.
Later in Consensus.cpp at line 145
MST_linkage_core(N,D,Z)
is called, and inside this function
Z2.append(0, idx2, min);
is called, where Z2 is the parameter Z.
Z2.append() then accesses Z[pos] with pos=0 (and smashes the stack for me), since the array has a length of 0 dereferencing it leads to undefined behaviour.

Using cluster_result Z(N); fixed it for me.

Best regards,
Christian

Python + Matlab Wrapper

Hi Georg.

I'm planning to write a Python wrapper for this library.
It would be nice if you could provide a nice c-api for your library. It's also straightforward for a Matlab wrapper.

The c-api may look similar to this

// cwrapper.h

#ifndef WRAPPER_H
#define WRAPPER_H

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

#include <stdlib.h>

typedef void* cmt_Cmt;

cmt_Cmt cmt_new();
void cmt_del(cmt_Cmt cmt);
void cmt_initialize(cmt_Cmt cmt,
  unsigned char* im_gray, size_t rows, size_t cols,
  int rect_x, int rect_y, int rect_w, int rect_h);
// ...

#ifdef __cplusplus
}
#endif // __cplusplus

#endif /* WRAPPER_H */
// cwrapper.cpp
#include "cwrapper.h"

#include <opencv2/core/core.hpp>

#include "CMT.h"

using cmt::CMT;
using namespace cv;

cmt_Cmt cmt_new() {
    CMT* cmt = new CMT();
    return cmt;
}

void cmt_del(cmt_Cmt cmt) {
    CMT* cmt_cpp = static_cast<CMT*>(cmt);
    delete cmt_cpp;
}

void cmt_initialize(cmt_Cmt cmt,
  unsigned char* im_gray, size_t rows, size_t cols,
  int rect_x, int rect_y, int rect_w, int rect_h) {
    CMT* cmt_cpp = static_cast<CMT*>(cmt);

    Mat image = Mat(rows, cols, CV_8UC1, im_gray);
    Rect rect(rect_x, rect_y, rect_w, rect_h);

    cmt_cpp.initialize(image, rect);

    // ...
}

// ...

BR Clemens

Error in the input path

OSX, Cmake as default, when I run the command "./cmt ./Vid_D_person.avi", it gives me error.
--->
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /tmp/opencv20150407-97477-xpu2s2/opencv-2.4.11/modules/highgui/src/window.cpp, line 261
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv20150407-97477-xpu2s2/opencv-2.4.11/modules/highgui/src/window.cpp:261: error: (-215) size.width>0 && size.height>0 in function imshow

Abort trap: 6

Update:
if I run the command: ./cmt ./*.mpg, it will work as expect. So guess maybe it will not support the avi file, but the testing data files from your website are all avi files.

Problem in making source file - ubuntu

Hi
I downloaded source file and extracted it . i ran "cmake . " command and completed without any error .

After running " make" i faced with this :
[ 11%] Building CXX object CMakeFiles/cmt.dir/common.cpp.o
In file included from /home/mehrzad/AI/cv/CppMT-master/common.cpp:1:0:
/home/mehrzad/AI/cv/CppMT-master/common.h:16:12: error: ‘std::numeric_limits’ has not been declared
using std::numeric_limits;
^
/home/mehrzad/AI/cv/CppMT-master/common.cpp: In function ‘float cmt::median(std::vector&)’:
/home/mehrzad/AI/cv/CppMT-master/common.cpp:14:16: error: ‘numeric_limits’ was not declared in this scope
return numeric_limits::quiet_NaN();
^
/home/mehrzad/AI/cv/CppMT-master/common.cpp:14:31: error: expected primary-expression before ‘float’
return numeric_limits::quiet_NaN();
^
/home/mehrzad/AI/cv/CppMT-master/common.cpp:14:31: error: expected ‘;’ before ‘float’
/home/mehrzad/AI/cv/CppMT-master/common.cpp:14:36: error: expected unqualified-id before ‘>’ token
return numeric_limits::quiet_NaN();
^
make[2]: *** [CMakeFiles/cmt.dir/common.cpp.o] Error 1
make[1]: *** [CMakeFiles/cmt.dir/all] Error 2
make: *** [all] Error 2

What should i do ?

Different FPS with different sources of illumination

Hello. I'm having a rare behavior of the tracker. I was running the tracker last night having almost 20FPS. However today, I'm having 10FPS. I've found out that illumination is the problem. Is it normal? Is there a way to avoid this problem? Should always the tracker perform at the same rate?.

Thanks.

Running on Raspberry Pi ?

Hello,

Sorry I have OpenTLD running and interested in swapping over to CMT, just trying to get this running on Raspberry Pi and wondering if anyone has had success?

Thank heaps,
Dave

Adaptive correspondences possibly overriding static ones

Hi!
Your work is really interesting :-) I'm doing my master thesis combining your method with other techniques and I have a small question about the implementation.

In your paper " Clustering of Static-Adaptive Correspondences for Deformable Object Tracking" , you propose to prefer static correspondences (obtained via global matching) over adaptive ones (derived from tracking with optical flow), but it seems that in the code you do the opposite when calling the member function "fusion.preferFirst()":

CMT.cpp, line 152
fusion.preferFirst(points_tracked, classes_tracked, points_matched_global, classes_matched_global,
points_fused, classes_fused);

The function first integrates all tracked points to the fused set and then adds each point from the global match set whose index does not coincide with any of the indices from the tracked points.

Do the paper and the implementation coincide? If so, then I misunderstood the algorithm > <

vector subscript out of range?

ERROR:
vector classes_fg;
classes_fg.reserve(keypoints_fg.size());
for (size_t i = 0; i < keypoints_fg.size(); i++)
{
classes_fg.push_back(i);
}
Mat descs_fg;
Mat descs_bg;
descriptor->compute(im_gray, keypoints_fg, descs_fg);
descriptor->compute(im_gray, keypoints_bg, descs_bg);
RIGHT:
Mat descs_fg;
Mat descs_bg;
descriptor->compute(im_gray, keypoints_fg, descs_fg);
descriptor->compute(im_gray, keypoints_bg, descs_bg);

vector<int> classes_fg;
classes_fg.reserve(keypoints_fg.size());
for (size_t i = 0; i < keypoints_fg.size(); i++)
{
	classes_fg.push_back(i);
}

this is my solution,maybe help for you

low frame rate in android

I have been successfully integrated CppMT into Android using NDK. I wrote a two JNI Wrapper for initialize and processFrame. the camera is an OpenCV JavaCameraView. Everything seems to be functioning. However, whenever CMT tracking started, the frame rate dropped significantly.

When camera frame size is 1080P, the FPS dropped to 1 FPS; when camera frame size is 720P, the FPS is around 4 FPS; when camera frame size is 480P, the FPS is around 10 FPS.

Is this expected performance on Android or my integration is wrong?

Any advice would be highly appreciated.

cmt vs kcf ?

Hello, for cmt and kcf, there are benchmarks for their performance comparison?

Missing trax.h file

Dear Mr Gnebehay,
I downloaded the entire CppMT folder. However, running with Microsoft Visual studio, It is giving error missing trax.h file. Could you please check again if trax.h is truly missing on GitHub or the file could be excluded. Thank you very much.

Performance issues

I cloned the repo, used cmake, and built with default and "release" configuration on a one-year-old Macbook Pro running OS X. It takes roughly 5 seconds to process a frame, which was not the performance I was expecting. I didn't change anything or provide any arguments to cmt. Is it possible to achieve nearly realtime performance? I didn't look at your implementation of optical flow, but I have previously found Lucas-Kanade to be very performant on the same machine.

Errors in while building cmt

Hi , I am getting these errors while building CMT solution in Visual Studio 2013.

Error 1 error LNK2019: unresolved external symbol __imp_getopt_long_a referenced in function main C:\Users\Administrator\Desktop\CPPMT\cmt\main.obj cmt
Error 2 error LNK2001: unresolved external symbol __imp_optind C:\Users\Administrator\Desktop\CPPMT\cmt\main.obj cmt
Error 3 error LNK2001: unresolved external symbol __imp_optarg_a C:\Users\Administrator\Desktop\CPPMT\cmt\main.obj cmt
Error 4 error LNK1120: 3 unresolved externals C:\Users\Administrator\Desktop\CPPMT\cmt\Debug\cmt.exe cmt

I think these errors show up due to errors in the code. Please help me.

Output file

Whilst specifying--output-file=/path/to/file.csv as an argument, the output is the initialization information only. Has anyone got a fix to specify per-frame bbox information?

Errors in consensus.cpp

Dear Mr. gnebehay,

I've compiled your code and I get following errors in consensus.cpp:

Error 1163 error C2057: expected constant expression C:\Nerdzenie\CppMT-master\CppMT-master\Consensus.cpp 154
Error 1166 error C2057: expected constant expression C:\Nerdzenie\CppMT-master\CppMT-master\Consensus.cpp 180
Error 1165 error C2133: 'S' : unknown size C:\Nerdzenie\CppMT-master\CppMT-master\Consensus.cpp 154
Error 1168 error C2133: 'T' : unknown size C:\Nerdzenie\CppMT-master\CppMT-master\Consensus.cpp 180
Error 1164 error C2466: cannot allocate an array of constant size 0 C:\Nerdzenie\CppMT-master\CppMT-master\Consensus.cpp 154
Error 1167 error C2466: cannot allocate an array of constant size 0 C:\Nerdzenie\CppMT-master\CppMT-master\Consensus.cpp 180

Do you have any idea how can I solve this?

Track Multiple Objects

Does it support tracking multiple objects? If not, have you started anything related to tracking multiple objects or do you have any advice on how to approach this?

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.