Commit 6bd26d33 authored by Mohammad Haghighat's avatar Mohammad Haghighat Committed by Alexander Alekhin

Merge pull request #1847 from mhaghighat:master

* Checker for empty region

* Update trackerKCF.cpp

* Update trackerKCF.cpp

* Update trackerKCF.cpp

* fix whitespace
parent eb8451c1
......@@ -675,6 +675,10 @@ namespace cv{
if(region.width>img.cols)region.width=img.cols;
if(region.height>img.rows)region.height=img.rows;
// return false if region is empty
if (region.empty())
return false;
patch=img(region).clone();
// add some padding to compensate when the patch is outside image border
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment