joaofaro / KCFcpp

C++ Implementation of KCF Tracker
BSD 3-Clause "New" or "Revised" License
889 stars 445 forks source link

set HOG true,but errors occurs that cvFilter2D #25

Open guyiyifeurach opened 5 years ago

guyiyifeurach commented 5 years ago

I use the KCV to track the moving object.When I set HOG false,it behaves very well,and peak_value set originally is 2.When set HOG false,the compiler returns the following errors.

OpenCV Error: Assertion failed (src.size() == dst.size() && src.channels() == dst.channels()) in cvFilter2D, file /opencv-2.4.13/opencv/modules/imgproc/src/filter.cpp, line 3359 terminate called after throwing an instance of 'cv::Exception' what(): /opencv-2.4.13/opencv/modules/imgproc/src/filter.cpp:3359: error: (-215) src.size() == dst.size() && src.channels() == dst.channels() in function cvFilter2D.

I check the cvFilter2D,and image I use to init the KCFTracker and used to update the Rect are all gray images, and the size are also right.I am curious. Do some friends know the reasons? Thank you in advance!

guyiyifeurach commented 5 years ago

OK,when I have asked the question,I get the answer.Also to let more people know the reason I met the question. https://github.com/joaofaro/KCFcpp/pull/16