#include <visp/vpDisplayGDI.h>
#include <visp/vpDisplayOpenCV.h>
#include <visp/vpDisplayX.h>
#include <visp/vpDot2.h>
#include <visp/vpImageIo.h>
int main()
{
try {
bool learn = false;
#if defined(VISP_HAVE_X11)
#elif defined(VISP_HAVE_GDI)
#elif defined(VISP_HAVE_OPENCV)
#else
std::cout << "No image viewer is available..." << std::endl;
#endif
if (learn) {
std::cout << "Blob characteristics: " << std::endl;
std::cout <<
" width : " << blob.
getWidth() << std::endl;
std::cout <<
" height: " << blob.
getHeight() << std::endl;
#if VISP_VERSION_INT > VP_VERSION_INT(2,7,0)
std::cout <<
" area: " << blob.
getArea() << std::endl;
#endif
}
else {
#if VISP_VERSION_INT > VP_VERSION_INT(2,7,0)
#endif
}
std::list<vpDot2> blob_list;
if (learn) {
blob_list.push_back(blob);
}
std::cout << "Number of auto detected blob: " << blob_list.size() << std::endl;
std::cout << "A click to exit..." << std::endl;
while(1) {
for(std::list<vpDot2>::iterator it=blob_list.begin(); it != blob_list.end(); ++it) {
(*it).setGraphics(true);
(*it).setGraphicsThickness(3);
(*it).track(I);
}
break;
}
}
std::cout << "Catch an exception: " << e << std::endl;
}
}