55 #include <visp/vpPixelMeterConversion.h>
56 #include <visp/vp1394CMUGrabber.h>
57 #include <visp/vp1394TwoGrabber.h>
58 #include <visp/vpDisplayGDI.h>
59 #include <visp/vpDisplayX.h>
60 #include <visp/vpDot2.h>
61 #include <visp/vpPose.h>
62 #include <visp/vpConfig.h>
63 #include <visp/vpImage.h>
64 #include <visp/vpRGBa.h>
67 #include <visp/vpImageIo.h>
68 #include <visp/vpImageConvert.h>
75 #
if defined(VISP_HAVE_DC1394_2)
77 #elif defined(VISP_HAVE_CMU1394)
83 std::cout <<
"**PLEASE SET THE CAMERA LUMINIOSITY!! ***" << std::endl;
84 std::cout <<
"press 'Esc' to exit" << std::endl;
88 if(vpDisplay::getClick(I_grey))
93 vpDisplay::display(I_grey);
94 vpDisplay::flush(I_grey);
96 std::cout <<
"Luminiosity setted!" << std::endl;
101 #if (defined(VISP_HAVE_DC1394_2) || defined(VISP_HAVE_CMU1394))
103 vpImage<unsigned char> I;
105 #if defined(VISP_HAVE_DC1394_2)
106 vp1394TwoGrabber g(
false);
107 #elif defined(VISP_HAVE_CMU1394)
113 #if defined(VISP_HAVE_X11)
114 vpDisplayX d(I, 0, 0,
"Camera view");
115 #elif defined(VISP_HAVE_GDI)
116 vpDisplayGDI d(I, 0, 0,
"Camera view");
118 std::cout <<
"No image viewer is available..." << std::endl;
120 vpDisplay::display(I);
122 std::cout <<
"teste1" << std::endl;
124 blob.setGraphics(
true);
125 blob.setGraphicsThickness(2);
127 cv::Point src_centre;
bool init =
true; cv:Mat I_mat;
128 std::cout <<
"teste2" << std::endl;
138 std::cout <<
"teste3" << std::endl;
139 vpImageConvert::convert(I,I_mat);
141 std::cout <<
"teste4" << std::endl;
145 std::cout <<
"teste5" << std::endl;
147 blob.initTracking(I,vpImagePoint(src_centre.y, src_centre.x));
152 vpDisplay::display(I);
155 std::cout <<
"teste6" << std::endl;
158 std::cout <<
"teste7" << std::endl;
159 std::cout <<
"getCog" << blob.getCog() << std::endl;
162 vpDisplay::display(I);
165 if (vpDisplay::getClick(I,
false))
171 std::cout <<
"Catch an exception: " << e << std::endl;
176 catch(vpException e) {
177 std::cout <<
"Catch an exception: " << e << std::endl;
static int find_arrow(cv::Mat frame, cv::Point ¢er_point)
void wait_lum_set(vpImage< unsigned char > &I_grey,)
static bool found_new_point