编程语言
首页 > 编程语言> > Opencv3 C++ VS2017 学习笔记 00

Opencv3 C++ VS2017 学习笔记 00

作者:互联网

#include <iostream>
#include <opencv2/opencv.hpp>
#include <cmath>

using namespace std;
using nemespace cv;

int main(int argc, char ** argv)
{
    Mat src = imread("C:\\Users\\xjh\\Desktop\\a.jpg");
    if(!src.data)
    {
        cout<<"no data\n";
        return -1;
    }
    namedWindow("test", WINODW_AUTOSIZE);
    imshow("test", src);
    Mat output_image;
    namedWindow("output window", WINDOW_AUTOSIEZE);
    cvtColor(src, output_image);
    imshow("output window", output_image);
    imwrite("D:\\aaa.png", output_image);
    
    waitkey(0);
    return 0;
}

 

MillenniumFalcon 发布了3 篇原创文章 · 获赞 2 · 访问量 6692 私信 关注

标签:00,Mat,COLOR,VS2017,Opencv3,图像,imread,include,加载
来源: https://blog.csdn.net/Mrsherlock_/article/details/104479450