diff --git a/sensor/sample-vpOpenCVGrabber-2.cpp b/sensor/sample-vpOpenCVGrabber-2.cpp deleted file mode 100644 index d848a84..0000000 --- a/sensor/sample-vpOpenCVGrabber-2.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include - -#include - -#if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION < 0x030000) - -#include -#include -#include -#include - - -// usage: binary -// device name: 0 is the default to dial with the first camera, -// 1 to dial with a second camera attached to the computer -int main(int argc, char** argv) -{ - int device = 0; - if (argc > 1) - device = atoi(argv[1]); - - std::cout << "Use device: " << device << std::endl; - cv::VideoCapture cap(device); // open the default camera - if(!cap.isOpened()) // check if we succeeded - return -1; - cv::Mat frame; - cap >> frame; // get a new frame from camera - - IplImage iplimage = frame; - std::cout << "Image size: " << iplimage.width << " " - << iplimage.height << std::endl; - - //vpImage I; // for color images - vpImage I; // for gray images - vpImageConvert::convert(&iplimage, I); - vpDisplayOpenCV d(I); - - for(;;) { - cap >> frame; // get a new frame from camera - iplimage = frame; - - // Convert the image in ViSP format and display it - vpImageConvert::convert(&iplimage, I); - vpDisplay::display(I); - vpDisplay::flush(I); - if (vpDisplay::getClick(I, false)) // a click to exit - break; - } - // the camera will be deinitialized automatically in VideoCapture destructor - return 0; -} - -#else -int main() -{ - std::cout << "OpenCV is not available..." << std::endl; -} - -#endif diff --git a/sensor/sample-vpOpenCVGrabber.cpp b/sensor/sample-vpOpenCVGrabber.cpp deleted file mode 100644 index bf0fc8f..0000000 --- a/sensor/sample-vpOpenCVGrabber.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include -#include - -int main() -{ -#if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION < 0x020408) - vpImage I; // Create a gray level image container - vpOpenCVGrabber g; // Create a grabber based on OpenCV third party lib - - g.open(I); // Open the framegrabber - g.acquire(I); // Acquire an image - vpImageIo::writePGM(I, "image.pgm"); // Write image on the disk -#endif -} diff --git a/vision/sample-vpKeyPointSurf-2.cpp b/vision/sample-vpKeyPointSurf-2.cpp deleted file mode 100644 index 891ff29..0000000 --- a/vision/sample-vpKeyPointSurf-2.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include -#include - -int main() -{ -#if defined (VISP_HAVE_OPENCV_NONFREE) && (VISP_HAVE_OPENCV_VERSION < 0x030000) - vpImage Ireference; - vpImage Icurrent; - vpKeyPointSurf surf; - - //First grab the reference image Irefrence - - //Select a part of the image by clincking on two points which define a rectangle - vpImagePoint corners[2]; - for (int i=0 ; i < 2 ; i++) - { - vpDisplay::getClick(Ireference, corners[i]); - } - - //Build the reference SURF points. - int nbrRef; - unsigned int height, width; - height = (unsigned int)(corners[1].get_i() - corners[0].get_i()); - width = (unsigned int)(corners[1].get_j() - corners[0].get_j()); - nbrRef = surf.buildReference(Ireference, corners[0], height, width); - - //Then grab another image which represents the current image Icurrent - - //Select a part of the image by clincking on two points which define a rectangle - for (int i=0 ; i < 2 ; i++) - { - vpDisplay::getClick(Icurrent, corners[i]); - } - - //Match points between the reference points and the SURF points computed in the current image. - int nbrMatched; - height = (unsigned int)(corners[1].get_i() - corners[0].get_i()); - width = (unsigned int)(corners[1].get_j() - corners[0].get_j()); - nbrMatched = surf.matchPoint(Icurrent, corners[0], height, width); - - //Display the matched points - surf.display(Ireference, Icurrent); - - return(0); -#endif -} diff --git a/vision/sample-vpKeyPointSurf.cpp b/vision/sample-vpKeyPointSurf.cpp deleted file mode 100644 index 035e729..0000000 --- a/vision/sample-vpKeyPointSurf.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include - -int main() -{ -#if defined(VISP_HAVE_OPENCV_NONFREE) && (VISP_HAVE_OPENCV_VERSION < 0x030000) - vpImage Irefrence; - vpImage Icurrent; - vpKeyPointSurf surf; - - // First grab the reference image Irefrence - - // Build the reference SURF points. - surf.buildReference(Irefrence); - - // Then grab another image which represents the current image Icurrent - - // Match points between the reference points and the SURF points computed in the current image. - surf.matchPoint(Icurrent); - - // Display the matched points - surf.display(Irefrence, Icurrent); - - return (0); -#endif -} -