diff --git a/qt/aigoqt.cpp b/qt/aigoqt.cpp
index f5b511e..b3b51f6 100644
--- a/qt/aigoqt.cpp
+++ b/qt/aigoqt.cpp
@@ -9,8 +9,8 @@ AigoQt::AigoQt(QWidget *parent)
cam = new Quickcam("/dev/video0");
timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), this, SLOT(updateImage()));
- timer->start(2000);
+ connect(timer, SIGNAL(timeout()), this, SLOT(on_buttonDrawPoints_clicked()));
+ timer->start(200);
}
@@ -24,6 +24,7 @@ void AigoQt::updateImage( void )
cam->update();
SDL_Surface *s = cam->getSurface();
image->setPixmap(QPixmap::fromImage(QImage((uchar*)s->pixels, s->w, s->h, QImage::Format_RGB32)));
+ on_buttonGenerateState_clicked();
}
void AigoQt::on_buttonSetCorners_clicked( void )
@@ -53,12 +54,13 @@ void AigoQt::on_sliderWhite_valueChanged( int value)
void AigoQt::on_buttonDrawPoints_clicked( void )
{
+ updateImage();
for (int i = 0; i < 19; i++)
{
for (int j = 0; j < 19; j++)
{
point p = State::positionPoint(i, j, settings);
- ((uint8_t*)cam->getSurface()->pixels)[(p.y*640 + p.x) * 4] = 0xff000000;
+ ((uint32_t*)cam->getSurface()->pixels)[p.y*640 + p.x] = 0xffff0000;
}
}
SDL_Surface *s = cam->getSurface();
diff --git a/qt/main.ui b/qt/main.ui
index e60db28..a62707c 100644
--- a/qt/main.ui
+++ b/qt/main.ui
@@ -6,7 +6,7 @@
0
0
880
- 684
+ 728
@@ -20,7 +20,100 @@
6
- -
+
-
+
+
+
+ 700
+ 550
+
+
+
+ Preview
+
+
+
+
+ 40
+ 40
+ 640
+ 480
+
+
+
+
+ 640
+ 480
+
+
+
+
+ 640
+ 480
+
+
+
+
+
+
+
+
+ -
+
+
+ White threshold
+
+
+
+ -
+
+
+ Black threshold
+
+
+
+ -
+
+
+ -
+
+
+ 100
+
+
+ 1000
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ -
+
+
+ 100
+
+
+ 1000
+
+
+ 10
+
+
+ 50
+
+
+ 200
+
+
+ Qt::Horizontal
+
+
+
+ -
@@ -77,85 +170,6 @@
- -
-
-
- 100
-
-
- 1000
-
-
- 10
-
-
- 50
-
-
- 200
-
-
- Qt::Horizontal
-
-
-
- -
-
-
-
- 700
- 550
-
-
-
- Preview
-
-
-
-
- 40
- 40
- 640
- 480
-
-
-
-
- 640
- 480
-
-
-
-
- 640
- 480
-
-
-
-
-
-
-
-
- -
-
-
- -
-
-
- 100
-
-
- 1000
-
-
- Qt::Horizontal
-
-
-
- -
-
-