Commit 7d1143e6 authored by Nuzhny007's avatar Nuzhny007

TLD with gray scale images

parent 666ec5be
......@@ -119,7 +119,14 @@ bool TrackerTLDImpl::initImpl(const Mat& image, const Rect2d& boundingBox)
bool TrackerTLDImpl::updateImpl(const Mat& image, Rect2d& boundingBox)
{
Mat image_gray, image_blurred, imageForDetector;
cvtColor( image, image_gray, COLOR_BGR2GRAY );
if(image.channels() > 1)
{
cvtColor( image, image_gray, COLOR_BGR2GRAY );
}
else
{
image_gray = image.clone();
}
double scale = data->getScale();
if( scale > 1.0 )
resize(image_gray, imageForDetector, Size(cvRound(image.cols*scale), cvRound(image.rows*scale)), 0, 0, DOWNSCALE_MODE);
......
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