diff options
Diffstat (limited to 'ftnoir_tracker_pt')
-rw-r--r-- | ftnoir_tracker_pt/video_widget.cpp | 7 | ||||
-rw-r--r-- | ftnoir_tracker_pt/video_widget.h | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/ftnoir_tracker_pt/video_widget.cpp b/ftnoir_tracker_pt/video_widget.cpp index e6d1e24c..a13542ba 100644 --- a/ftnoir_tracker_pt/video_widget.cpp +++ b/ftnoir_tracker_pt/video_widget.cpp @@ -14,7 +14,7 @@ using namespace std; void VideoWidget::update_image(Mat frame, std::auto_ptr< vector<Vec2f> >)
{
- QMutexLocker((QMutex*)&mtx);
+ QMutexLocker foo(&mtx);
if (frame.channels() != 3 && frame.channels() != 1)
return;
@@ -47,9 +47,6 @@ void VideoWidget::update_image(Mat frame, std::auto_ptr< vector<Vec2f> >) data[y * pitch + x * 3 + 2] = src[pos];
}
}
- if (qframe.size() == size() || (qframe.width() <= this->width() && qframe.height() <= this->height())) {
- }
- else
- qframe = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation);
+ qframe = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation);
pixmap = QPixmap::fromImage(qframe);
}
diff --git a/ftnoir_tracker_pt/video_widget.h b/ftnoir_tracker_pt/video_widget.h index 57be8bff..769e9d45 100644 --- a/ftnoir_tracker_pt/video_widget.h +++ b/ftnoir_tracker_pt/video_widget.h @@ -29,7 +29,7 @@ public: void update_image(cv::Mat frame, std::auto_ptr< std::vector<cv::Vec2f> >);
protected slots:
void paintEvent( QPaintEvent* e ) {
- QMutexLocker((QMutex*)&mtx);
+ QMutexLocker foo(&mtx);
QPainter painter(this);
painter.drawPixmap(e->rect(), pixmap);
}
|