Subversion Repositories OpenCV2-Cookbook

Rev

Rev 3 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 5
Line 34... Line 34...
34
        cv::Mat image;
34
        cv::Mat image;
35
        // print image size
35
        // print image size
36
        std::cout << "size: " << image.size().height << " , "
36
        std::cout << "size: " << image.size().height << " , "
37
          << image.size().width << std::endl;
37
          << image.size().width << std::endl;
38
        // open image
38
        // open image
39
        image=  cv::imread("img.jpg");
39
        image=  cv::imread("baboon1.jpg");
40
        // check if image has been successfully read
40
        // check if image has been successfully read
41
        if (!image.data) {
41
        if (!image.data) {
42
                // no image has been created…
42
                // no image has been created�
43
                return 0;
43
                return 0;
44
        }
44
        }
45
        // print image size
45
        // print image size
46
    std::cout << "size (after reading): " << image.size().height << " , "
46
    std::cout << "size (after reading): " << image.size().height << " , "
47
          << image.size().width << std::endl;
47
          << image.size().width << std::endl;