Commit 23bda58f authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #795 from sovrasov:tld_grayscale

parents 2283cea6 f857b7f7
......@@ -82,7 +82,15 @@ bool TrackerTLDImpl::initImpl(const Mat& image, const Rect2d& boundingBox)
{
Mat image_gray;
trackerProxy->init(image, boundingBox);
cvtColor( image, image_gray, COLOR_BGR2GRAY );
if(image.channels() > 1)
{
cvtColor( image, image_gray, COLOR_BGR2GRAY );
}
else
{
image_gray = image.clone();
}
data = Ptr<Data>(new Data(boundingBox));
double scale = data->getScale();
Rect2d myBoundingBox = boundingBox;
......
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