RSJ2011 - eiichiromomma/CVMLAB GitHub Wiki

RSJ2011

RSJ2011θ³‡ζ–™ι…εΈƒγƒšγƒΌγ‚Έ

Slides and Sources

HelloWorld

C

    //HelloOpenCV_c.c
    #include <opencv/cv.h>
    #include <opencv/highgui.h>
    int main(void)
    {
        IplImage *img = cvLoadImage("lena.jpg)", CV_LOAD_IMAGE_COLOR);
        cvShowImage("src", img);
        cvWaitKey(0);
        return 0;
    }

C++

    //HelloOpenCV.cpp
    #include <opencv2/opencv.hpp>
    int main(void)
    {
        cv::Mat img = cv::imread("lena.jpg)",CV_LOAD_IMAGE_COLOR);
        cv::imshow("src", img);
        cv::waitKey(0);
        return 0;
    }

Python

    import cv2
    img = cv2.imread('lena.jpg)', cv2.CV_LOAD_IMAGE_COLOR)
    cv2.imshow('src', img)
    cv2.waitKey(0)

Lena