diff options
-rw-r--r-- | ftnoir_protocol_ft/ftnoir_protocol_ft.cpp | 2 | ||||
-rw-r--r-- | ftnoir_protocol_ft/ftnoir_protocol_ft.h | 2 | ||||
-rw-r--r-- | ftnoir_tracker_ht/ftnoir_tracker_ht.cpp | 6 | ||||
-rw-r--r-- | ftnoir_tracker_ht/video_widget.cpp | 7 | ||||
-rw-r--r-- | ftnoir_tracker_ht/video_widget.h | 2 | ||||
-rw-r--r-- | ftnoir_tracker_pt/video_widget.cpp | 7 | ||||
-rw-r--r-- | ftnoir_tracker_pt/video_widget.h | 2 |
7 files changed, 11 insertions, 17 deletions
diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp index 9c3c8461..6b67fd38 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp @@ -211,7 +211,7 @@ float headRotZ; start_dummy();
pMemData->GameID2 = pMemData->GameID;
intGameID = pMemData->GameID;
- QMutexLocker((QMutex*)&this->game_name_mutex);
+ QMutexLocker foo(&this->game_name_mutex);
connected_game = gamename;
}
diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.h b/ftnoir_protocol_ft/ftnoir_protocol_ft.h index e1e46876..0915a5f3 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.h +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.h @@ -60,7 +60,7 @@ public: bool checkServerInstallationOK( );
void sendHeadposeToGame( double *headpose, double *rawheadpose );
QString getGameName() {
- QMutexLocker((QMutex*)&game_name_mutex);
+ QMutexLocker foo(&game_name_mutex);
return connected_game;
}
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp index c3ff7fca..10bd4548 100644 --- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp +++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp @@ -111,9 +111,9 @@ static void load_settings(ht_config_t* config, Tracker* tracker) config->pyrlk_win_size_w = config->pyrlk_win_size_h = 21; config->max_keypoints = 200; config->keypoint_quality = 5; - config->keypoint_distance = 2; - config->keypoint_3distance = 5; - config->keypoint_9distance = 12; + config->keypoint_distance = 1; + config->keypoint_3distance = 4; + config->keypoint_9distance = 8; //config->force_width = 640; //config->force_height = 480; config->force_fps = iniFile.value("fps", 0).toInt(); diff --git a/ftnoir_tracker_ht/video_widget.cpp b/ftnoir_tracker_ht/video_widget.cpp index ac91dd6b..84cba6a3 100644 --- a/ftnoir_tracker_ht/video_widget.cpp +++ b/ftnoir_tracker_ht/video_widget.cpp @@ -13,7 +13,7 @@ using namespace std; void VideoWidget::update_image(unsigned char *frame, int width, int height) { - QMutexLocker((QMutex*)&mtx); + QMutexLocker foo(&mtx); QImage qframe = QImage(width, height, QImage::Format_RGB888); uchar* data = qframe.bits(); const int pitch = qframe.bytesPerLine(); @@ -25,9 +25,6 @@ void VideoWidget::update_image(unsigned char *frame, int width, int height) data[y * pitch + x * 3 + 1] = frame[pos + 1]; data[y * pitch + x * 3 + 2] = frame[pos + 0]; } - 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_ht/video_widget.h b/ftnoir_tracker_ht/video_widget.h index 7cccc9fb..0d625d29 100644 --- a/ftnoir_tracker_ht/video_widget.h +++ b/ftnoir_tracker_ht/video_widget.h @@ -27,7 +27,7 @@ public: void update_image(unsigned char* frame, int width, int height); protected slots: void paintEvent( QPaintEvent* e ) { - QMutexLocker((QMutex*)&mtx); + QMutexLocker foo(&mtx); QPainter painter(this); painter.drawPixmap(e->rect(), pixmap); } 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);
}
|