OpenCV

De FunLab Documentation
Révision datée du 20 avril 2017 à 12:08 par Nicolas (discussion | contributions) (Page créée avec « {{Outil |dangerosité=pas |type=logiciel |fonction=analyse d'image }} ===== opencv ===== installer opencv http://docs.opencv.org/doc/tutorials/introduction/linux_install/l... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à : navigation, rechercher

Modèle:Outil

opencv

installer opencv http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation

C++ && surcouche aux makefiles: cmake

http://docs.opencv.org/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html

code d'exemple: affichage simple d'une image

#include <stdio.h>
#include <opencv2/opencv.hpp>

using namespace cv;

int main(int argc, char** argv )
{
    if ( argc != 2 )
    {
        printf("usage: DisplayImage.out <Image_Path>\n");
        return -1;
    }

    Mat image;
    image = imread( argv[1], 1 );

    if ( !image.data )
    {
        printf("No image data \n");
        return -1;
    }
    namedWindow("Display Image", CV_WINDOW_AUTOSIZE );
    imshow("Display Image", image);

    waitKey(0);

    return 0;
}