delmottea / libcmt Goto Github PK
View Code? Open in Web Editor NEWc++ port of the python code from https://github.com/gnebehay/CMT
License: BSD 3-Clause "New" or "Revised" License
c++ port of the python code from https://github.com/gnebehay/CMT
License: BSD 3-Clause "New" or "Revised" License
Hey,
Tried working with initialise function and got an access violation.
It seems that the problematic code is:
std::vectorstd::string list;
cv::Algorithm::getList(list);
when the destructor of vector at the and of the function is called I get an access violation.
Someone help? please?..
B
I'm trying to compile the code using g++
g++ -c -o main.o main.cpp
but there is a error saying
main.cpp:36:58: error: ‘sprintf’ was not declared in this scope
I'm a little confused when I include the stdio.h in main.cpp directly, there are lots of errors when compiling saying: undefined reference
any suggestion?
I'm getting the error below when building on OS X Yosemite and using opencv-3.0.0 beta.
Is this due to a change between opencv 2.9 and 3?
error: no member named 'create' in 'cv::Algorithm'
detector = cv::Algorithm::createcv::FeatureDetector(detectorType.c_str());
Hi,
Is it possible to have some instructions on how to build for Windows ?
Looking at the code I see that you need the source or at least the header files for opencv2. It would really be good to have detailed build instructions.
/home/emil/libCMT/CMT.cpp: In member function ‘void CMT::processFrame(cv::Mat)’:
/home/emil/libCMT/CMT.cpp:558:69: warning: name lookup of ‘i’ changed [enabled by default]
descriptorMatcher->match(selectedFeatures, features.row(i), matches);
^
/home/emil/libCMT/CMT.cpp:516:13: warning: matches this ‘i’ under ISO standard rules [enabled by default]
for(int i = 0; i < keypoints.size(); i++)
^
/home/emil/libCMT/CMT.cpp:527:17: warning: matches this ‘i’ under old rules [enabled by default]
for(int i = 0; i < matches.size(); i++)
^
Perhaps nicer to change loop variables to avoid this kind of warning?
Many thanks for your work to translate Python code to C++.
Would it be possible to have a C# wrapper for Emgu CV (for n00b like me)
Many thanks !
Hi,
When I build (opencv 3.2.0 on mac) I get this error:
cv::calcOpticalFlowPyrLK(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputOutputArray const&, cv::_OutputArray const&, cv::OutputArray const&, cv::Size, int, cv::TermCriteria, int, double)"
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The Problem is in this lines (CMT.cpp):
//Calculate forward optical flow for prev_location
cv::calcOpticalFlowPyrLK(im_prev, im_gray, pts, nextPts, status, err);
//Calculate backward optical flow for prev_location
cv::calcOpticalFlowPyrLK(im_gray, im_prev, nextPts, pts_back, status_back, err_back);
How to fix it ?
Thanks
He has some open requests. Are you following his changes?
Hi, I just started with programming and C++ a few weeks back, so please bear with me if I have a stupid question.
I'm trying to use CMT in Visual Studio Community 2013 on Windows 7, in combination with OpenCV 2.4.11 (64 bit). I got the tracker working on 1280x720 images with a ROI of 156x87. The problem is that the tracker is extremely slow. The first frame is shown after about 5 seconds, and after that 5 seconds are needed for every frame. CMT.exe uses 50 % of the dual core 3.0 GHz CPU during this (so one full core I guess). About 30 points are tracked, so that shouldn't be too high.
The notes of this project advise to move two lines to the constructor, but I'm not sure were to put them. Please specify the instruction more if that might be the solution.
Tnx in advance, Rik.
I also tried openCV 3 (beta) 64 bit. This gives error C2664 at line 115 CMT.cpp:
cv::Algorithm::getList(list);
EDIT: I've tested CMT some more and it seems it doesn't meet the requirements. I'm marking this issue as solved.
Hi all,
I download the lasted code from the website and run but always received the error "This may be due to a corruption of the heap,or any of the DLLs it has loaded" when running the cmt.initialise ( ) function.
I tried to debug line by line and detected that there are problems at the following line of code
std::vectorstd::string list;
cv::Algorithm::getList(list);
std::vectorcv::KeyPoint keypoints;
detector->detect(im_gray0, keypoints);
I tried out two way to make the function works
First method, "list" and "keypoints" variables declared as static variables something like
static std::vectorstd::string list;
cv::Algorithm::getList(list);
static std::vectorcv::KeyPoint keypoints;
detector->detect(im_gray0, keypoints);
Second method, move those variable to cmt() constructor
I am not sure is there anyone here facing the same error like me when running the program. I wonder whether two method i made here to make the function works is correct or not. if you know better solution and explain me why the error happens and what is the right or potential solution to fix the issue , i would appreciate your help. Thank you very much.
Hi, I'm trying to modify the code in order to process with my camera.
But I got a segmentation fault (core damped) after compile.
I use the cv::VideoCapture cap(1)
to read my camera, then put cv::Mat img and cv::Mat im_gray out of the for loop then cap>>img;
inside the loop. Also comment the num2str
and sprintf
.
But it doesn't work,
Can anyone tell me what else should I modify?
Thanks.
I don't understand the license of this project.
Hi, I'm a master degree student, and I currently work on a master thesis.
I'm using your code as a starting point for my target tracking algorithm. (It's not the core o the thesis, but I need a CMT c++ implementation)
you can find my modified version of the code here
https://github.com/AIRLab-POLIMI/C-SLAM/tree/master/c_tracking
I'm doing a lot of refactoring and features addition, so i want to know how to deal with your copyright note.
some questions:
If you prefer, you can conctact me at:
[email protected]
however you can answer here all my doubts, for me it's ok.
Also, if you want, I can prepare a pull request with all changes/refactoring/imrovements i've done (but some of them requires ROS, or at least a ROS header only library).
I look forward to your reply as soon as possible.
Hi,
there is a bug in you're implementation (it seems that is not in the python implementation).
when you track the points you add also the old ones. You should fix that this way:
instead of:
if (status[i]) //TODO error
p.first.pt = nextPts[i];
keypointsTracked.push_back(p); //This line can be different in my implementation
you should write:
if (status[i])
{
p.first.pt = nextPts[i];
keypointsTracked.push_back(p);
}
unfortunatly, I can't provide you a pull request, because I've done major changes in my code, and now is incopatible with yours....
with that fix, the false positive rate goes down considerably, in particular when the object or the camera are in motion and the object goes out of view.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.