summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/ovision/ui/live.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/ovision/ui/live.cc')
-rw-r--r--2005/i/robert/src/ovision/ui/live.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/2005/i/robert/src/ovision/ui/live.cc b/2005/i/robert/src/ovision/ui/live.cc
index 4722b3a..c608c8f 100644
--- a/2005/i/robert/src/ovision/ui/live.cc
+++ b/2005/i/robert/src/ovision/ui/live.cc
@@ -22,7 +22,7 @@
/// Constructeur
/// @param *filename nom de l'image a utiliser
Live::Live (const unsigned nbImg, const ImageInput imgInput)
- : reader_ (0), db_ (0), st_ (0), colorToFind_ (-1), group (0),
+ : reader_ (0), db_ (0), st_ (0), colorToFind_ (-1), group (0),
width_ (640), height_ (480), imgInput_ (imgInput)
{
if (nbImg < 6) nbImg_ = 6;
@@ -94,6 +94,12 @@ Live::init (const Image::PixelFormat pf, const char *filename)
eraser = new Eraser (oconfig->width, 10);
eraser->init ();
mag = new Magnifier (img, segm, eraser, Group::ZoneType (oconfig->uiGroupToDisplay));
+ space = new Space (img->width_, img->height_);
+ // Calibration des longueurs
+ space->addSetupPoint (56, 155, 50, 315);
+ space->addSetupPoint (65, 51, 50, 465);
+ space->addSetupPoint (164, 46, -50, 465);
+ space->setup (0.003, -2.106, 561.391);
segmAndGroup ();
// Affichage de l'image pilote avec la couleur d'aquisition et en RGB
tex[1] = loadImage (img->width_, img->height_, data[0], tex[1]);
@@ -182,6 +188,14 @@ Live::segmAndGroup (const int numColorToShow)
group->jumpPoints (oconfig->groupColor);
mag->analyse (group->getZoneList ());
list = mag->getItemList ((Group::ZoneType)oconfig->uiGroupToDisplay);
+ int x, y, angle, dist;
+ for (std::vector<Zone>::iterator iter = list.begin ();
+ iter != list.end (); ++iter)
+ {
+ mag->showZone (*iter);
+ space->getRealLoc (*iter, x, y, angle, dist);
+ std::cout << "<Live::segmAndGroup> position réelle : "<< x << " " << y << " " << angle << " " << dist << "\n";
+ }
}
// Création de l'image des groupes
segm->segmImg (img);