Skip to content

Commit

Permalink
Clean me tracker examples
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Nov 3, 2024
1 parent 527ba7f commit 7807d63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions example/tracking/trackMeCircle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@

#include <visp3/core/vpColor.h>
#include <visp3/core/vpImage.h>
#include <visp3/core/vpIoTools.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/io/vpImageIo.h>

#include <visp3/core/vpIoTools.h>
#include <visp3/io/vpParseArgv.h>
#include <visp3/me/vpMeEllipse.h>

Expand Down
16 changes: 7 additions & 9 deletions example/tracking/trackMeEllipse.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/****************************************************************************
*
/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
* Copyright (C) 2005 - 2024 by Inria. All rights reserved.
*
* This software is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -30,8 +29,7 @@
*
* Description:
* Tracking of an ellipse.
*
*****************************************************************************/
*/

/*!
\file trackMeEllipse.cpp
Expand Down Expand Up @@ -316,8 +314,8 @@ int main(int argc, const char **argv)
// it size is not defined yet, it will be defined when the image is
// read on the disk
vpImage<unsigned char> I;

vpDisplay *display = nullptr;
vpVideoReader g;

try {
// Get the visp-images-data package path or VISP_INPUT_IMAGE_PATH
Expand All @@ -336,8 +334,9 @@ int main(int argc, const char **argv)
}

// Get the option values
if (!opt_ipath.empty())
if (!opt_ipath.empty()) {
ipath = opt_ipath;
}

// Compare ipath and env_ipath. If they differ, we take into account
// the input path coming from the command line option
Expand Down Expand Up @@ -374,7 +373,6 @@ int main(int argc, const char **argv)
thickness += 1;
}

vpVideoReader g;
if (opt_ppath.empty()) {
// Set the path location of the image sequence
#if VISP_HAVE_DATASET_VERSION >= 0x030600
Expand All @@ -398,7 +396,7 @@ int main(int argc, const char **argv)
g.open(I);

if (opt_display) {
// We open a window using either X11, GTK or GDI.
// We open a window using either X11, GTK, GDI or OpenCV
#if defined(VISP_HAVE_X11)
display = new vpDisplayX;
#elif defined(VISP_HAVE_GTK)
Expand Down

0 comments on commit 7807d63

Please sign in to comment.