Fix formatting in detection based tracker

This commit is contained in:
Andrey Kamaev 2012-08-23 14:39:10 +04:00
parent 285af48040
commit ce11c0d1eb

View File

@ -39,7 +39,7 @@ using namespace std;
static inline cv::Point2f centerRect(const cv::Rect& r)
{
return cv::Point2f(r.x+((float)r.width)/2, r.y+((float)r.height)/2);
};
}
static inline cv::Rect scale_rect(const cv::Rect& r, float scale)
{
@ -50,7 +50,7 @@ static inline cv::Rect scale_rect(const cv::Rect& r, float scale)
int y=cvRound(m.y - height/2);
return cv::Rect(x, y, cvRound(width), cvRound(height));
};
}
namespace cv
{
@ -66,6 +66,7 @@ class cv::DetectionBasedTracker::SeparateDetectionWork
bool run();
void stop();
void resetTracking();
inline bool isWorking()
{
return (stateThread==STATE_THREAD_WORKING_SLEEPING) || (stateThread==STATE_THREAD_WORKING_WITH_IMAGE);
@ -801,6 +802,7 @@ void cv::DetectionBasedTracker::detectInRegion(const Mat& img, const Rect& r, ve
Rect r0(Point(), img.size());
Rect r1 = scale_rect(r, innerParameters.coeffTrackingWindowSize);
r1 = r1 & r0;
if ( (r1.width <=0) || (r1.height <= 0) ) {
LOGD("DetectionBasedTracker::detectInRegion: Empty intersection");
return;