11Gui::Gui(QMainWindow* win, Ui_MainWindow* ui_win) {
18 SignapseUtils::randSeed();
28 cv::flip(next.
frame, temp, 1);
29 QImage imgIn = QImage((uchar *) temp.data, temp.cols, temp.rows, temp.step,
30 QImage::Format_RGB888);
31 ui->label->setPixmap(QPixmap::fromImage(imgIn));
32 ui->label->resize(ui->label->pixmap()->size());
48 widget->setVisible(visible);
55 std::string impath =
testFolder + letter +
"_test.jpg";
56 cv::Mat img = cv::imread(impath);
64 std::string new_task = SignapseUtils::makeTask();
66 currentTask = new_task;
78void Gui::makeConnections() {
81 QObject::connect(ui->spinBox, QOverload<int>::of(&QSpinBox::valueChanged),
this, &
Gui::updateThreshold);
85void Gui::setDemoImage(cv::Mat img) {
87 cv::cvtColor(img, rgb, cv::COLOR_BGR2RGB);
89 cv::flip(rgb, flip, 1);
90 ui->label_2->setPixmap(QPixmap::fromImage(QImage(flip.data, flip.cols, flip.rows, flip.step, QImage::Format_RGB888)));
91 ui->label_2->resize(ui->label_2->pixmap()->size());
95void Gui::setTaskText(std::string letter){
96 ui->listWidget->item(2)->setText(QCoreApplication::translate(
"MainWindow", letter.c_str(),
nullptr));
100 currentTask = newTask;
void SetTargetImage(int target)
virtual void NextScene(Scene next)
void SetVisible(bool visible)
void SetTask(std::string newTask)
Gui(QMainWindow *win, Ui_MainWindow *ui_win)
void progressChanged(int progress)
int GetProgress(std::string s, std::string task)
void SetThreshold(int thres)
std::string result
Member variable.
cv::Mat frame
Member variable.